mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 18:33:09 -05:00
Initial implementation of theming
This commit is contained in:
@ -62,6 +62,15 @@ QList<QAction *> ActionsGroupsModel::getActions(const QModelIndex &mi)
|
||||
return QList<QAction *>();
|
||||
}
|
||||
|
||||
void ActionsGroupsModel::updateGroupIcon(int row, const QIcon &icon)
|
||||
{
|
||||
if (row >= 0 && row < groups.size()) {
|
||||
groups[row].setIcon(icon);
|
||||
QModelIndex idx = index(row, 0);
|
||||
emit dataChanged(idx, idx, { Qt::DecorationRole });
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
ActionsGroup::ActionsGroup(const QString &name, const QIcon &icon, QList<QAction *> &actions)
|
||||
@ -74,6 +83,11 @@ QString ActionsGroup::getName() const
|
||||
return name;
|
||||
}
|
||||
|
||||
void ActionsGroup::setIcon(const QIcon &newIcon)
|
||||
{
|
||||
icon = newIcon;
|
||||
}
|
||||
|
||||
QIcon ActionsGroup::getIcon() const
|
||||
{
|
||||
return icon;
|
||||
|
||||
Reference in New Issue
Block a user