mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-15 22:04:17 -05:00
Move setButtonIcon to utility
This commit is contained in:
@@ -142,14 +142,6 @@ bool ConnectionNameAvailable(const std::string &name)
|
||||
return ConnectionNameAvailable(QString::fromStdString(name));
|
||||
}
|
||||
|
||||
void setButtonIcon(QPushButton *button, const char *path)
|
||||
{
|
||||
QIcon icon;
|
||||
icon.addFile(QString::fromUtf8(path), QSize(), QIcon::Normal,
|
||||
QIcon::Off);
|
||||
button->setIcon(icon);
|
||||
}
|
||||
|
||||
ConnectionSelection::ConnectionSelection(QWidget *parent)
|
||||
: QWidget(parent), _selection(new QComboBox), _modify(new QPushButton)
|
||||
{
|
||||
|
||||
@@ -1020,3 +1020,11 @@ bool doubleEquals(double left, double right, double epsilon)
|
||||
{
|
||||
return (fabs(left - right) < epsilon);
|
||||
}
|
||||
|
||||
void setButtonIcon(QPushButton *button, const char *path)
|
||||
{
|
||||
QIcon icon;
|
||||
icon.addFile(QString::fromUtf8(path), QSize(), QIcon::Normal,
|
||||
QIcon::Off);
|
||||
button->setIcon(icon);
|
||||
}
|
||||
|
||||
@@ -84,3 +84,4 @@ void populateSourceGroupSelection(QComboBox *list);
|
||||
void populateProfileSelection(QComboBox *list);
|
||||
bool windowPosValid(QPoint pos);
|
||||
bool doubleEquals(double left, double right, double epsilon);
|
||||
void setButtonIcon(QPushButton *button, const char *path);
|
||||
|
||||
Reference in New Issue
Block a user