summaryrefslogtreecommitdiff
path: root/FacilityEngine.h
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2013-01-04 14:50:19 +0100
committerThomas Preud'homme <robotux@celest.fr>2013-01-04 14:50:19 +0100
commit8f9f382e1c97cab2e72e97495650c73ac4b97314 (patch)
tree78510a0d81368c09b56f444fb19bb132c8bc3009 /FacilityEngine.h
Imported Upstream version 0.3.0.5
Diffstat (limited to 'FacilityEngine.h')
-rw-r--r--FacilityEngine.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/FacilityEngine.h b/FacilityEngine.h
new file mode 100644
index 0000000..221f801
--- /dev/null
+++ b/FacilityEngine.h
@@ -0,0 +1,70 @@
+/** \file FacilityEngine.h
+\brief To implement the facility engine, the interface is defined into FacilityInterface()
+\see FacilityInterface()
+\author alpha_one_x86
+\version 0.3
+\date 2010
+\licence GPL3, see the file COPYING */
+
+#ifndef FACILITYENGINE_H
+#define FACILITYENGINE_H
+
+#include <QVariant>
+#include <QString>
+#include <QStringList>
+
+#include "interface/FacilityInterface.h"
+#include "Environment.h"
+
+/** \brief Class to group general function for the plugin
+
+This class is used into some plugin like copy engine plugin, to all into one place all common function, group the traduction, and all what it can grouped across all plugin into Ultracopier core application.
+*/
+class FacilityEngine : public FacilityInterface
+{
+ Q_OBJECT
+public:
+ explicit FacilityEngine();
+ /// \brief convert size in Byte to String
+ QString sizeToString(const double &size);
+ /// \brief convert size unit to String
+ QString sizeUnitToString(const SizeUnit &sizeUnit);
+ /// \brief translate the text
+ QString translateText(const QString &text);
+ /// \brief speed to string in byte per seconds
+ QString speedToString(const double &speed);
+ /// \brief Decompose the time in second
+ TimeDecomposition secondsToTimeDecomposition(const quint32 &seconds);
+ /// \brief have the fonctionnality
+ bool haveFunctionality(const QString &fonctionnality);
+ /// \brief call the fonctionnality
+ QVariant callFunctionality(const QString &fonctionnality,const QStringList &args=QStringList());
+private:
+ //translated string
+ QString Translation_Copy_engine;
+ QString Translation_Copy;
+ QString Translation_Move;
+ QString Translation_Pause;
+ QString Translation_Resume;
+ QString Translation_Skip;
+ QString Translation_Unlimited;
+ //undirect translated string
+ QString Translation_perSecond;
+ QString Translation_tooBig;
+ QString Translation_B;
+ QString Translation_KB;
+ QString Translation_MB;
+ QString Translation_GB;
+ QString Translation_TB;
+ QString Translation_PB;
+ QString Translation_EB;
+ QString Translation_ZB;
+ QString Translation_YB;
+ //internal fonction
+ QString adaptString(const float &nb);
+public slots:
+ /// \brief To force the text re-translation
+ void retranslate();
+};
+
+#endif // FACILITYENGINE_H