author | harlekin <harlekin> | 2002-09-22 23:00:48 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-09-22 23:00:48 (UTC) |
commit | 452a124385fbc8162e03ee6cc9020ebeb2133a7f (patch) (unidiff) | |
tree | bbd5264d551ecf3652bf1b7e3ea3754b9d0ccde2 /libopie | |
parent | a26d188b7b91f9bdce1e6a44c40ce874cd50abde (diff) | |
download | opie-452a124385fbc8162e03ee6cc9020ebeb2133a7f.zip opie-452a124385fbc8162e03ee6cc9020ebeb2133a7f.tar.gz opie-452a124385fbc8162e03ee6cc9020ebeb2133a7f.tar.bz2 |
interfaces now in libopie
-rw-r--r-- | libopie/todayconfigwidget.h | 21 | ||||
-rw-r--r-- | libopie/todayplugininterface.h | 79 |
2 files changed, 100 insertions, 0 deletions
diff --git a/libopie/todayconfigwidget.h b/libopie/todayconfigwidget.h new file mode 100644 index 0000000..48cf379 --- a/dev/null +++ b/libopie/todayconfigwidget.h | |||
@@ -0,0 +1,21 @@ | |||
1 | |||
2 | #ifndef CONFIG_WIDGET_H | ||
3 | #define CONFIG_WIDGET_H | ||
4 | |||
5 | |||
6 | class TodayConfigWidget : public QWidget { | ||
7 | |||
8 | |||
9 | public: | ||
10 | |||
11 | TodayConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) {} ; | ||
12 | virtual ~TodayConfigWidget() {}; | ||
13 | |||
14 | /** | ||
15 | * Plugins need to reimplement this in the config widget | ||
16 | * Used when the config dialog is closed to write config stuff | ||
17 | */ | ||
18 | virtual void writeConfig() = 0; | ||
19 | }; | ||
20 | |||
21 | #endif | ||
diff --git a/libopie/todayplugininterface.h b/libopie/todayplugininterface.h new file mode 100644 index 0000000..becb79c --- a/dev/null +++ b/libopie/todayplugininterface.h | |||
@@ -0,0 +1,79 @@ | |||
1 | |||
2 | #ifndef TODAY_PLUGIN_INTERFACE | ||
3 | #define TODAY_PLUGIN_INTERFACE | ||
4 | |||
5 | #include <qpe/qcom.h> | ||
6 | #include "todayconfigwidget.h" | ||
7 | |||
8 | class QString; | ||
9 | class QWidget; | ||
10 | |||
11 | #ifndef IID_TodayPluginInterface | ||
12 | #define IID_TodayPluginInterface QUuid( 0x70481804, 0x2b50, 0x4fba, 0x80, 0xbb, 0x0b, 0xf8, 0xdc, 0x72, 0x04, 0x14) | ||
13 | #endif | ||
14 | |||
15 | /** | ||
16 | * | ||
17 | * | ||
18 | * | ||
19 | */ | ||
20 | class TodayPluginObject { | ||
21 | |||
22 | Q_OBJECT | ||
23 | |||
24 | public: | ||
25 | |||
26 | virtual ~TodayPluginObject() {}; | ||
27 | |||
28 | /** | ||
29 | * The name if the plugin | ||
30 | */ | ||
31 | virtual QString pluginName() const = 0; | ||
32 | |||
33 | /** | ||
34 | * Version numbering | ||
35 | */ | ||
36 | virtual double versionNumber() const = 0; | ||
37 | |||
38 | |||
39 | virtual QString pixmapNameWidget() const = 0; | ||
40 | |||
41 | /** widget for the today view | ||
42 | * It _needs_ a parent here. | ||
43 | */ | ||
44 | virtual QWidget* widget( QWidget * ) = 0; | ||
45 | |||
46 | /** | ||
47 | * Pixmap used in the config widget | ||
48 | */ | ||
49 | virtual QString pixmapNameConfig() const = 0; | ||
50 | |||
51 | /** | ||
52 | * Config plugin widget - optional | ||
53 | * If the plugin has a config widget, it _needs_ a parent here. | ||
54 | */ | ||
55 | virtual TodayConfigWidget* configWidget( QWidget * ) = 0; | ||
56 | |||
57 | /** | ||
58 | * The application that should be assigned to the button (pixmap) | ||
59 | */ | ||
60 | virtual QString appName() const = 0; | ||
61 | |||
62 | /** | ||
63 | * minimum height the plugin at least should have | ||
64 | */ | ||
65 | // virtual int minHeight() const = 0; | ||
66 | |||
67 | /** | ||
68 | * maximum height that should be used before starting scrolling | ||
69 | */ | ||
70 | // virtual int maxHeight() const = 0; | ||
71 | |||
72 | }; | ||
73 | |||
74 | |||
75 | struct TodayPluginInterface : public QUnknownInterface { | ||
76 | virtual TodayPluginObject *guiPart() = 0; | ||
77 | }; | ||
78 | |||
79 | #endif | ||