Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uniform signal style #166

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/widgets/common/DoubleCheckBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@ DoubleCheckBox::DoubleCheckBox(const QString &text, QWidget *parent) :
void DoubleCheckBox::init_display()
{
cb_one = new QCheckBox(this);
connect(cb_one, &QCheckBox::toggled, this, &DoubleCheckBox::box1_toggled);
connect(cb_one, &QCheckBox::toggled, this, &DoubleCheckBox::box1Toggled);

cb_two = new QCheckBox(this);
connect(cb_two, &QCheckBox::toggled, this, &DoubleCheckBox::box2_toggled);
connect(cb_two, &QCheckBox::toggled, this, &DoubleCheckBox::box2Toggled);
label = new QLabel(this);

// TODO: remove for 2.0
connect(cb_one, &QCheckBox::toggled, this, &DoubleCheckBox::box1_toggled);
// TODO: remove for 2.0
connect(cb_two, &QCheckBox::toggled, this, &DoubleCheckBox::box2_toggled);

auto boxLayout = new QHBoxLayout;
boxLayout->addWidget(cb_one);
boxLayout->addWidget(cb_two);
Expand Down
7 changes: 5 additions & 2 deletions src/widgets/common/DoubleCheckBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class QLabel;

/** \class DoubleCheckBox
* \brief one text two checkable boxes
* \todo remove deprecated Emits on ff7tk 2.0 release
*/
class FF7TKQTWIDGETS_EXPORT DoubleCheckBox : public QWidget
{
Expand Down Expand Up @@ -58,12 +59,14 @@ class FF7TKQTWIDGETS_EXPORT DoubleCheckBox : public QWidget
/** \brief Signal: box1 has had its state changed
* \param checked checked state
*/
void box1_toggled(bool checked);
void box1Toggled(bool checked);
[[ deprecated ("will be removed in ff7tk 2.0, Use DoubleCheckbox::box1Toggled") ]]void box1_toggled(bool checked);

/** \brief Signal: box2 has had its state changed
* \param checked checked state
*/
void box2_toggled(bool checked);
void box2Toggled(bool checked);
[[ deprecated ("will be removed in ff7tk 2.0, Use DoubleCheckbox::box2Toggled") ]]void box2_toggled(bool checked);
private:
void init_display();
QCheckBox *cb_one = nullptr;
Expand Down
Loading
Loading