summaryrefslogtreecommitdiff
path: root/ThemesManager.h
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2017-11-24 23:24:09 +0000
committerThomas Preud'homme <robotux@celest.fr>2017-11-24 23:24:09 +0000
commitb3c8bdcc0d1e4b2ab298847a7902b6d60410a5bc (patch)
tree8fce8a51adfb245db8ab2a76831661780c0c713e /ThemesManager.h
parente297dbd8052ef4e66f069e2dd1865ae7fa8af28e (diff)
New upstream version 1.2.3.6
Diffstat (limited to 'ThemesManager.h')
-rw-r--r--ThemesManager.h118
1 files changed, 57 insertions, 61 deletions
diff --git a/ThemesManager.h b/ThemesManager.h
index af30ee4..1f8096d 100644
--- a/ThemesManager.h
+++ b/ThemesManager.h
@@ -1,9 +1,7 @@
/** \file ThemesManager.h
\brief Define the class to manage and load the themes
\author alpha_one_x86
-\version 0.3
-\date 2010
-\licence GPL3, see the file COPYING */
+\licence GPL3, see the file COPYING */
#ifndef THEMES_MANAGER_H
#define THEMES_MANAGER_H
@@ -12,11 +10,12 @@
#include <QObject>
#include <QIcon>
#include <QList>
+#ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE_DIRECT
#include <QPluginLoader>
+#endif
#include "Environment.h"
#include "ResourcesManager.h"
-#include "Singleton.h"
#include "OptionEngine.h"
#include "PluginsManager.h"
#include "LanguagesManager.h"
@@ -28,64 +27,61 @@
/** \brief Define the class to manage and load the themes
This class provide a core load and manage the themes */
-class ThemesManager : public QObject, public Singleton<ThemesManager>
+class ThemesManager : public QObject
{
- Q_OBJECT
- friend class Singleton<ThemesManager>;
- //public slots:
- /*/// \brief To change the current themes selected
- bool changeCurrentTheme(QString theNewThemeToLoad);*/
- public:
- /** \brief To get image into the current themes, or default if not found
- \param filePath The file path to search, like toto.png resolved with the root of the current themes
- \see currentStylePath */
- QIcon loadIcon(const QString &fileName);
- /** \brief To get if one themes instance
- \see Core() */
- PluginInterface_Themes * getThemesInstance();
- private:
- /// \brief Create the manager and load the defaults variables
- ThemesManager();
- /// \brief Destroy the themes manager
- ~ThemesManager();
- /// \brief The default themes path where it has theme's files
- QString defaultStylePath;
- /// \brief The current themes path loaded by ultracopier
- QString currentStylePath;
- /// \brief Store the object of resources manager
- ResourcesManager *resources;
- //for the options
- OptionEngine *options;
- /// \brief Store the object of languages manager
- LanguagesManager *languages;
- /// \brief Store the object of plugin manager
- PluginsManager *plugins;
- /// \brief OptionEngineGroupKey then: Group -> Key
- struct PluginsAvailableThemes
- {
- PluginsAvailable plugin;
- PluginInterface_ThemesFactory *factory;
- QPluginLoader *pluginLoader;
- LocalPluginOptions *options;
- };
- QList<PluginsAvailableThemes> pluginList;
- int currentPluginIndex;
- FacilityEngine facilityEngine;
- signals:
- /// \brief send this signal when the themes have changed
- void theThemeNeedBeUnloaded();
- void theThemeIsReloaded();
- void newThemeOptions(QString name,QWidget *,bool isLoaded,bool havePlugin);
- void previouslyPluginAdded(PluginsAvailable);
- private slots:
- /// \brief reload the themes
- void onePluginAdded(const PluginsAvailable &plugin);
- void onePluginWillBeRemoved(const PluginsAvailable &plugin);
- void allPluginIsLoaded();
- void newOptionValue(const QString &group,const QString &name,const QVariant &value);
- #ifdef ULTRACOPIER_DEBUG
- void debugInformation(DebugLevel level,const QString& fonction,const QString& text,const QString& file,const int& ligne);
- #endif // ULTRACOPIER_DEBUG
+ Q_OBJECT
+ //public slots:
+ /*/// \brief To change the current themes selected
+ bool changeCurrentTheme(QString theNewThemeToLoad);*/
+ public:
+ /** \brief To get image into the current themes, or default if not found
+ \param filePath The file path to search, like toto.png resolved with the root of the current themes
+ \see currentStylePath */
+ QIcon loadIcon(const QString &fileName);
+ /** \brief To get if one themes instance
+ \see Core() */
+ PluginInterface_Themes * getThemesInstance();
+
+ static ThemesManager *themesManager;
+ /// \brief Create the manager and load the defaults variables
+ ThemesManager();
+ /// \brief Destroy the themes manager
+ ~ThemesManager();
+ private:
+ /// \brief The default themes path where it has theme's files
+ QString defaultStylePath;
+ /// \brief The current themes path loaded by ultracopier
+ QString currentStylePath;
+ /// \brief OptionEngineGroupKey then: Group -> Key
+ struct PluginsAvailableThemes
+ {
+ PluginsAvailable plugin;
+ PluginInterface_ThemesFactory *factory;
+ #ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE_DIRECT
+ QPluginLoader *pluginLoader;
+ #endif
+ LocalPluginOptions *options;
+ };
+ QList<PluginsAvailableThemes> pluginList;
+ int currentPluginIndex;
+ bool stopIt;
+ signals:
+ /// \brief send this signal when the themes have changed
+ void theThemeNeedBeUnloaded() const;
+ void theThemeIsReloaded() const;
+ void newThemeOptions(const QString &name,QWidget *,const bool &isLoaded,const bool &havePlugin) const;
+ void previouslyPluginAdded(PluginsAvailable) const;
+ private slots:
+ /// \brief reload the themes
+ void onePluginAdded(const PluginsAvailable &plugin);
+ #ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE
+ void onePluginWillBeRemoved(const PluginsAvailable &plugin);
+ #endif
+ void allPluginIsLoaded();
+ void newOptionValue(const QString &group,const QString &name,const QVariant &value);
+ #ifdef ULTRACOPIER_DEBUG
+ void debugInformation(const Ultracopier::DebugLevel &level, const QString& fonction, const QString& text, const QString& file, const int& ligne);
+ #endif // ULTRACOPIER_DEBUG
};
#endif // THEMES_MANAGER_H