summaryrefslogtreecommitdiff
path: root/plugins-alternative/Themes/Teracopy/factory.cpp
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 /plugins-alternative/Themes/Teracopy/factory.cpp
parente297dbd8052ef4e66f069e2dd1865ae7fa8af28e (diff)
New upstream version 1.2.3.6
Diffstat (limited to 'plugins-alternative/Themes/Teracopy/factory.cpp')
-rw-r--r--plugins-alternative/Themes/Teracopy/factory.cpp107
1 files changed, 47 insertions, 60 deletions
diff --git a/plugins-alternative/Themes/Teracopy/factory.cpp b/plugins-alternative/Themes/Teracopy/factory.cpp
index 89c3787..2b176bf 100644
--- a/plugins-alternative/Themes/Teracopy/factory.cpp
+++ b/plugins-alternative/Themes/Teracopy/factory.cpp
@@ -1,83 +1,70 @@
/** \file factory.cpp
\brief Define the factory core
\author alpha_one_x86
-\version 0.3
-\date 2010 */
-
-#include <QtCore>
+*/
#include "factory.h"
-PluginInterface_Themes * Factory::getInstance()
+PluginInterface_Themes * ThemesFactory::getInstance()
{
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
- PluginInterface_Themes * newInterface=new InterfacePlugin(facilityEngine);
- connect(newInterface,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)),this,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)));
- connect(this,SIGNAL(reloadLanguage()),newInterface,SLOT(newLanguageLoaded()));
- return newInterface;
+ ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start");
+ Themes * newInterface=new Themes(facilityEngine);
+ #ifdef ULTRACOPIER_PLUGIN_DEBUG
+ connect(newInterface,&Themes::debugInformation,this,&PluginInterface_ThemesFactory::debugInformation);
+ #endif
+ connect(this,&ThemesFactory::reloadLanguage,newInterface,&Themes::newLanguageLoaded);
+ return newInterface;
}
-void Factory::setResources(OptionInterface *,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityEngine,bool portableVersion)
+void ThemesFactory::setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityInterface,const bool &portableVersion)
{
- this->facilityEngine=facilityEngine;
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start, writePath: "+writePath+", pluginPath: "+pluginPath);
- Q_UNUSED(portableVersion);
+ Q_UNUSED(writePath);
+ Q_UNUSED(pluginPath);
+ this->facilityEngine=facilityInterface;
+ ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, writePath: "+writePath+", pluginPath: "+pluginPath);
+ Q_UNUSED(portableVersion);
+ Q_UNUSED(options);
}
-QWidget * Factory::options()
+QWidget * ThemesFactory::options()
{
- return NULL;
+ return NULL;
}
-void Factory::resetOptions()
+void ThemesFactory::resetOptions()
{
}
-QIcon Factory::getIcon(const QString &fileName)
+QIcon ThemesFactory::getIcon(const QString &fileName) const
{
- if(fileName=="SystemTrayIcon/exit.png")
- {
- QIcon tempIcon=QIcon::fromTheme("application-exit");
- if(!tempIcon.isNull())
- {
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("use substitution ionc for: %1").arg(fileName));
- return tempIcon;
- }
- }
- if(fileName=="SystemTrayIcon/add.png")
- {
- QIcon tempIcon=QIcon::fromTheme("list-add");
- if(!tempIcon.isNull())
- {
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("use substitution ionc for: %1").arg(fileName));
- return tempIcon;
- }
- }
- if(fileName=="SystemTrayIcon/informations.png")
- {
- QIcon tempIcon=QIcon::fromTheme("help-about");
- if(!tempIcon.isNull())
- {
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("use substitution ionc for: %1").arg(fileName));
- return tempIcon;
- }
- }
- if(fileName=="SystemTrayIcon/options.png")
- {
- QIcon tempIcon=QIcon::fromTheme("applications-system");
- if(!tempIcon.isNull())
- {
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("use substitution ionc for: %1").arg(fileName));
- return tempIcon;
- }
- }
- return QIcon(":/resources/"+fileName);
+ if(fileName=="SystemTrayIcon/exit.png")
+ {
+ QIcon tempIcon=QIcon::fromTheme("application-exit");
+ if(!tempIcon.isNull())
+ return tempIcon;
+ }
+ if(fileName=="SystemTrayIcon/add.png")
+ {
+ QIcon tempIcon=QIcon::fromTheme("list-add");
+ if(!tempIcon.isNull())
+ return tempIcon;
+ }
+ if(fileName=="SystemTrayIcon/informations.png")
+ {
+ QIcon tempIcon=QIcon::fromTheme("help-about");
+ if(!tempIcon.isNull())
+ return tempIcon;
+ }
+ if(fileName=="SystemTrayIcon/options.png")
+ {
+ QIcon tempIcon=QIcon::fromTheme("applications-system");
+ if(!tempIcon.isNull())
+ return tempIcon;
+ }
+ return QIcon(":/Themes/Teracopy/resources/"+fileName);
}
-void Factory::newLanguageLoaded()
+void ThemesFactory::newLanguageLoaded()
{
- emit reloadLanguage();
+ emit reloadLanguage();
}
-
-Q_EXPORT_PLUGIN2(interface, Factory);
-