[GUI] Add PreferencePack support
Preference Packs are collections of preferences that can be applied en mass to the user's current setup. Any preference that can be stored in user.cfg can be stored in a preference pack, and they are designed to be easy to distribute. Support is also added for saving a subset of current preferences into a new preference pack in order to facilitate easy creation of new "themes", etc.
This commit is contained in:
@@ -466,4 +466,17 @@ void DlgPreferencesImp::changeEvent(QEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
void DlgPreferencesImp::reload()
|
||||
{
|
||||
for (int i = 0; i < ui->tabWidgetStack->count(); i++) {
|
||||
QTabWidget* tabWidget = (QTabWidget*)ui->tabWidgetStack->widget(i);
|
||||
for (int j = 0; j < tabWidget->count(); j++) {
|
||||
PreferencePage* page = qobject_cast<PreferencePage*>(tabWidget->widget(j));
|
||||
if (page)
|
||||
page->loadSettings();
|
||||
}
|
||||
}
|
||||
applyChanges();
|
||||
}
|
||||
|
||||
#include "moc_DlgPreferencesImp.cpp"
|
||||
|
||||
Reference in New Issue
Block a user