Diffstat (limited to 'libopie/todayplugininterface.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/todayplugininterface.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libopie/todayplugininterface.h b/libopie/todayplugininterface.h index 29a12bc..532f492 100644 --- a/libopie/todayplugininterface.h +++ b/libopie/todayplugininterface.h | |||
@@ -1,106 +1,109 @@ | |||
1 | 1 | ||
2 | #ifndef TODAY_PLUGIN_INTERFACE | 2 | #ifndef TODAY_PLUGIN_INTERFACE |
3 | #define TODAY_PLUGIN_INTERFACE | 3 | #define TODAY_PLUGIN_INTERFACE |
4 | 4 | ||
5 | #include <qpe/qcom.h> | 5 | #include <qpe/qcom.h> |
6 | #include "todayconfigwidget.h" | 6 | #include "todayconfigwidget.h" |
7 | 7 | ||
8 | class QString; | 8 | class QString; |
9 | class QWidget; | 9 | class QWidget; |
10 | 10 | ||
11 | #ifndef IID_TodayPluginInterface | 11 | #ifndef IID_TodayPluginInterface |
12 | #define IID_TodayPluginInterface QUuid( 0x70481804, 0x2b50, 0x4fba, 0x80, 0xbb, 0x0b, 0xf8, 0xdc, 0x72, 0x04, 0x14) | 12 | #define IID_TodayPluginInterface QUuid( 0x70481804, 0x2b50, 0x4fba, 0x80, 0xbb, 0x0b, 0xf8, 0xdc, 0x72, 0x04, 0x14) |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | /** | 15 | /** |
16 | * | 16 | * |
17 | * A TodayPluginObject is the base for all Today Plugins. | 17 | * A TodayPluginObject is the base for all Today Plugins. |
18 | * A plugin author needs to inherit this class and implement | 18 | * A plugin author needs to inherit this class and implement |
19 | * the pure virtual methods | 19 | * the pure virtual methods |
20 | * | 20 | * |
21 | * @short base class for today plugins | 21 | * @short base class for today plugins |
22 | * @author Maximilian Reiss | 22 | * @author Maximilian Reiss |
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | class TodayPluginObject { | 25 | class TodayPluginObject { |
26 | 26 | ||
27 | public: | 27 | public: |
28 | 28 | ||
29 | virtual ~TodayPluginObject() {}; | 29 | virtual ~TodayPluginObject() {}; |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * The name if the plugin | 32 | * The name if the plugin |
33 | * @return The plugin should return its name here | 33 | * @return The plugin should return its name here |
34 | */ | 34 | */ |
35 | virtual QString pluginName() const = 0; | 35 | virtual QString pluginName() const = 0; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * Version numbering | 38 | * Version numbering |
39 | * @return The plugin should return the version number | 39 | * @return The plugin should return the version number |
40 | */ | 40 | */ |
41 | virtual double versionNumber() const = 0; | 41 | virtual double versionNumber() const = 0; |
42 | 42 | ||
43 | 43 | ||
44 | /** | 44 | /** |
45 | * @return the pixmap name widget?! -- FIXME | 45 | * @return the pixmap name widget?! -- FIXME |
46 | */ | 46 | */ |
47 | virtual QString pixmapNameWidget() const = 0; | 47 | virtual QString pixmapNameWidget() const = 0; |
48 | 48 | ||
49 | /** | 49 | /** |
50 | * widget for the today view | 50 | * widget for the today view |
51 | * It _needs_ a parent here. | 51 | * It _needs_ a parent here. |
52 | * Plugin authors need to take parent as parent! | 52 | * Plugin authors need to take parent as parent! |
53 | */ | 53 | */ |
54 | virtual QWidget* widget( QWidget *parent ) = 0; | 54 | virtual QWidget* widget( QWidget *parent ) = 0; |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * Pixmap used in the config widget | 57 | * Pixmap used in the config widget |
58 | */ | 58 | */ |
59 | virtual QString pixmapNameConfig() const = 0; | 59 | virtual QString pixmapNameConfig() const = 0; |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Config plugin widget - optional | 62 | * Config plugin widget - optional |
63 | * If the plugin has a config widget, it _needs_ a parent here. | 63 | * If the plugin has a config widget, it _needs_ a parent here. |
64 | * may return 0 if no config widget is needed | 64 | * may return 0 if no config widget is needed |
65 | */ | 65 | */ |
66 | virtual TodayConfigWidget* configWidget( QWidget * ) = 0; | 66 | virtual TodayConfigWidget* configWidget( QWidget * ) = 0; |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * The application that should be assigned to the button (pixmap) | 69 | * The application that should be assigned to the button (pixmap) |
70 | * Today will show the plugin icon. On click it tries to execute the | 70 | * Today will show the plugin icon. On click it tries to execute the |
71 | * plugin related application. | 71 | * plugin related application. |
72 | */ | 72 | */ |
73 | virtual QString appName() const = 0; | 73 | virtual QString appName() const = 0; |
74 | 74 | ||
75 | 75 | ||
76 | /** | 76 | /** |
77 | * If the plugin should take part in the periodic refresh | 77 | * If the plugin should take part in the periodic refresh |
78 | */ | 78 | */ |
79 | virtual bool excludeFromRefresh() const = 0; | 79 | virtual bool excludeFromRefresh() const = 0; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * Refresh that plugins view. For updating the plugins | 82 | * Refresh that plugins view. For updating the plugins |
83 | * | 83 | * |
84 | */ | 84 | */ |
85 | virtual void refresh() {}; | 85 | virtual void refresh() {}; |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * minimum height the plugin at least should have | 88 | * minimum height the plugin at least should have |
89 | */ | 89 | */ |
90 | // virtual int minHeight() const = 0; | 90 | // virtual int minHeight() const = 0; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * maximum height that should be used before starting scrolling | 93 | * maximum height that should be used before starting scrolling |
94 | */ | 94 | */ |
95 | // virtual int maxHeight() const = 0; | 95 | // virtual int maxHeight() const = 0; |
96 | 96 | ||
97 | }; | 97 | }; |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * This is part of the QCOM works. See example plugins how to do it right | 100 | * This is part of the QCOM works. See example plugins how to do it right |
101 | */ | 101 | */ |
102 | struct TodayPluginInterface : public QUnknownInterface { | 102 | struct TodayPluginInterface : public QUnknownInterface { |
103 | /** | ||
104 | * return the TodayPluginObject implementation | ||
105 | */ | ||
103 | virtual TodayPluginObject *guiPart() = 0; | 106 | virtual TodayPluginObject *guiPart() = 0; |
104 | }; | 107 | }; |
105 | 108 | ||
106 | #endif | 109 | #endif |