author | harlekin <harlekin> | 2002-09-18 09:52:51 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-09-18 09:52:51 (UTC) |
commit | 15ecc4aa71878039ad40ce270fae06282d8e98c2 (patch) (unidiff) | |
tree | 1b1cae7b89bdd3960da222542e99c05332610231 | |
parent | 01d31aeaa8d513bde8237a07ea0a48ac1b85c3c0 (diff) | |
download | opie-15ecc4aa71878039ad40ce270fae06282d8e98c2.zip opie-15ecc4aa71878039ad40ce270fae06282d8e98c2.tar.gz opie-15ecc4aa71878039ad40ce270fae06282d8e98c2.tar.bz2 |
reload plugins now on config change
-rw-r--r-- | core/pim/today/plugins/datebook/datebookevent.cpp | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookpluginwidget.cpp | 6 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 58 | ||||
-rw-r--r-- | core/pim/today/today.h | 9 | ||||
-rw-r--r-- | core/pim/today/todaybase.cpp | 16 | ||||
-rw-r--r-- | core/pim/today/todayconfig.cpp | 4 |
6 files changed, 40 insertions, 57 deletions
diff --git a/core/pim/today/plugins/datebook/datebookevent.cpp b/core/pim/today/plugins/datebook/datebookevent.cpp index 1caf061..d4e8e1e 100644 --- a/core/pim/today/plugins/datebook/datebookevent.cpp +++ b/core/pim/today/plugins/datebook/datebookevent.cpp | |||
@@ -27,12 +27,14 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev, | |||
27 | // int onlyLater, | 27 | // int onlyLater, |
28 | int maxCharClip, | 28 | int maxCharClip, |
29 | const char* name, | 29 | const char* name, |
30 | WFlags fl) : | 30 | WFlags fl) : |
31 | OClickableLabel(parent,name,fl), event(ev) { | 31 | OClickableLabel(parent,name,fl), event(ev) { |
32 | 32 | ||
33 | setAlignment( AlignTop ); | ||
34 | |||
33 | QString msg; | 35 | QString msg; |
34 | 36 | ||
35 | Config config( "qpe" ); | 37 | Config config( "qpe" ); |
36 | config.setGroup( "Time" ); | 38 | config.setGroup( "Time" ); |
37 | // if 24 h format | 39 | // if 24 h format |
38 | ampm = config.readBoolEntry( "AMPM", TRUE ); | 40 | ampm = config.readBoolEntry( "AMPM", TRUE ); |
@@ -87,14 +89,12 @@ QString DateBookEvent::ampmTime( QTime tm ) { | |||
87 | return s; | 89 | return s; |
88 | } | 90 | } |
89 | 91 | ||
90 | } | 92 | } |
91 | 93 | ||
92 | 94 | ||
93 | //extern QPEApplication *todayApp; | ||
94 | |||
95 | /* | 95 | /* |
96 | * starts the edit dialog as known from datebook | 96 | * starts the edit dialog as known from datebook |
97 | */ | 97 | */ |
98 | void DateBookEvent::editEventSlot( const Event &e ) { | 98 | void DateBookEvent::editEventSlot( const Event &e ) { |
99 | startDatebook(); | 99 | startDatebook(); |
100 | 100 | ||
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp index e4667ae..7948656 100644 --- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp | |||
@@ -56,12 +56,14 @@ void DatebookPluginWidget::readConfig() { | |||
56 | void DatebookPluginWidget::getDates() { | 56 | void DatebookPluginWidget::getDates() { |
57 | 57 | ||
58 | 58 | ||
59 | QDate date = QDate::currentDate(); | 59 | QDate date = QDate::currentDate(); |
60 | 60 | ||
61 | QVBoxLayout* layoutDates = new QVBoxLayout( this ); | 61 | QVBoxLayout* layoutDates = new QVBoxLayout( this ); |
62 | layoutDates->setSpacing( 1 ); | ||
63 | layoutDates->setMargin( 1 ); | ||
62 | 64 | ||
63 | if ( db ) { | 65 | if ( db ) { |
64 | delete db; | 66 | delete db; |
65 | } | 67 | } |
66 | 68 | ||
67 | db = new DateBookDB; | 69 | db = new DateBookDB; |
@@ -102,13 +104,13 @@ void DatebookPluginWidget::getDates() { | |||
102 | } | 104 | } |
103 | } else { | 105 | } else { |
104 | QLabel* noEvents = new QLabel( this ); | 106 | QLabel* noEvents = new QLabel( this ); |
105 | noEvents->setText( QObject::tr( "No appointments today" ) ); | 107 | noEvents->setText( QObject::tr( "No appointments today" ) ); |
106 | layoutDates->addWidget( noEvents ); | 108 | layoutDates->addWidget( noEvents ); |
107 | } | 109 | } |
108 | 110 | //layoutDates->addStretch(0); | |
109 | layoutDates->addItem( new QSpacerItem( 1,1, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); | 111 | // layoutDates->addItem( new QSpacerItem( 1,1, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); |
110 | 112 | ||
111 | // how often refresh - later have qcop update calls in *db | 113 | // how often refresh - later have qcop update calls in *db |
112 | //QTimer::singleShot( 20*1000, this , SLOT( getDates() ) ); | 114 | //QTimer::singleShot( 20*1000, this , SLOT( getDates() ) ); |
113 | } | 115 | } |
114 | 116 | ||
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index f052a9f..7537631 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -61,15 +61,13 @@ Today::Today( QWidget* parent, const char* name, WFlags fl ) | |||
61 | connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), | 61 | connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), |
62 | this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); | 62 | this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); |
63 | #endif | 63 | #endif |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | setOwnerField(); | 66 | setOwnerField(); |
67 | init(); | 67 | refresh(); |
68 | loadPlugins(); | ||
69 | draw(); | ||
70 | showMaximized(); | 68 | showMaximized(); |
71 | } | 69 | } |
72 | 70 | ||
73 | /** | 71 | /** |
74 | * Qcop receive method. | 72 | * Qcop receive method. |
75 | */ | 73 | */ |
@@ -115,13 +113,12 @@ void Today::init() { | |||
115 | QString time = ( tr( date.toString() ) ); | 113 | QString time = ( tr( date.toString() ) ); |
116 | 114 | ||
117 | DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) ); | 115 | DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) ); |
118 | 116 | ||
119 | // read config | 117 | // read config |
120 | Config cfg( "today" ); | 118 | Config cfg( "today" ); |
121 | |||
122 | cfg.setGroup( "Applets" ); | 119 | cfg.setGroup( "Applets" ); |
123 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 120 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
124 | } | 121 | } |
125 | 122 | ||
126 | 123 | ||
127 | /** | 124 | /** |
@@ -133,19 +130,19 @@ void Today::loadPlugins() { | |||
133 | for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { | 130 | for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { |
134 | (*tit).library->unload(); | 131 | (*tit).library->unload(); |
135 | delete (*tit).library; | 132 | delete (*tit).library; |
136 | } | 133 | } |
137 | pluginList.clear(); | 134 | pluginList.clear(); |
138 | 135 | ||
136 | |||
139 | QString path = QPEApplication::qpeDir() + "/plugins/today"; | 137 | QString path = QPEApplication::qpeDir() + "/plugins/today"; |
140 | QDir dir( path, "lib*.so" ); | 138 | QDir dir( path, "lib*.so" ); |
141 | 139 | ||
142 | QStringList list = dir.entryList(); | 140 | QStringList list = dir.entryList(); |
143 | QStringList::Iterator it; | 141 | QStringList::Iterator it; |
144 | 142 | ||
145 | uint count = 0; | ||
146 | for ( it = list.begin(); it != list.end(); ++it ) { | 143 | for ( it = list.begin(); it != list.end(); ++it ) { |
147 | TodayPluginInterface *iface = 0; | 144 | TodayPluginInterface *iface = 0; |
148 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 145 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
149 | 146 | ||
150 | qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); | 147 | qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); |
151 | if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { | 148 | if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { |
@@ -153,12 +150,13 @@ void Today::loadPlugins() { | |||
153 | qDebug( QString(*it) ); | 150 | qDebug( QString(*it) ); |
154 | TodayPlugin plugin; | 151 | TodayPlugin plugin; |
155 | plugin.library = lib; | 152 | plugin.library = lib; |
156 | plugin.iface = iface; | 153 | plugin.iface = iface; |
157 | plugin.name = QString(*it); | 154 | plugin.name = QString(*it); |
158 | 155 | ||
156 | // find out if plugins should be shown | ||
159 | if ( m_excludeApplets.grep( *it ).isEmpty() ) { | 157 | if ( m_excludeApplets.grep( *it ).isEmpty() ) { |
160 | plugin.active = true; | 158 | plugin.active = true; |
161 | } else { | 159 | } else { |
162 | plugin.active = false; | 160 | plugin.active = false; |
163 | } | 161 | } |
164 | plugin.guiPart = plugin.iface->guiPart(); | 162 | plugin.guiPart = plugin.iface->guiPart(); |
@@ -173,13 +171,12 @@ void Today::loadPlugins() { | |||
173 | plugIcon->setPixmap( plugPix ); | 171 | plugIcon->setPixmap( plugPix ); |
174 | 172 | ||
175 | // a scrollview for each plugin | 173 | // a scrollview for each plugin |
176 | QScrollView* sv = new QScrollView( plugin.guiBox ); | 174 | QScrollView* sv = new QScrollView( plugin.guiBox ); |
177 | QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); | 175 | QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); |
178 | sv->setMinimumHeight( plugin.guiPart->minHeight() ); | 176 | sv->setMinimumHeight( plugin.guiPart->minHeight() ); |
179 | //sv->setMaximumHeight( plugin.guiPart->maxHeight() ); | ||
180 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 177 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
181 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); | 178 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); |
182 | sv->setFrameShape( QFrame::NoFrame ); | 179 | sv->setFrameShape( QFrame::NoFrame ); |
183 | sv->addChild( plugWidget ); | 180 | sv->addChild( plugWidget ); |
184 | 181 | ||
185 | // make sure the icon is on the top alligned | 182 | // make sure the icon is on the top alligned |
@@ -187,13 +184,12 @@ void Today::loadPlugins() { | |||
187 | boxLayout->addWidget( sv, 0, AlignTop ); | 184 | boxLayout->addWidget( sv, 0, AlignTop ); |
188 | boxLayout->setStretchFactor( plugIcon, 1 ); | 185 | boxLayout->setStretchFactor( plugIcon, 1 ); |
189 | boxLayout->setStretchFactor( sv, 9 ); | 186 | boxLayout->setStretchFactor( sv, 9 ); |
190 | layout->addWidget( plugin.guiBox ); | 187 | layout->addWidget( plugin.guiBox ); |
191 | 188 | ||
192 | pluginList.append( plugin ); | 189 | pluginList.append( plugin ); |
193 | count++; | ||
194 | } else { | 190 | } else { |
195 | qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); | 191 | qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); |
196 | delete lib; | 192 | delete lib; |
197 | } | 193 | } |
198 | } | 194 | } |
199 | } | 195 | } |
@@ -228,26 +224,25 @@ void Today::draw() { | |||
228 | 224 | ||
229 | if ( count == 0 ) { | 225 | if ( count == 0 ) { |
230 | QLabel *noPluginsActive = new QLabel( this ); | 226 | QLabel *noPluginsActive = new QLabel( this ); |
231 | noPluginsActive->setText( tr( "No plugins activated" ) ); | 227 | noPluginsActive->setText( tr( "No plugins activated" ) ); |
232 | layout->addWidget( noPluginsActive ); | 228 | layout->addWidget( noPluginsActive ); |
233 | } | 229 | } |
234 | 230 | //layout->addStretch(0); | |
235 | layout->addItem( new QSpacerItem( 1,1, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); | 231 | //layout->addItem( new QSpacerItem( 1,1, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); |
236 | } | 232 | } |
237 | 233 | ||
238 | 234 | ||
239 | /** | 235 | /** |
240 | * The method for the configuration dialog. | 236 | * The method for the configuration dialog. |
241 | */ | 237 | */ |
242 | void Today::startConfig() { | 238 | void Today::startConfig() { |
243 | 239 | ||
244 | TodayConfig conf( this, "dialog", true ); | 240 | TodayConfig conf( this, "dialog", true ); |
245 | 241 | ||
246 | TodayPlugin plugin; | 242 | TodayPlugin plugin; |
247 | |||
248 | QList<ConfigWidget> configWidgetList; | 243 | QList<ConfigWidget> configWidgetList; |
249 | for ( uint i = 0; i < pluginList.count(); i++ ) { | 244 | for ( uint i = 0; i < pluginList.count(); i++ ) { |
250 | plugin = pluginList[i]; | 245 | plugin = pluginList[i]; |
251 | 246 | ||
252 | // load the config widgets in the tabs | 247 | // load the config widgets in the tabs |
253 | if ( plugin.guiPart->configWidget( this ) != 0l ) { | 248 | if ( plugin.guiPart->configWidget( this ) != 0l ) { |
@@ -264,35 +259,34 @@ void Today::startConfig() { | |||
264 | conf.writeConfig(); | 259 | conf.writeConfig(); |
265 | ConfigWidget *confWidget; | 260 | ConfigWidget *confWidget; |
266 | for ( confWidget = configWidgetList.first(); confWidget != 0; | 261 | for ( confWidget = configWidgetList.first(); confWidget != 0; |
267 | confWidget = configWidgetList.next() ) { | 262 | confWidget = configWidgetList.next() ) { |
268 | confWidget->writeConfig(); | 263 | confWidget->writeConfig(); |
269 | } | 264 | } |
265 | refresh(); | ||
266 | } | ||
267 | } | ||
270 | 268 | ||
271 | init(); | ||
272 | |||
273 | TodayPlugin plugin; | ||
274 | QValueList<TodayPlugin> plugList; | ||
275 | for ( uint i = 0; i < pluginList.count(); i++ ) { | ||
276 | plugin = pluginList[i]; | ||
277 | 269 | ||
278 | if ( m_excludeApplets.grep( plugin.name ).isEmpty() ) { | 270 | /** |
279 | qDebug("CONFIG " + plugin.name + " ACTIVE"); | 271 | * Refresh for the view. Reload all applets |
280 | plugin.active = true; | 272 | * |
281 | } else { | 273 | */ |
282 | qDebug("CONFIG " + plugin.name + " INACTIVE"); | 274 | void Today::refresh() { |
283 | plugin.active = false; | 275 | init(); |
284 | } | ||
285 | plugList.append( plugin ); | ||
286 | } | ||
287 | pluginList = plugList; | ||
288 | 276 | ||
289 | draw(); | 277 | if ( layout ) { |
278 | delete layout; | ||
290 | } | 279 | } |
291 | } | 280 | layout = new QVBoxLayout( this ); |
281 | layout->addWidget( Frame ); | ||
282 | layout->addWidget( OwnerField ); | ||
292 | 283 | ||
284 | loadPlugins(); | ||
285 | draw(); | ||
286 | } | ||
293 | 287 | ||
294 | void Today::startAddressbook() { | 288 | void Today::startAddressbook() { |
295 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 289 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
296 | e << QString( "addressbook" ); | 290 | e << QString( "addressbook" ); |
297 | } | 291 | } |
298 | 292 | ||
@@ -305,17 +299,9 @@ void Today::editCard() { | |||
305 | while( !QCopChannel::isRegistered( "QPE/Addressbook" ) ) { | 299 | while( !QCopChannel::isRegistered( "QPE/Addressbook" ) ) { |
306 | qApp->processEvents(); | 300 | qApp->processEvents(); |
307 | } | 301 | } |
308 | QCopEnvelope v( "QPE/Addressbook", "editPersonalAndClose()" ); | 302 | QCopEnvelope v( "QPE/Addressbook", "editPersonalAndClose()" ); |
309 | } | 303 | } |
310 | 304 | ||
311 | /* | ||
312 | * launches an App | ||
313 | */ | ||
314 | void Today::launchApp( QString appName ) { | ||
315 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | ||
316 | e << QString( appName ); | ||
317 | } | ||
318 | |||
319 | Today::~Today() { | 305 | Today::~Today() { |
320 | } | 306 | } |
321 | 307 | ||
diff --git a/core/pim/today/today.h b/core/pim/today/today.h index 0a9a705..672adc4 100644 --- a/core/pim/today/today.h +++ b/core/pim/today/today.h | |||
@@ -39,34 +39,33 @@ class Today : public TodayBase { | |||
39 | Q_OBJECT | 39 | Q_OBJECT |
40 | 40 | ||
41 | public: | 41 | public: |
42 | Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 42 | Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
43 | ~Today(); | 43 | ~Today(); |
44 | 44 | ||
45 | private slots: | 45 | private slots: |
46 | void startConfig(); | 46 | void startConfig(); |
47 | void startAddressbook(); | 47 | void startAddressbook(); |
48 | void launchApp( QString appName ); | ||
49 | void editCard(); | 48 | void editCard(); |
50 | void draw(); | 49 | void refresh(); |
51 | 50 | ||
52 | private: | 51 | private: |
53 | void init(); | 52 | void init(); |
54 | void setOwnerField(); | 53 | void setOwnerField(); |
55 | void setOwnerField(QString &string); | 54 | void setOwnerField(QString &string); |
56 | void loadPlugins(); | 55 | void loadPlugins(); |
56 | void draw(); | ||
57 | |||
57 | 58 | ||
58 | private slots: | 59 | private slots: |
59 | void channelReceived(const QCString &msg, const QByteArray & data); | 60 | void channelReceived(const QCString &msg, const QByteArray & data); |
60 | 61 | ||
61 | private: | 62 | private: |
62 | TodayConfig *conf; | 63 | TodayConfig *conf; |
63 | QStringList m_excludeApplets; | 64 | QStringList m_excludeApplets; |
64 | 65 | ||
65 | QVBoxLayout *pluginLayout; | ||
66 | |||
67 | // QString m_autoStartTimer; | 66 | // QString m_autoStartTimer; |
68 | int m_newStart; | 67 | int m_newStart; |
69 | // int m_autoStart; | 68 | // int m_autoStart; |
70 | int m_maxCharClip; | 69 | int m_maxCharClip; |
71 | }; | 70 | }; |
72 | 71 | ||
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index 74f4fa0..800ca5d 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -31,12 +31,14 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
31 | QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo | 31 | QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo |
32 | QPixmap opiezilla = Resource::loadPixmap("today/opiezilla" ); //the opiezilla | 32 | QPixmap opiezilla = Resource::loadPixmap("today/opiezilla" ); //the opiezilla |
33 | QPixmap config = Resource::loadPixmap( "today/config" ); // config icon | 33 | QPixmap config = Resource::loadPixmap( "today/config" ); // config icon |
34 | 34 | ||
35 | layout = new QVBoxLayout( this ); | 35 | layout = new QVBoxLayout( this ); |
36 | 36 | ||
37 | QVBoxLayout *mainLayout = new QVBoxLayout( this ); | ||
38 | |||
37 | QPalette pal = this->palette(); | 39 | QPalette pal = this->palette(); |
38 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); | 40 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); |
39 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); | 41 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); |
40 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); | 42 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); |
41 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); | 43 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); |
42 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); | 44 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); |
@@ -74,32 +76,28 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
74 | DateLabel_font.setBold( TRUE ); | 76 | DateLabel_font.setBold( TRUE ); |
75 | DateLabel->setFont( DateLabel_font ); | 77 | DateLabel->setFont( DateLabel_font ); |
76 | DateLabel->setBackgroundOrigin( QLabel::ParentOrigin ); | 78 | DateLabel->setBackgroundOrigin( QLabel::ParentOrigin ); |
77 | DateLabel->setTextFormat( RichText ); | 79 | DateLabel->setTextFormat( RichText ); |
78 | 80 | ||
79 | // Opiezilla | 81 | // Opiezilla |
80 | QLabel* Opiezilla = new QLabel( Frame, "OpieZilla"); | 82 | QLabel* Opiezilla = new QLabel( Frame, "OpieZilla" ); |
81 | Opiezilla->setPixmap( opiezilla ); | 83 | Opiezilla->setPixmap( opiezilla ); |
82 | Opiezilla->setGeometry( QApplication::desktop()->width()-50 ,1, 45, 47); | 84 | Opiezilla->setGeometry( QApplication::desktop()->width()-50 ,1, 45, 47 ); |
83 | Opiezilla->setBackgroundOrigin( QLabel::ParentOrigin ); | 85 | Opiezilla->setBackgroundOrigin( QLabel::ParentOrigin ); |
84 | 86 | ||
85 | // Ownerfield | 87 | // Ownerfield |
86 | OwnerField = new OClickableLabel( this , "Owner" ); | 88 | OwnerField = new OClickableLabel( this , "Owner" ); |
87 | OwnerField->setGeometry( QRect( 0,0, this->width(), 12 )); | 89 | OwnerField->setGeometry( QRect( 0, 0, this->width(), 12 ) ); |
88 | OwnerField->setAlignment( int (QLabel::AlignTop | QLabel::AlignLeft ) ); | 90 | OwnerField->setAlignment( int (QLabel::AlignTop | QLabel::AlignLeft ) ); |
89 | OwnerField->setMaximumHeight(12); | 91 | OwnerField->setMaximumHeight(12); |
90 | 92 | ||
91 | // config | 93 | // config |
92 | ConfigButton = new OClickableLabel ( Frame, "PushButton1" ); | 94 | ConfigButton = new OClickableLabel ( Frame, "PushButton1" ); |
93 | ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-80, 30, 25, 21 ) ); | 95 | ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-80, 30, 25, 21 ) ); |
94 | ConfigButton->setPixmap( config ); | 96 | ConfigButton->setPixmap( config ); |
95 | ConfigButton->setBackgroundOrigin( QLabel::ParentOrigin ); | 97 | ConfigButton->setBackgroundOrigin( QLabel::ParentOrigin ); |
96 | |||
97 | // -- layout -- | ||
98 | layout->addWidget( Frame ); | ||
99 | layout->addWidget( OwnerField ); | ||
100 | } | 98 | } |
101 | 99 | ||
102 | /** | 100 | /** |
103 | * D' tor | 101 | * D' tor |
104 | */ | 102 | */ |
105 | TodayBase::~TodayBase() { | 103 | TodayBase::~TodayBase() { |
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index 79c4d1f..4f23471 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -54,14 +54,12 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags | |||
54 | : QDialog( parent, name, modal, fl ) { | 54 | : QDialog( parent, name, modal, fl ) { |
55 | 55 | ||
56 | setCaption( tr( "Today config" ) ); | 56 | setCaption( tr( "Today config" ) ); |
57 | 57 | ||
58 | QVBoxLayout *layout = new QVBoxLayout( this ); | 58 | QVBoxLayout *layout = new QVBoxLayout( this ); |
59 | TabWidget3 = new QTabWidget( this, "TabWidget3" ); | 59 | TabWidget3 = new QTabWidget( this, "TabWidget3" ); |
60 | // TabWidget3->setFrameShape( QFrame::NoFrame ); | ||
61 | //TabWidget3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, TabWidget3->sizePolicy().hasHeightForWidth() ) ); | ||
62 | TabWidget3->setAutoMask( FALSE ); | 60 | TabWidget3->setAutoMask( FALSE ); |
63 | TabWidget3->setTabShape( QTabWidget::Rounded ); | 61 | TabWidget3->setTabShape( QTabWidget::Rounded ); |
64 | layout->addWidget( TabWidget3 ); | 62 | layout->addWidget( TabWidget3 ); |
65 | 63 | ||
66 | tab_2 = new QWidget( TabWidget3, "tab_2" ); | 64 | tab_2 = new QWidget( TabWidget3, "tab_2" ); |
67 | QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 ); | 65 | QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 ); |
@@ -119,13 +117,13 @@ void TodayConfig::setAutoStart() { | |||
119 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); | 117 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); |
120 | e << QString( "add" ); | 118 | e << QString( "add" ); |
121 | e << QString( "today" ); | 119 | e << QString( "today" ); |
122 | e << m_autoStartTimer; | 120 | e << m_autoStartTimer; |
123 | } else { | 121 | } else { |
124 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); | 122 | QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); |
125 | e << QString( "remove"); | 123 | e << QString( "remove" ); |
126 | e << QString( "today" ); | 124 | e << QString( "today" ); |
127 | } | 125 | } |
128 | } | 126 | } |
129 | 127 | ||
130 | /** | 128 | /** |
131 | * Read the config part | 129 | * Read the config part |