Skip to content

Commit

Permalink
Add documentation for GUI functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rdimaio committed Apr 25, 2019
1 parent 79c60f7 commit cf58877
Show file tree
Hide file tree
Showing 7 changed files with 302 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2537,4 +2537,4 @@ DOT_CLEANUP = YES

# Parse header files

INPUT = $(TRAVIS_BUILD_DIR)/include $(TRAVIS_BUILD_DIR)/src
INPUT = $(TRAVIS_BUILD_DIR)/include $(TRAVIS_BUILD_DIR)/src $(TRAVIS_BUILD_DIR)/src/gui
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ runs the ```.travis.yml``` configuration on a hosted environment (generally
a virtual machine running Linux, specifically Ubuntu) and sends you an email
in case the latest commit breaks the tests in any way.

# Useful info

- A cell is a shape (e.g. tetrahedron)
# Possible future implementations
- Code could be cleaned up, especially in mainwindow.cpp.
The different functions could be put in different files,
improving the ease of navigating the GUI source code.

## Useful links

Expand Down
2 changes: 1 addition & 1 deletion include/matrix.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file matrix.h
* @brief Header file for the Matrix class
* @brief Header file for the Matrix3x3 class
* @author Riccardo Di Maio
* @version 1.0 14/12/18
*/
Expand Down
68 changes: 61 additions & 7 deletions src/gui/clipdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,93 @@

#include <QDialog>

namespace Ui {
class ClipDialog;
namespace Ui
{
class ClipDialog;
}

/**
* Clip filter dialog.
* As MainWindow cannot access ClipDialog's objects (e.g. xSlider, yDial)
* directly, custom signals are used to be emitted and picked up by MainWindow.
*/
class ClipDialog : public QDialog
{
Q_OBJECT

signals:
signals:
/**
* Signal emitted when the x slider is moved
*/
void xSliderMoved(int value);
/**
* Signal emitted when the y slider is moved
*/
void ySliderMoved(int value);
/**
* Signal emitted when the z slider is moved
*/
void zSliderMoved(int value);
/**
* Signal emitted when the x dial is moved
*/
void xDialMoved(int value);
/**
* Signal emitted when the y dial is moved
*/
void yDialMoved(int value);
/**
* Signal emitted when the z dial is moved
*/
void zDialMoved(int value);
/**
* Signal emitted when the OK button is clicked
*/
void clipDialogRejected();
/**
* Signal emitted when the Cancel button is clicked
*/
void clipDialogAccepted();

public:
public:
explicit ClipDialog(QWidget *parent = nullptr);
~ClipDialog();

private slots:
private slots:
/**
* Slot handling the sliderMoved signal from the x slider
*/
void on_xSlider_sliderMoved(int position);
/**
* Slot handling the sliderMoved signal from the y slider
*/
void on_ySlider_sliderMoved(int position);
/**
* Slot handling the sliderMoved signal from the z slider
*/
void on_zSlider_sliderMoved(int position);
/**
* Slot handling the sliderMoved signal from the x dial
*/
void on_xDial_sliderMoved(int position);
/**
* Slot handling the sliderMoved signal from the y dial
*/
void on_yDial_sliderMoved(int position);
/**
* Slot handling the sliderMoved signal from the z dial
*/
void on_zDial_sliderMoved(int position);
void on_clipDialog_rejected();
/**
* Slot handling the OK button
*/
void on_clipDialog_accepted();
/**
* Slot handling the Cancel button
*/
void on_clipDialog_rejected();

private:
private:
Ui::ClipDialog *ui;
};

Expand Down
3 changes: 3 additions & 0 deletions src/gui/helpdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ namespace Ui{
class HelpDialog;
}

/**
* Help dialog that displays information regarding 13CAD.
*/
class HelpDialog : public QDialog
{
Q_OBJECT
Expand Down
Loading

0 comments on commit cf58877

Please sign in to comment.