summaryrefslogtreecommitdiff
path: root/libopie/todayplugininterface.h
Unidiff
Diffstat (limited to 'libopie/todayplugininterface.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/todayplugininterface.h42
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,109 +1,133 @@
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
8class QString; 38class QString;
9class QWidget; 39class 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 */
25class TodayPluginObject { 55class TodayPluginObject {
26 56
27public: 57public:
28 58
29 virtual ~TodayPluginObject() {}; 59 virtual ~TodayPluginObject() {};
30 60
31 /** 61 /**
32 * The name if the plugin 62 * The name if the plugin
33 * @return The plugin should return its name here 63 * @return The plugin should return its name here
34 */ 64 */
35 virtual QString pluginName() const = 0; 65 virtual QString pluginName() const = 0;
36 66
37 /** 67 /**
38 * Version numbering 68 * Version numbering
39 * @return The plugin should return the version number 69 * @return The plugin should return the version number
40 */ 70 */
41 virtual double versionNumber() const = 0; 71 virtual double versionNumber() const = 0;
42 72
43 73
44 /** 74 /**
45 * @return the pixmap name widget?! -- FIXME 75 * @return the pixmap name widget?! -- FIXME
46 */ 76 */
47 virtual QString pixmapNameWidget() const = 0; 77 virtual QString pixmapNameWidget() const = 0;
48 78
49 /** 79 /**
50 * widget for the today view 80 * widget for the today view
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 */
102struct TodayPluginInterface : public QUnknownInterface { 126struct 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