author | eilers <eilers> | 2003-08-08 15:09:29 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-08-08 15:09:29 (UTC) |
commit | b87b33dc1f6e8e1276a7035ab7a3e53b8ed4bd16 (patch) (unidiff) | |
tree | b0f96db67cfb1b9d2476530ecec9a2ba6eacbab1 /libopie/todayplugininterface.h | |
parent | 14d394e6c107b037a09a31a92605034fe50f7813 (diff) | |
download | opie-b87b33dc1f6e8e1276a7035ab7a3e53b8ed4bd16.zip opie-b87b33dc1f6e8e1276a7035ab7a3e53b8ed4bd16.tar.gz opie-b87b33dc1f6e8e1276a7035ab7a3e53b8ed4bd16.tar.bz2 |
Merging all changes from BRANCH_1_0.
Diffstat (limited to 'libopie/todayplugininterface.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/todayplugininterface.h | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/libopie/todayplugininterface.h b/libopie/todayplugininterface.h index 532f492..5dfeaa8 100644 --- a/libopie/todayplugininterface.h +++ b/libopie/todayplugininterface.h | |||
@@ -1,32 +1,62 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | Copyright (c) 2002 Maximilian Reiss <max.reiss@gmx.de> | ||
4 | =. | ||
5 | .=l. | ||
6 | .>+-= | ||
7 | _;:, .> :=|. This program is free software; you can | ||
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This program is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
19 | ..}^=.= = ; Library General Public License for more | ||
20 | ++= -. .` .: details. | ||
21 | : = ...= . :.=- | ||
22 | -. .:....=;==+<; You should have received a copy of the GNU | ||
23 | -_. . . )=. = Library General Public License along with | ||
24 | -- :-=` this library; see the file COPYING.LIB. | ||
25 | If not, write to the Free Software Foundation, | ||
26 | Inc., 59 Temple Place - Suite 330, | ||
27 | Boston, MA 02111-1307, USA. | ||
28 | |||
29 | */ | ||
30 | |||
1 | 31 | ||
2 | #ifndef TODAY_PLUGIN_INTERFACE | 32 | #ifndef TODAY_PLUGIN_INTERFACE |
3 | #define TODAY_PLUGIN_INTERFACE | 33 | #define TODAY_PLUGIN_INTERFACE |
4 | 34 | ||
5 | #include <qpe/qcom.h> | 35 | #include <qpe/qcom.h> |
6 | #include "todayconfigwidget.h" | 36 | #include "todayconfigwidget.h" |
7 | 37 | ||
8 | class QString; | 38 | class QString; |
9 | class QWidget; | 39 | class QWidget; |
10 | 40 | ||
11 | #ifndef IID_TodayPluginInterface | 41 | #ifndef IID_TodayPluginInterface |
12 | #define IID_TodayPluginInterface QUuid( 0x70481804, 0x2b50, 0x4fba, 0x80, 0xbb, 0x0b, 0xf8, 0xdc, 0x72, 0x04, 0x14) | 42 | #define IID_TodayPluginInterface QUuid( 0x70481804, 0x2b50, 0x4fba, 0x80, 0xbb, 0x0b, 0xf8, 0xdc, 0x72, 0x04, 0x14) |
13 | #endif | 43 | #endif |
14 | 44 | ||
15 | /** | 45 | /** |
16 | * | 46 | * |
17 | * A TodayPluginObject is the base for all Today Plugins. | 47 | * A TodayPluginObject is the base for all Today Plugins. |
18 | * A plugin author needs to inherit this class and implement | 48 | * A plugin author needs to inherit this class and implement |
19 | * the pure virtual methods | 49 | * the pure virtual methods |
20 | * | 50 | * |
21 | * @short base class for today plugins | 51 | * @short base class for today plugins |
22 | * @author Maximilian Reiss | 52 | * @author Maximilian Reiss |
23 | * | 53 | * |
24 | */ | 54 | */ |
25 | class TodayPluginObject { | 55 | class TodayPluginObject { |
26 | 56 | ||
27 | public: | 57 | public: |
28 | 58 | ||
29 | virtual ~TodayPluginObject() {}; | 59 | virtual ~TodayPluginObject() {}; |
30 | 60 | ||
31 | /** | 61 | /** |
32 | * The name if the plugin | 62 | * The name if the plugin |
@@ -51,59 +81,53 @@ public: | |||
51 | * It _needs_ a parent here. | 81 | * It _needs_ a parent here. |
52 | * Plugin authors need to take parent as parent! | 82 | * Plugin authors need to take parent as parent! |
53 | */ | 83 | */ |
54 | virtual QWidget* widget( QWidget *parent ) = 0; | 84 | virtual QWidget* widget( QWidget *parent ) = 0; |
55 | 85 | ||
56 | /** | 86 | /** |
57 | * Pixmap used in the config widget | 87 | * Pixmap used in the config widget |
58 | */ | 88 | */ |
59 | virtual QString pixmapNameConfig() const = 0; | 89 | virtual QString pixmapNameConfig() const = 0; |
60 | 90 | ||
61 | /** | 91 | /** |
62 | * Config plugin widget - optional | 92 | * Config plugin widget - optional |
63 | * If the plugin has a config widget, it _needs_ a parent here. | 93 | * If the plugin has a config widget, it _needs_ a parent here. |
64 | * may return 0 if no config widget is needed | 94 | * may return 0 if no config widget is needed |
65 | */ | 95 | */ |
66 | virtual TodayConfigWidget* configWidget( QWidget * ) = 0; | 96 | virtual TodayConfigWidget* configWidget( QWidget * ) = 0; |
67 | 97 | ||
68 | /** | 98 | /** |
69 | * The application that should be assigned to the button (pixmap) | 99 | * The application that should be assigned to the button (pixmap) |
70 | * Today will show the plugin icon. On click it tries to execute the | 100 | * Today will show the plugin icon. On click it tries to execute the |
71 | * plugin related application. | 101 | * plugin related application. |
72 | */ | 102 | */ |
73 | virtual QString appName() const = 0; | 103 | virtual QString appName() const = 0; |
74 | 104 | ||
75 | 105 | ||
76 | /** | 106 | /** |
77 | * If the plugin should take part in the periodic refresh | 107 | * If the plugin should take part in the periodic refresh |
78 | */ | 108 | */ |
79 | virtual bool excludeFromRefresh() const = 0; | 109 | virtual bool excludeFromRefresh() const = 0; |
80 | 110 | ||
81 | /** | 111 | /** |
82 | * Refresh that plugins view. For updating the plugins | 112 | * Refresh that plugins view. For updating the plugins |
83 | * | ||
84 | */ | 113 | */ |
85 | virtual void refresh() {}; | 114 | virtual void refresh() {}; |
86 | 115 | ||
87 | /** | 116 | /** |
88 | * minimum height the plugin at least should have | 117 | * reread the plugins config and act apropiate |
118 | * This is for example used when returning from the config dialog | ||
89 | */ | 119 | */ |
90 | // virtual int minHeight() const = 0; | 120 | virtual void reinitialize() {}; |
91 | |||
92 | /** | ||
93 | * maximum height that should be used before starting scrolling | ||
94 | */ | ||
95 | // virtual int maxHeight() const = 0; | ||
96 | |||
97 | }; | 121 | }; |
98 | 122 | ||
99 | /** | 123 | /** |
100 | * This is part of the QCOM works. See example plugins how to do it right | 124 | * This is part of the QCOM works. See example plugins how to do it right |
101 | */ | 125 | */ |
102 | struct TodayPluginInterface : public QUnknownInterface { | 126 | struct TodayPluginInterface : public QUnknownInterface { |
103 | /** | 127 | /** |
104 | * return the TodayPluginObject implementation | 128 | * return the TodayPluginObject implementation |
105 | */ | 129 | */ |
106 | virtual TodayPluginObject *guiPart() = 0; | 130 | virtual TodayPluginObject *guiPart() = 0; |
107 | }; | 131 | }; |
108 | 132 | ||
109 | #endif | 133 | #endif |