Move setButtonIcon to utility

This commit is contained in:
WarmUpTill 2022-09-07 20:17:48 +02:00 committed by WarmUpTill
parent d99618d2f6
commit f40f98c702
3 changed files with 9 additions and 8 deletions

View File

@ -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)
{

View File

@ -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);
}

View File

@ -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);