Changeset View
Changeset View
Standalone View
Standalone View
libs/widgetutils/kis_spin_box_unit_manager.h
Show All 18 Lines | |||||
19 | #ifndef KISSPINBOXUNITMANAGER_H | 19 | #ifndef KISSPINBOXUNITMANAGER_H | ||
20 | #define KISSPINBOXUNITMANAGER_H | 20 | #define KISSPINBOXUNITMANAGER_H | ||
21 | 21 | | |||
22 | #include <QObject> | 22 | #include <QObject> | ||
23 | #include <QStringList> | 23 | #include <QStringList> | ||
24 | 24 | | |||
25 | #include "kritawidgetutils_export.h" | 25 | #include "kritawidgetutils_export.h" | ||
26 | 26 | | |||
27 | class KisSpinBoxUnitManager; | ||||
28 | class KisSpinBoxUnitManagerBuilder; | ||||
29 | class KisSpinBoxUnitManagerFactory; | ||||
30 | | ||||
31 | class KRITAWIDGETUTILS_EXPORT KisSpinBoxUnitManagerFactory | ||||
32 | { | ||||
33 | public: | ||||
34 | | ||||
35 | static KisSpinBoxUnitManager* buildDefaultUnitManager(QObject* parent); | ||||
36 | //! \brief set a builder the factory can use. The factory should take on the lifecycle of the builder, so to delete it call clearUnitManagerBuilder(); | ||||
37 | static void setDefaultUnitManagerBuilder(KisSpinBoxUnitManagerBuilder* pBuilder); | ||||
38 | static void clearUnitManagerBuilder(); | ||||
39 | | ||||
40 | private: | ||||
41 | | ||||
42 | static KisSpinBoxUnitManagerBuilder* builder; | ||||
43 | | ||||
44 | }; | ||||
45 | | ||||
46 | class KRITAWIDGETUTILS_EXPORT KisSpinBoxUnitManagerBuilder | ||||
47 | { | ||||
48 | | ||||
49 | public: | ||||
50 | | ||||
51 | virtual KisSpinBoxUnitManager* buildUnitManager(QObject* parent) = 0; //this pure virtual function is used to build a unitmanager, it will be used by the unitManagerFactory. | ||||
52 | }; | ||||
27 | 53 | | |||
28 | /** | 54 | /** | ||
29 | * @brief The KisSpinBoxUnitManager class is an abstract interface for the unitspinboxes classes to manage different type of units. | 55 | * @brief The KisSpinBoxUnitManager class is an abstract interface for the unitspinboxes classes to manage different type of units. | ||
30 | * | 56 | * | ||
31 | * The class make a difference between unit dimension (distance, angle, time). | 57 | * The class make a difference between unit dimension (distance, angle, time). | ||
32 | * | 58 | * | ||
33 | * The class allow to converte values between reference unit and apparent unit, but also to get other information like possible units symbols. | 59 | * The class allow to converte values between reference unit and apparent unit, but also to get other information like possible units symbols. | ||
34 | * | 60 | * | ||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |