author | harlekin <harlekin> | 2002-10-05 20:46:18 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-05 20:46:18 (UTC) |
commit | d7f9d00fcc9261db9c4af4f1b4afde9d50e8a2a2 (patch) (unidiff) | |
tree | 3afa0409bea98ca92ebfa269485f0845b3c96b6a /core/pim | |
parent | ab196dbed05f9e534709a9c0b7f44eca65a72929 (diff) | |
download | opie-d7f9d00fcc9261db9c4af4f1b4afde9d50e8a2a2.zip opie-d7f9d00fcc9261db9c4af4f1b4afde9d50e8a2a2.tar.gz opie-d7f9d00fcc9261db9c4af4f1b4afde9d50e8a2a2.tar.bz2 |
buttons resizable and clickable again
-rw-r--r-- | core/pim/today/changelog | 4 | ||||
-rw-r--r-- | core/pim/today/opie-today.control | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.cpp | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.cpp | 6 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.cpp | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginwidget.cpp | 0 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 12 | ||||
-rw-r--r-- | core/pim/today/today.h | 6 | ||||
-rw-r--r-- | core/pim/today/todayconfig.cpp | 18 | ||||
-rw-r--r-- | core/pim/today/todayconfig.h | 2 |
10 files changed, 45 insertions, 13 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog index 5fd3284..25d63ef 100644 --- a/core/pim/today/changelog +++ b/core/pim/today/changelog | |||
@@ -1,12 +1,16 @@ | |||
1 | 0.5.1 | ||
2 | |||
3 | * icons scalable and clickable again | ||
4 | |||
1 | 0.5 | 5 | 0.5 |
2 | 6 | ||
3 | * now fully plugin based | 7 | * now fully plugin based |
4 | 8 | ||
5 | 0.3.4 | 9 | 0.3.4 |
6 | 10 | ||
7 | * "fill our business card now a clickable label" | 11 | * "fill our business card now a clickable label" |
8 | * Several bugfixes regarding todo section. | 12 | * Several bugfixes regarding todo section. |
9 | 13 | ||
10 | 0.3.3 | 14 | 0.3.3 |
11 | 15 | ||
12 | * Changed the logo so it better scales to bigger display and also | 16 | * Changed the logo so it better scales to bigger display and also |
diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control index 6ea5090..28087f9 100644 --- a/core/pim/today/opie-today.control +++ b/core/pim/today/opie-today.control | |||
@@ -1,16 +1,16 @@ | |||
1 | Files: bin/today apps/1Pim/today.desktop pics/today/* | 1 | Files: bin/today apps/1Pim/today.desktop pics/today/* |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/applications | 3 | Section: opie/applications |
4 | Maintainer: Maximilian Reiß <harlekin@handhelds.org> | 4 | Maintainer: Maximilian Reiß <harlekin@handhelds.org> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: 0.5-$SUB_VERSION | 6 | Version: 0.5.1-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) |
8 | License: GPL | 8 | License: GPL |
9 | Description: today screen | 9 | Description: today screen |
10 | This today screen app gives an overview of appointments | 10 | This today screen app gives an overview of appointments |
11 | and todos. | 11 | and todos. |
12 | It also shows incoming and outgoing mails from opiemail. | 12 | It also shows incoming and outgoing mails from opiemail. |
13 | When using Opie (opie.handhelds.org) today can be autostarted | 13 | When using Opie (opie.handhelds.org) today can be autostarted |
14 | on resume. | 14 | on resume. |
15 | It is highly configurable. | 15 | It is highly configurable. |
16 | 16 | ||
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp index 4ebb178..cacdb65 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.cpp +++ b/core/pim/today/plugins/datebook/datebookplugin.cpp | |||
@@ -21,39 +21,39 @@ | |||
21 | #include "datebookplugin.h" | 21 | #include "datebookplugin.h" |
22 | #include "datebookpluginwidget.h" | 22 | #include "datebookpluginwidget.h" |
23 | #include "datebookpluginconfig.h" | 23 | #include "datebookpluginconfig.h" |
24 | 24 | ||
25 | 25 | ||
26 | DatebookPlugin::DatebookPlugin() { | 26 | DatebookPlugin::DatebookPlugin() { |
27 | } | 27 | } |
28 | 28 | ||
29 | DatebookPlugin::~DatebookPlugin() { | 29 | DatebookPlugin::~DatebookPlugin() { |
30 | } | 30 | } |
31 | 31 | ||
32 | QString DatebookPlugin::pluginName() const { | 32 | QString DatebookPlugin::pluginName() const { |
33 | return "Datebook plugin"; | 33 | return QObject::tr( "Datebook plugin"); |
34 | } | 34 | } |
35 | 35 | ||
36 | double DatebookPlugin::versionNumber() const { | 36 | double DatebookPlugin::versionNumber() const { |
37 | return 1.0; | 37 | return 1.0; |
38 | } | 38 | } |
39 | 39 | ||
40 | QString DatebookPlugin::pixmapNameWidget() const { | 40 | QString DatebookPlugin::pixmapNameWidget() const { |
41 | return "DateBook"; | 41 | return "DateBook"; |
42 | } | 42 | } |
43 | 43 | ||
44 | QWidget* DatebookPlugin::widget( QWidget* wid ) { | 44 | QWidget* DatebookPlugin::widget( QWidget* wid ) { |
45 | return new DatebookPluginWidget( wid, "Datebook" ); | 45 | return new DatebookPluginWidget( wid, "Datebook" ); |
46 | } | 46 | } |
47 | 47 | ||
48 | QString DatebookPlugin::pixmapNameConfig() const { | 48 | QString DatebookPlugin::pixmapNameConfig() const { |
49 | return "DateBook"; | 49 | return "DateBook"; |
50 | } | 50 | } |
51 | 51 | ||
52 | TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) { | 52 | TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) { |
53 | return new DatebookPluginConfig( wid , "Datebook" ); | 53 | return new DatebookPluginConfig( wid , "Datebook" ); |
54 | } | 54 | } |
55 | 55 | ||
56 | QString DatebookPlugin::appName() const { | 56 | QString DatebookPlugin::appName() const { |
57 | return QObject::tr( "Datebook" ); | 57 | return "datebook"; |
58 | } | 58 | } |
59 | 59 | ||
diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp index 3ddf16e..1c90df4 100644 --- a/core/pim/today/plugins/mail/mailplugin.cpp +++ b/core/pim/today/plugins/mail/mailplugin.cpp | |||
@@ -17,40 +17,40 @@ | |||
17 | 17 | ||
18 | #include "mailplugin.h" | 18 | #include "mailplugin.h" |
19 | #include "mailpluginwidget.h" | 19 | #include "mailpluginwidget.h" |
20 | 20 | ||
21 | 21 | ||
22 | MailPlugin::MailPlugin() { | 22 | MailPlugin::MailPlugin() { |
23 | } | 23 | } |
24 | 24 | ||
25 | MailPlugin::~MailPlugin() { | 25 | MailPlugin::~MailPlugin() { |
26 | } | 26 | } |
27 | 27 | ||
28 | QString MailPlugin::pluginName() const { | 28 | QString MailPlugin::pluginName() const { |
29 | return "Mail plugin"; | 29 | return QObject::tr( "Mail plugin" ); |
30 | } | 30 | } |
31 | 31 | ||
32 | double MailPlugin::versionNumber() const { | 32 | double MailPlugin::versionNumber() const { |
33 | return 0.5; | 33 | return 0.6; |
34 | } | 34 | } |
35 | 35 | ||
36 | QString MailPlugin::pixmapNameWidget() const { | 36 | QString MailPlugin::pixmapNameWidget() const { |
37 | return "mail/desktopicon"; | 37 | return "mail/desktopicon"; |
38 | } | 38 | } |
39 | 39 | ||
40 | QWidget* MailPlugin::widget( QWidget * wid ) { | 40 | QWidget* MailPlugin::widget( QWidget * wid ) { |
41 | return new MailPluginWidget( wid, "Mail" ); | 41 | return new MailPluginWidget( wid, "Mail" ); |
42 | } | 42 | } |
43 | 43 | ||
44 | QString MailPlugin::pixmapNameConfig() const { | 44 | QString MailPlugin::pixmapNameConfig() const { |
45 | return 0l; | 45 | return 0l; |
46 | } | 46 | } |
47 | 47 | ||
48 | TodayConfigWidget* MailPlugin::configWidget( QWidget* wid ) { | 48 | TodayConfigWidget* MailPlugin::configWidget( QWidget* wid ) { |
49 | return 0l; | 49 | return 0l; |
50 | } | 50 | } |
51 | 51 | ||
52 | QString MailPlugin::appName() const { | 52 | QString MailPlugin::appName() const { |
53 | return "Mail"; | 53 | return "mail"; |
54 | } | 54 | } |
55 | 55 | ||
56 | 56 | ||
diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp index 19d9f37..09b54af 100644 --- a/core/pim/today/plugins/todolist/todoplugin.cpp +++ b/core/pim/today/plugins/todolist/todoplugin.cpp | |||
@@ -19,40 +19,40 @@ | |||
19 | #include "todoplugin.h" | 19 | #include "todoplugin.h" |
20 | #include "todopluginconfig.h" | 20 | #include "todopluginconfig.h" |
21 | #include "todopluginwidget.h" | 21 | #include "todopluginwidget.h" |
22 | 22 | ||
23 | 23 | ||
24 | TodolistPlugin::TodolistPlugin() { | 24 | TodolistPlugin::TodolistPlugin() { |
25 | } | 25 | } |
26 | 26 | ||
27 | TodolistPlugin::~TodolistPlugin() { | 27 | TodolistPlugin::~TodolistPlugin() { |
28 | } | 28 | } |
29 | 29 | ||
30 | QString TodolistPlugin::pluginName() const { | 30 | QString TodolistPlugin::pluginName() const { |
31 | return "Todolist plugin"; | 31 | return QObject::tr( "Todolist plugin" ); |
32 | } | 32 | } |
33 | 33 | ||
34 | double TodolistPlugin::versionNumber() const { | 34 | double TodolistPlugin::versionNumber() const { |
35 | return 0.7; | 35 | return 0.7; |
36 | } | 36 | } |
37 | 37 | ||
38 | QString TodolistPlugin::pixmapNameWidget() const { | 38 | QString TodolistPlugin::pixmapNameWidget() const { |
39 | return "TodoList"; | 39 | return "TodoList"; |
40 | } | 40 | } |
41 | 41 | ||
42 | QWidget* TodolistPlugin::widget( QWidget *wid ) { | 42 | QWidget* TodolistPlugin::widget( QWidget *wid ) { |
43 | return new TodolistPluginWidget( wid, "Todolist" ); | 43 | return new TodolistPluginWidget( wid, "Todolist" ); |
44 | } | 44 | } |
45 | 45 | ||
46 | QString TodolistPlugin::pixmapNameConfig() const { | 46 | QString TodolistPlugin::pixmapNameConfig() const { |
47 | return "TodoList"; | 47 | return "TodoList"; |
48 | } | 48 | } |
49 | 49 | ||
50 | TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { | 50 | TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { |
51 | return new TodolistPluginConfig( wid , "Todolist" ); | 51 | return new TodolistPluginConfig( wid , "Todolist" ); |
52 | } | 52 | } |
53 | 53 | ||
54 | QString TodolistPlugin::appName() const { | 54 | QString TodolistPlugin::appName() const { |
55 | return QObject::tr( "Todolist" ); | 55 | return "todolist"; |
56 | } | 56 | } |
57 | 57 | ||
58 | 58 | ||
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp index d793aae..320969e 100644 --- a/core/pim/today/plugins/todolist/todopluginwidget.cpp +++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp | |||
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 35758d5..34ec3cb 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -105,46 +105,47 @@ void Today::setOwnerField( QString &message ) { | |||
105 | 105 | ||
106 | 106 | ||
107 | /** | 107 | /** |
108 | * Init stuff needed for today. Reads the config file. | 108 | * Init stuff needed for today. Reads the config file. |
109 | */ | 109 | */ |
110 | void Today::init() { | 110 | void Today::init() { |
111 | // read config | 111 | // read config |
112 | Config cfg( "today" ); | 112 | Config cfg( "today" ); |
113 | cfg.setGroup( "Plugins" ); | 113 | cfg.setGroup( "Plugins" ); |
114 | 114 | ||
115 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 115 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
116 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); | 116 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); |
117 | cfg.setGroup( "General" ); | ||
118 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); | ||
117 | } | 119 | } |
118 | 120 | ||
119 | 121 | ||
120 | /** | 122 | /** |
121 | * Load the plugins | 123 | * Load the plugins |
122 | */ | 124 | */ |
123 | void Today::loadPlugins() { | 125 | void Today::loadPlugins() { |
124 | 126 | ||
125 | QValueList<TodayPlugin>::Iterator tit; | 127 | QValueList<TodayPlugin>::Iterator tit; |
126 | for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { | 128 | for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { |
127 | (*tit).library->unload(); | 129 | (*tit).library->unload(); |
128 | delete (*tit).library; | 130 | delete (*tit).library; |
129 | } | 131 | } |
130 | pluginList.clear(); | 132 | pluginList.clear(); |
131 | 133 | ||
132 | QString path = QPEApplication::qpeDir() + "/plugins/today"; | 134 | QString path = QPEApplication::qpeDir() + "/plugins/today"; |
133 | QDir dir( path, "lib*.so" ); | 135 | QDir dir( path, "lib*.so" ); |
134 | 136 | ||
135 | QStringList list = dir.entryList(); | 137 | QStringList list = dir.entryList(); |
136 | QStringList::Iterator it; | 138 | QStringList::Iterator it; |
137 | 139 | ||
138 | |||
139 | QMap<QString, TodayPlugin> tempList; | 140 | QMap<QString, TodayPlugin> tempList; |
140 | 141 | ||
141 | for ( it = list.begin(); it != list.end(); ++it ) { | 142 | for ( it = list.begin(); it != list.end(); ++it ) { |
142 | TodayPluginInterface *iface = 0; | 143 | TodayPluginInterface *iface = 0; |
143 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 144 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
144 | 145 | ||
145 | qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); | 146 | qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); |
146 | if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { | 147 | if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { |
147 | qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); | 148 | qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); |
148 | qDebug( QString(*it) ); | 149 | qDebug( QString(*it) ); |
149 | TodayPlugin plugin; | 150 | TodayPlugin plugin; |
150 | plugin.library = lib; | 151 | plugin.library = lib; |
@@ -154,27 +155,29 @@ void Today::loadPlugins() { | |||
154 | // find out if plugins should be shown | 155 | // find out if plugins should be shown |
155 | if ( m_excludeApplets.grep( *it ).isEmpty() ) { | 156 | if ( m_excludeApplets.grep( *it ).isEmpty() ) { |
156 | plugin.active = true; | 157 | plugin.active = true; |
157 | } else { | 158 | } else { |
158 | plugin.active = false; | 159 | plugin.active = false; |
159 | } | 160 | } |
160 | plugin.guiPart = plugin.iface->guiPart(); | 161 | plugin.guiPart = plugin.iface->guiPart(); |
161 | 162 | ||
162 | // package the whole thing into a qwidget so it can be shown and hidden | 163 | // package the whole thing into a qwidget so it can be shown and hidden |
163 | plugin.guiBox = new QWidget( this ); | 164 | plugin.guiBox = new QWidget( this ); |
164 | QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); | 165 | QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); |
165 | QPixmap plugPix; | 166 | QPixmap plugPix; |
166 | plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( 18, 18 ), 0 ); | 167 | plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 ); |
167 | OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); | 168 | OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); |
168 | plugIcon->setPixmap( plugPix ); | 169 | plugIcon->setPixmap( plugPix ); |
170 | plugIcon->setName( plugin.guiPart->appName() ); | ||
171 | connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) ); | ||
169 | // a scrollview for each plugin | 172 | // a scrollview for each plugin |
170 | QScrollView* sv = new QScrollView( plugin.guiBox ); | 173 | QScrollView* sv = new QScrollView( plugin.guiBox ); |
171 | QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); | 174 | QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); |
172 | // not sure if that is good .-) | 175 | // not sure if that is good .-) |
173 | sv->setMinimumHeight( 10 ); | 176 | sv->setMinimumHeight( 10 ); |
174 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 177 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
175 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); | 178 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); |
176 | sv->setFrameShape( QFrame::NoFrame ); | 179 | sv->setFrameShape( QFrame::NoFrame ); |
177 | sv->addChild( plugWidget ); | 180 | sv->addChild( plugWidget ); |
178 | // make sure the icon is on the top alligned | 181 | // make sure the icon is on the top alligned |
179 | boxLayout->addWidget( plugIcon, 0, AlignTop ); | 182 | boxLayout->addWidget( plugIcon, 0, AlignTop ); |
180 | boxLayout->addWidget( sv, 0, AlignTop ); | 183 | boxLayout->addWidget( sv, 0, AlignTop ); |
@@ -302,24 +305,29 @@ void Today::refresh() { | |||
302 | layout->addWidget( OwnerField ); | 305 | layout->addWidget( OwnerField ); |
303 | 306 | ||
304 | loadPlugins(); | 307 | loadPlugins(); |
305 | draw(); | 308 | draw(); |
306 | } | 309 | } |
307 | 310 | ||
308 | void Today::startAddressbook() { | 311 | void Today::startAddressbook() { |
309 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 312 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
310 | e << QString( "addressbook" ); | 313 | e << QString( "addressbook" ); |
311 | } | 314 | } |
312 | 315 | ||
313 | 316 | ||
317 | void Today::startApplication() { | ||
318 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | ||
319 | e << QString( sender()->name() ); | ||
320 | } | ||
321 | |||
314 | /** | 322 | /** |
315 | * launch addressbook (personal card) | 323 | * launch addressbook (personal card) |
316 | */ | 324 | */ |
317 | void Today::editCard() { | 325 | void Today::editCard() { |
318 | startAddressbook(); | 326 | startAddressbook(); |
319 | while( !QCopChannel::isRegistered( "QPE/Addressbook" ) ) { | 327 | while( !QCopChannel::isRegistered( "QPE/Addressbook" ) ) { |
320 | qApp->processEvents(); | 328 | qApp->processEvents(); |
321 | } | 329 | } |
322 | QCopEnvelope v( "QPE/Addressbook", "editPersonalAndClose()" ); | 330 | QCopEnvelope v( "QPE/Addressbook", "editPersonalAndClose()" ); |
323 | } | 331 | } |
324 | 332 | ||
325 | Today::~Today() { | 333 | Today::~Today() { |
diff --git a/core/pim/today/today.h b/core/pim/today/today.h index 92512b9..6f13df6 100644 --- a/core/pim/today/today.h +++ b/core/pim/today/today.h | |||
@@ -23,51 +23,51 @@ | |||
23 | #include <qdatetime.h> | 23 | #include <qdatetime.h> |
24 | #include <qlist.h> | 24 | #include <qlist.h> |
25 | #include <qhbox.h> | 25 | #include <qhbox.h> |
26 | 26 | ||
27 | #include <qpe/qlibrary.h> | 27 | #include <qpe/qlibrary.h> |
28 | #include <qpe/event.h> | 28 | #include <qpe/event.h> |
29 | 29 | ||
30 | #include "todayconfig.h" | 30 | #include "todayconfig.h" |
31 | #include "todaybase.h" | 31 | #include "todaybase.h" |
32 | #include <opie/todayplugininterface.h> | 32 | #include <opie/todayplugininterface.h> |
33 | 33 | ||
34 | class QVBoxLayout; | 34 | class QVBoxLayout; |
35 | 35 | class OClickableLabel; | |
36 | 36 | ||
37 | 37 | ||
38 | class Today : public TodayBase { | 38 | class Today : public TodayBase { |
39 | 39 | ||
40 | Q_OBJECT | 40 | Q_OBJECT |
41 | 41 | ||
42 | public: | 42 | public: |
43 | Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 43 | Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
44 | ~Today(); | 44 | ~Today(); |
45 | 45 | ||
46 | private slots: | 46 | private slots: |
47 | void startConfig(); | 47 | void startConfig(); |
48 | void startAddressbook(); | 48 | void startAddressbook(); |
49 | void startApplication(); | ||
49 | void editCard(); | 50 | void editCard(); |
50 | void refresh(); | 51 | void refresh(); |
51 | 52 | ||
52 | private: | 53 | private: |
53 | void init(); | 54 | void init(); |
54 | void setOwnerField(); | 55 | void setOwnerField(); |
55 | void setOwnerField(QString &string); | 56 | void setOwnerField(QString &string); |
56 | void loadPlugins(); | 57 | void loadPlugins(); |
57 | void draw(); | 58 | void draw(); |
58 | 59 | ||
59 | private slots: | 60 | private slots: |
60 | void channelReceived(const QCString &msg, const QByteArray & data); | 61 | void channelReceived(const QCString &msg, const QByteArray & data); |
61 | 62 | ||
62 | private: | 63 | private: |
63 | TodayConfig *conf; | 64 | TodayConfig *conf; |
64 | QStringList m_excludeApplets; | 65 | QStringList m_excludeApplets; |
65 | QStringList m_allApplets; | 66 | QStringList m_allApplets; |
66 | 67 | ||
67 | // QString m_autoStartTimer; | ||
68 | int m_newStart; | 68 | int m_newStart; |
69 | // int m_autoStart; | 69 | int m_iconSize; |
70 | int m_maxCharClip; | 70 | int m_maxCharClip; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | #endif | 73 | #endif |
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index 3fc5830..097965b 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -20,24 +20,25 @@ | |||
20 | #include <qpe/resource.h> | 20 | #include <qpe/resource.h> |
21 | #include <qpe/qcopenvelope_qws.h> | 21 | #include <qpe/qcopenvelope_qws.h> |
22 | 22 | ||
23 | #include <qcheckbox.h> | 23 | #include <qcheckbox.h> |
24 | #include <qlabel.h> | 24 | #include <qlabel.h> |
25 | #include <qspinbox.h> | 25 | #include <qspinbox.h> |
26 | #include <qtabwidget.h> | 26 | #include <qtabwidget.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qheader.h> | 28 | #include <qheader.h> |
29 | #include <qhbox.h> | 29 | #include <qhbox.h> |
30 | #include <qvbox.h> | 30 | #include <qvbox.h> |
31 | #include <qtoolbutton.h> | 31 | #include <qtoolbutton.h> |
32 | #include <qtooltip.h> | ||
32 | 33 | ||
33 | class ToolButton : public QToolButton { | 34 | class ToolButton : public QToolButton { |
34 | 35 | ||
35 | public: | 36 | public: |
36 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) | 37 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) |
37 | : QToolButton( parent, name ) { | 38 | : QToolButton( parent, name ) { |
38 | setPixmap( Resource::loadPixmap( icon ) ); | 39 | setPixmap( Resource::loadPixmap( icon ) ); |
39 | setAutoRaise( TRUE ); | 40 | setAutoRaise( TRUE ); |
40 | setFocusPolicy( QWidget::NoFocus ); | 41 | setFocusPolicy( QWidget::NoFocus ); |
41 | setToggleButton( t ); | 42 | setToggleButton( t ); |
42 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); | 43 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); |
43 | } | 44 | } |
@@ -75,26 +76,34 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags | |||
75 | 76 | ||
76 | tab_3 = new QWidget( TabWidget3, "tab_3" ); | 77 | tab_3 = new QWidget( TabWidget3, "tab_3" ); |
77 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); | 78 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); |
78 | tab3Layout->setMargin( 20 ); | 79 | tab3Layout->setMargin( 20 ); |
79 | QHBox *hbox_auto = new QHBox( tab_3 ); | 80 | QHBox *hbox_auto = new QHBox( tab_3 ); |
80 | TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); | 81 | TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); |
81 | TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); | 82 | TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); |
82 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); | 83 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); |
83 | QHBox *hbox_inactive = new QHBox( tab_3 ); | 84 | QHBox *hbox_inactive = new QHBox( tab_3 ); |
84 | TimeLabel = new QLabel( hbox_inactive , "TimeLabel" ); | 85 | TimeLabel = new QLabel( hbox_inactive , "TimeLabel" ); |
85 | TimeLabel->setText( tr( "minutes inactive" ) ); | 86 | TimeLabel->setText( tr( "minutes inactive" ) ); |
86 | SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" ); | 87 | SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" ); |
88 | QHBox *hbox_iconSize = new QHBox( tab_3 ); | ||
89 | QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" ); | ||
90 | iconSizeLabel->setText( tr( "Icon size" ) ); | ||
91 | // iconSizeLabel->setToolTip( tr( "Set the icon size in pixel" ) ); | ||
92 | SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" ); | ||
93 | SpinBoxIconSize->setMaxValue( 32 ); | ||
94 | |||
87 | tab3Layout->addWidget( hbox_auto ); | 95 | tab3Layout->addWidget( hbox_auto ); |
88 | tab3Layout->addWidget( hbox_inactive ); | 96 | tab3Layout->addWidget( hbox_inactive ); |
97 | tab3Layout->addWidget( hbox_iconSize ); | ||
89 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); | 98 | TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); |
90 | 99 | ||
91 | m_applets_changed = false; | 100 | m_applets_changed = false; |
92 | 101 | ||
93 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); | 102 | connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); |
94 | 103 | ||
95 | readConfig(); | 104 | readConfig(); |
96 | showMaximized(); | 105 | showMaximized(); |
97 | } | 106 | } |
98 | 107 | ||
99 | 108 | ||
100 | /** | 109 | /** |
@@ -118,24 +127,28 @@ void TodayConfig::setAutoStart() { | |||
118 | 127 | ||
119 | /** | 128 | /** |
120 | * Read the config part | 129 | * Read the config part |
121 | */ | 130 | */ |
122 | void TodayConfig::readConfig() { | 131 | void TodayConfig::readConfig() { |
123 | Config cfg( "today" ); | 132 | Config cfg( "today" ); |
124 | cfg.setGroup( "Autostart" ); | 133 | cfg.setGroup( "Autostart" ); |
125 | m_autoStart = cfg.readNumEntry( "autostart", 1 ); | 134 | m_autoStart = cfg.readNumEntry( "autostart", 1 ); |
126 | CheckBoxAuto->setChecked( m_autoStart ); | 135 | CheckBoxAuto->setChecked( m_autoStart ); |
127 | m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); | 136 | m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); |
128 | SpinBoxTime->setValue( m_autoStartTimer ); | 137 | SpinBoxTime->setValue( m_autoStartTimer ); |
129 | 138 | ||
139 | cfg.setGroup( "General" ); | ||
140 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); | ||
141 | SpinBoxIconSize->setValue( m_iconSize ); | ||
142 | |||
130 | cfg.setGroup( "Plugins" ); | 143 | cfg.setGroup( "Plugins" ); |
131 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 144 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
132 | } | 145 | } |
133 | 146 | ||
134 | /** | 147 | /** |
135 | * Write the config part | 148 | * Write the config part |
136 | */ | 149 | */ |
137 | void TodayConfig::writeConfig() { | 150 | void TodayConfig::writeConfig() { |
138 | Config cfg( "today" ); | 151 | Config cfg( "today" ); |
139 | cfg.setGroup( "Plugins" ); | 152 | cfg.setGroup( "Plugins" ); |
140 | if ( m_applets_changed ) { | 153 | if ( m_applets_changed ) { |
141 | QStringList exclude; | 154 | QStringList exclude; |
@@ -159,24 +172,29 @@ void TodayConfig::writeConfig() { | |||
159 | } | 172 | } |
160 | } | 173 | } |
161 | cfg.writeEntry( "ExcludeApplets", exclude, ',' ); | 174 | cfg.writeEntry( "ExcludeApplets", exclude, ',' ); |
162 | cfg.writeEntry( "IncludeApplets", include, ',' ); | 175 | cfg.writeEntry( "IncludeApplets", include, ',' ); |
163 | cfg.writeEntry( "AllApplets", all_applets, ',' ); | 176 | cfg.writeEntry( "AllApplets", all_applets, ',' ); |
164 | } | 177 | } |
165 | 178 | ||
166 | cfg.setGroup( "Autostart" ); | 179 | cfg.setGroup( "Autostart" ); |
167 | m_autoStart = CheckBoxAuto->isChecked(); | 180 | m_autoStart = CheckBoxAuto->isChecked(); |
168 | cfg.writeEntry( "autostart", m_autoStart ); | 181 | cfg.writeEntry( "autostart", m_autoStart ); |
169 | m_autoStartTimer = SpinBoxTime->value(); | 182 | m_autoStartTimer = SpinBoxTime->value(); |
170 | cfg.writeEntry( "autostartdelay", m_autoStartTimer ); | 183 | cfg.writeEntry( "autostartdelay", m_autoStartTimer ); |
184 | m_iconSize = SpinBoxIconSize->value(); | ||
185 | |||
186 | cfg.setGroup( "General" ); | ||
187 | cfg.writeEntry( "IconSize", m_iconSize ); | ||
188 | |||
171 | 189 | ||
172 | // set autostart settings | 190 | // set autostart settings |
173 | setAutoStart(); | 191 | setAutoStart(); |
174 | } | 192 | } |
175 | 193 | ||
176 | 194 | ||
177 | void TodayConfig::moveSelectedUp() { | 195 | void TodayConfig::moveSelectedUp() { |
178 | QListViewItem *item = m_appletListView->selectedItem(); | 196 | QListViewItem *item = m_appletListView->selectedItem(); |
179 | if ( item && item->itemAbove() ) { | 197 | if ( item && item->itemAbove() ) { |
180 | item->itemAbove()->moveItem( item ); | 198 | item->itemAbove()->moveItem( item ); |
181 | } | 199 | } |
182 | } | 200 | } |
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h index f23b850..aa227dd 100644 --- a/core/pim/today/todayconfig.h +++ b/core/pim/today/todayconfig.h | |||
@@ -46,26 +46,28 @@ protected slots: | |||
46 | void moveSelectedUp(); | 46 | void moveSelectedUp(); |
47 | void moveSelectedDown(); | 47 | void moveSelectedDown(); |
48 | 48 | ||
49 | private: | 49 | private: |
50 | void setAutoStart(); | 50 | void setAutoStart(); |
51 | void readConfig(); | 51 | void readConfig(); |
52 | 52 | ||
53 | QListView* m_appletListView; | 53 | QListView* m_appletListView; |
54 | QMap<QString,QCheckListItem*> m_applets; | 54 | QMap<QString,QCheckListItem*> m_applets; |
55 | 55 | ||
56 | int m_autoStart; | 56 | int m_autoStart; |
57 | int m_autoStartTimer; | 57 | int m_autoStartTimer; |
58 | int m_iconSize; | ||
58 | QStringList m_excludeApplets; | 59 | QStringList m_excludeApplets; |
59 | bool m_applets_changed; | 60 | bool m_applets_changed; |
60 | 61 | ||
61 | QLabel* TextLabel2; | 62 | QLabel* TextLabel2; |
62 | QCheckBox* CheckBoxAuto; | 63 | QCheckBox* CheckBoxAuto; |
63 | QWidget* tab_2; | 64 | QWidget* tab_2; |
64 | QWidget* tab_3; | 65 | QWidget* tab_3; |
65 | QLabel* TextLabel1; | 66 | QLabel* TextLabel1; |
66 | QSpinBox* SpinBox7; | 67 | QSpinBox* SpinBox7; |
67 | QLabel* TimeLabel; | 68 | QLabel* TimeLabel; |
68 | QSpinBox* SpinBoxTime; | 69 | QSpinBox* SpinBoxTime; |
70 | QSpinBox* SpinBoxIconSize; | ||
69 | }; | 71 | }; |
70 | 72 | ||
71 | #endif | 73 | #endif |