Skip to content

Commit

Permalink
gui: added add/remove/sync buttons
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Suciu <[email protected]>
  • Loading branch information
adisuciu committed Mar 11, 2024
1 parent 37504d3 commit f1e8df6
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
22 changes: 22 additions & 0 deletions gui/include/gui/widgets/toolbuttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,28 @@ class SCOPY_GUI_EXPORT SingleShotBtn : public QPushButton
SingleShotBtn(QWidget *parent = nullptr);
};

class SCOPY_GUI_EXPORT AddBtn : public QPushButton
{
Q_OBJECT
public:
AddBtn(QWidget *parent = nullptr);
};

class SCOPY_GUI_EXPORT RemoveBtn : public QPushButton
{
Q_OBJECT
public:
RemoveBtn(QWidget *parent = nullptr);
};

class SCOPY_GUI_EXPORT SyncBtn : public QPushButton
{
Q_OBJECT
public:
SyncBtn(QWidget *parent = nullptr);
};


} // namespace scopy

#endif
26 changes: 26 additions & 0 deletions gui/src/widgets/toolbuttons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,29 @@ SingleShotBtn::SingleShotBtn(QWidget *parent)
}

#include "moc_toolbuttons.cpp"

AddBtn::AddBtn(QWidget *parent)
{
QIcon icon1;
icon1.addPixmap(Util::ChangeSVGColor(":/gui/icons/launcher_add.svg", "white", 1));
StyleHelper::SquareToggleButtonWithIcon(this, "add_btn", false);
setIcon(icon1);
}

RemoveBtn::RemoveBtn(QWidget *parent)
{
QIcon icon1;
icon1.addPixmap(Util::ChangeSVGColor(":/gui/icons/red_x.svg", "white", 1));
StyleHelper::SquareToggleButtonWithIcon(this, "remove_btn", false);
setIcon(icon1);
}

SyncBtn::SyncBtn(QWidget *parent)
{
QIcon icon1;
icon1.addPixmap(Util::ChangeSVGColor(":/gui/icons/scopy-default/icons/gear_wheel_hover.svg", "white", 1));
StyleHelper::BlueGrayButton(this,"sync_btn");
setText("Sync");
setCheckable(true);
setIcon(icon1);
}

0 comments on commit f1e8df6

Please sign in to comment.