diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-04-05 03:23:38 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-04-05 03:23:52 +0200 |
commit | c0165f8b48852a1aca782d606ba4f1ea48eee6ba (patch) | |
tree | 433441689808ca741889b078407bc49fade746de /tracker-pt/module | |
parent | eb32a2ac02c6d1adcfeb0a1a5522f8aaea442489 (diff) |
modules: now use i18n
Diffstat (limited to 'tracker-pt/module')
-rw-r--r-- | tracker-pt/module/export.hpp | 11 | ||||
-rw-r--r-- | tracker-pt/module/module.cpp | 11 | ||||
-rw-r--r-- | tracker-pt/module/module.hpp | 18 |
3 files changed, 33 insertions, 7 deletions
diff --git a/tracker-pt/module/export.hpp b/tracker-pt/module/export.hpp new file mode 100644 index 00000000..a733c9fe --- /dev/null +++ b/tracker-pt/module/export.hpp @@ -0,0 +1,11 @@ +// generates export.hpp for each module from compat/linkage.hpp + +#pragma once + +#include "compat/linkage-macros.hpp" + +#ifdef BUILD_TRACKER_PT +# define OTR_PT_EXPORT OTR_GENERIC_EXPORT +#else +# define OTR_PT_EXPORT OTR_GENERIC_IMPORT +#endif diff --git a/tracker-pt/module/module.cpp b/tracker-pt/module/module.cpp index 5c298ca5..4731175a 100644 --- a/tracker-pt/module/module.cpp +++ b/tracker-pt/module/module.cpp @@ -1,6 +1,6 @@ #include "ftnoir_tracker_pt.h" -#include "api/plugin-api.hpp" +#include "module.hpp" #include "camera.h" #include "frame.hpp" #include "point_extractor.h" @@ -54,16 +54,13 @@ struct dialog_pt : TrackerDialog_PT dialog_pt(); }; -class metadata_pt : public Metadata -{ - QString name() { return _("PointTracker 1.1"); } - QIcon icon() { return QIcon(":/Resources/Logo_IR.png"); } -}; - // ns pt_module using namespace pt_module; dialog_pt::dialog_pt() : TrackerDialog_PT(module_name) {} +QString metadata_pt::name() { return tr("PointTracker 1.1"); } +QIcon metadata_pt::icon() { return QIcon(":/Resources/Logo_IR.png"); } + OPENTRACK_DECLARE_TRACKER(tracker_pt, dialog_pt, metadata_pt) diff --git a/tracker-pt/module/module.hpp b/tracker-pt/module/module.hpp new file mode 100644 index 00000000..4a2cb919 --- /dev/null +++ b/tracker-pt/module/module.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "api/plugin-api.hpp" +#include <QtGlobal> +#include <QIcon> + +namespace pt_module +{ + +class Q_DECL_EXPORT metadata_pt : public Metadata +{ + Q_OBJECT + + QString name(); + QIcon icon(); +}; + +} // ns pt_module |