summaryrefslogtreecommitdiff
authorharlekin <harlekin>2004-03-01 15:42:38 (UTC)
committer harlekin <harlekin>2004-03-01 15:42:38 (UTC)
commit01abceaeb00bc35fa9bf5792eb51aa70b68f110d (patch) (unidiff)
tree8d67e1f14c2343882ac95befc56deac7267c8ef5
parent7a819ad4bc09aa88521044bfbb06ab37a4c2ef66 (diff)
downloadopie-01abceaeb00bc35fa9bf5792eb51aa70b68f110d.zip
opie-01abceaeb00bc35fa9bf5792eb51aa70b68f110d.tar.gz
opie-01abceaeb00bc35fa9bf5792eb51aa70b68f110d.tar.bz2
fixed opiepim to depend on opiedb2 and also add the forgotten today interface files
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/config.in6
-rw-r--r--libopie2/opiepim/opiepim.pro2
-rw-r--r--libopie2/opiepim/ui/todayconfigwidget.h39
-rw-r--r--libopie2/opiepim/ui/todayplugininterface.h133
4 files changed, 176 insertions, 4 deletions
diff --git a/libopie2/opiepim/config.in b/libopie2/opiepim/config.in
index 79b8f46..f45638a 100644
--- a/libopie2/opiepim/config.in
+++ b/libopie2/opiepim/config.in
@@ -1,7 +1,7 @@
1 config LIBOPIE2PIM 1 config LIBOPIE2PIM
2 boolean "libopie2pim (pim related classes)" 2 boolean "libopie2pim (pim related classes)"
3 default "n" 3 default "n"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2DB
5 comment "libopie2pim needs a libqpe and libopie2core" 5 comment "libopie2pim needs a libqpe and libopie2core and libopie2db"
6 depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE) 6 depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2DB)
7 7
diff --git a/libopie2/opiepim/opiepim.pro b/libopie2/opiepim/opiepim.pro
index 9a34e29..b341819 100644
--- a/libopie2/opiepim/opiepim.pro
+++ b/libopie2/opiepim/opiepim.pro
@@ -1,27 +1,27 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on debug 2CONFIG += qt warn_on debug
3DESTDIR = $(OPIEDIR)/lib 3DESTDIR = $(OPIEDIR)/lib
4HEADERS = opimcontact.h opimcontactfields.h opimrecord.h opimtodo.h opimnotify.h \ 4HEADERS = opimcontact.h opimcontactfields.h opimrecord.h opimtodo.h opimnotify.h \
5 opimnotifymanager.h opimevent.h 5 opimnotifymanager.h opimevent.h
6 6
7SOURCES = opimcontact.cpp opimcontactfields.cpp opimrecord.cpp opimtodo.cpp opimnotify.cpp \ 7SOURCES = opimcontact.cpp opimcontactfields.cpp opimrecord.cpp opimtodo.cpp opimnotify.cpp \
8 opimnotifymanager.cpp opimevent.cpp 8 opimnotifymanager.cpp opimevent.cpp
9INTERFACES = 9INTERFACES =
10TARGET = opiepim2 10TARGET = opiepim2
11VERSION = 1.8.3 11VERSION = 1.8.3
12INCLUDEPATH += $(OPIEDIR)/include 12INCLUDEPATH += $(OPIEDIR)/include
13DEPENDPATH += $(OPIEDIR)/include 13DEPENDPATH += $(OPIEDIR)/include
14LIBS += -lopiecore2 14LIBS += -lopiecore2 -lopiedb2
15 15
16include ( core/core.pro ) 16include ( core/core.pro )
17include ( core/backends/backends.pro ) 17include ( core/backends/backends.pro )
18include ( ui/ui.pro ) 18include ( ui/ui.pro )
19 19
20!contains( platform, x11 ) { 20!contains( platform, x11 ) {
21 include ( $(OPIEDIR)/include.pro ) 21 include ( $(OPIEDIR)/include.pro )
22} 22}
23 23
24contains( platform, x11 ) { 24contains( platform, x11 ) {
25 LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib 25 LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
26} 26}
27 27
diff --git a/libopie2/opiepim/ui/todayconfigwidget.h b/libopie2/opiepim/ui/todayconfigwidget.h
new file mode 100644
index 0000000..f3501a1
--- a/dev/null
+++ b/libopie2/opiepim/ui/todayconfigwidget.h
@@ -0,0 +1,39 @@
1
2#ifndef CONFIG_WIDGET_H
3#define CONFIG_WIDGET_H
4
5
6/**
7 * A base class for all Today Config Widgets.
8 * This will let a Today plugin to add the possibility of configuration.
9 * Plugins need to inherit from this class and need to implement
10 * the pure virtual method to control configuration.
11 * The Plugin should read its configuration during creation of the Widget
12 *
13 *
14 * @author Maximilian Reiß
15 * @short base class of all today config widgets
16 */
17class TodayConfigWidget : public QWidget {
18
19
20public:
21
22 /**
23 * This will construct the widget. The widget gets deleted once the parent
24 * gets deleted as in any Qt application
25 *
26 * @param parent The parent of the widget
27 * @param name The name of the object
28 */
29 TodayConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) {} ;
30 virtual ~TodayConfigWidget() {};
31
32 /**
33 * Plugins need to reimplement this in the config widget
34 * Used when the config dialog is closed to write config stuff
35 */
36 virtual void writeConfig() = 0;
37};
38
39#endif
diff --git a/libopie2/opiepim/ui/todayplugininterface.h b/libopie2/opiepim/ui/todayplugininterface.h
new file mode 100644
index 0000000..5dfeaa8
--- a/dev/null
+++ b/libopie2/opiepim/ui/todayplugininterface.h
@@ -0,0 +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
31
32#ifndef TODAY_PLUGIN_INTERFACE
33#define TODAY_PLUGIN_INTERFACE
34
35#include <qpe/qcom.h>
36#include "todayconfigwidget.h"
37
38class QString;
39class QWidget;
40
41#ifndef IID_TodayPluginInterface
42#define IID_TodayPluginInterface QUuid( 0x70481804, 0x2b50, 0x4fba, 0x80, 0xbb, 0x0b, 0xf8, 0xdc, 0x72, 0x04, 0x14)
43#endif
44
45/**
46 *
47 * A TodayPluginObject is the base for all Today Plugins.
48 * A plugin author needs to inherit this class and implement
49 * the pure virtual methods
50 *
51 * @short base class for today plugins
52 * @author Maximilian Reiss
53 *
54 */
55class TodayPluginObject {
56
57public:
58
59 virtual ~TodayPluginObject() {};
60
61 /**
62 * The name if the plugin
63 * @return The plugin should return its name here
64 */
65 virtual QString pluginName() const = 0;
66
67 /**
68 * Version numbering
69 * @return The plugin should return the version number
70 */
71 virtual double versionNumber() const = 0;
72
73
74 /**
75 * @return the pixmap name widget?! -- FIXME
76 */
77 virtual QString pixmapNameWidget() const = 0;
78
79 /**
80 * widget for the today view
81 * It _needs_ a parent here.
82 * Plugin authors need to take parent as parent!
83 */
84 virtual QWidget* widget( QWidget *parent ) = 0;
85
86 /**
87 * Pixmap used in the config widget
88 */
89 virtual QString pixmapNameConfig() const = 0;
90
91 /**
92 * Config plugin widget - optional
93 * If the plugin has a config widget, it _needs_ a parent here.
94 * may return 0 if no config widget is needed
95 */
96 virtual TodayConfigWidget* configWidget( QWidget * ) = 0;
97
98 /**
99 * The application that should be assigned to the button (pixmap)
100 * Today will show the plugin icon. On click it tries to execute the
101 * plugin related application.
102 */
103 virtual QString appName() const = 0;
104
105
106 /**
107 * If the plugin should take part in the periodic refresh
108 */
109 virtual bool excludeFromRefresh() const = 0;
110
111 /**
112 * Refresh that plugins view. For updating the plugins
113 */
114 virtual void refresh() {};
115
116 /**
117 * reread the plugins config and act apropiate
118 * This is for example used when returning from the config dialog
119 */
120 virtual void reinitialize() {};
121};
122
123/**
124 * This is part of the QCOM works. See example plugins how to do it right
125 */
126struct TodayPluginInterface : public QUnknownInterface {
127 /**
128 * return the TodayPluginObject implementation
129 */
130 virtual TodayPluginObject *guiPart() = 0;
131};
132
133#endif