Skip to content

Commit

Permalink
Completed doc comments for applyClicked
Browse files Browse the repository at this point in the history
  • Loading branch information
JairajJangle committed Jul 20, 2020
1 parent 22d7fcb commit a4431bd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
27 changes: 27 additions & 0 deletions CustomWidgets/applyresetbuttonlayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,25 @@ class ApplyResetButtonLayout : public QHBoxLayout
{
Q_OBJECT

/**
* @brief applyButton Apply Push Button.
*/
QPushButton* applyButton = new QPushButton("Apply");

/**
* @brief resetButton Reset Push Button
*/
QPushButton* resetButton = new QPushButton("Reset");

public:
/**
* @brief ApplyResetButtonLayout Constructor for this class
* @param resetVisible Set true to make reset button visible else false,
* default = true
* @param applyVisible Set true to make apply button visible else false,
* default = true
* @param parent Pass the parent widget, nullable optional parameter
*/
explicit ApplyResetButtonLayout(bool resetVisible = true,
bool applyVisible = true,
QWidget* parent = nullptr)
Expand All @@ -46,18 +61,30 @@ class ApplyResetButtonLayout : public QHBoxLayout
resetButton->setVisible(resetVisible);
applyButton->setVisible(applyVisible);

/*
* Lambda for connecting Apply button click event with the corresponding signal
*/
connect(applyButton, &QPushButton::released, this,
[=]() {
emit applyClicked();
});

/*
* Lambda for connecting Reset button click event with the corresponding signal
*/
connect(resetButton, &QPushButton::released, this,
[=]() {
emit resetClicked();
});
}

signals:
/**
* @brief applyClicked Signal emitted when Apply button is clicked
*/
void applyClicked();
/**
* @brief resetClicked Signal emitted when Reset button is clicked
*/
void resetClicked();
};
4 changes: 2 additions & 2 deletions OpenCV_Catalogue.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.12.4, 2020-07-19T12:21:57. -->
<!-- Written by QtCreator 4.12.4, 2020-07-20T23:02:45. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down Expand Up @@ -330,7 +330,7 @@
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/jairaj/Softwares/Qt/qt_projects/build-OpenCV_Catalogue-Desktop_Qt_5_10_0_GCC_64bit-Debug</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
Expand Down

0 comments on commit a4431bd

Please sign in to comment.