[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:
@@ -44,6 +44,7 @@
|
||||
#endif
|
||||
|
||||
#include <boost/interprocess/sync/file_lock.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <QtOpenGL.h>
|
||||
#if defined(HAVE_QT5_OPENGL)
|
||||
#include <QWindow>
|
||||
@@ -72,6 +73,7 @@
|
||||
#include "WidgetFactory.h"
|
||||
#include "Command.h"
|
||||
#include "Macro.h"
|
||||
#include "PreferencePackManager.h"
|
||||
#include "ProgressBar.h"
|
||||
#include "Workbench.h"
|
||||
#include "WorkbenchManager.h"
|
||||
@@ -159,6 +161,9 @@ struct ApplicationP
|
||||
macroMngr = new MacroManager();
|
||||
else
|
||||
macroMngr = nullptr;
|
||||
|
||||
// Create the Theme Manager
|
||||
prefPackManager = new PreferencePackManager();
|
||||
}
|
||||
|
||||
~ApplicationP()
|
||||
@@ -172,6 +177,7 @@ struct ApplicationP
|
||||
Gui::Document* activeDocument;
|
||||
Gui::Document* editDocument;
|
||||
MacroManager* macroMngr;
|
||||
PreferencePackManager* prefPackManager;
|
||||
/// List of all registered views
|
||||
std::list<Gui::BaseView*> passive;
|
||||
bool isClosing;
|
||||
@@ -1616,6 +1622,12 @@ CommandManager &Application::commandManager(void)
|
||||
return d->commandManager;
|
||||
}
|
||||
|
||||
Gui::PreferencePackManager* Application::prefPackManager(void)
|
||||
{
|
||||
return d->prefPackManager;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// Init, Destruct and singleton
|
||||
|
||||
|
||||
Reference in New Issue
Block a user