-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | core/launcher/launcher.cpp | 8 | ||||
-rw-r--r-- | core/launcher/launcherview.cpp | 28 | ||||
-rw-r--r-- | core/launcher/launcherview.h | 3 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 13 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.h | 2 |
6 files changed, 43 insertions, 13 deletions
@@ -1,132 +1,134 @@ | |||
1 | 2005-??-??Opie 1.2.0 | 1 | 2005-??-??Opie 1.2.0 |
2 | 2 | ||
3 | New Features | 3 | New Features |
4 | ------------ | 4 | ------------ |
5 | * Launcher: Support a static background pixmap (mickeyl) | ||
6 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) | ||
5 | 7 | ||
6 | Fixed Bugs | 8 | Fixed Bugs |
7 | ---------- | 9 | ---------- |
8 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) | 10 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) |
9 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) | 11 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) |
10 | * #1482 - Fix double '/' in paths (zecke) | 12 | * #1482 - Fix double '/' in paths (zecke) |
11 | * #1536 - Autosave of custom locations in opie backup (ar) | 13 | * #1536 - Autosave of custom locations in opie backup (ar) |
12 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) | 14 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) |
13 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) | 15 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) |
14 | * #1542 - Fix Todo crash when priority < 1 or > 5 (drw) | 16 | * #1542 - Fix Todo crash when priority < 1 or > 5 (drw) |
15 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) | 17 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) |
16 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) | 18 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) |
17 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) | 19 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) |
18 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 20 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
19 | 21 | ||
20 | Internal | 22 | Internal |
21 | -------- | 23 | -------- |
22 | * Work around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 24 | * Work around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
23 | * Killed the need for weak symbols in QtE (zecke) | 25 | * Killed the need for weak symbols in QtE (zecke) |
24 | 26 | ||
25 | 2005-02-03Opie 1.1.9 | 27 | 2005-02-03Opie 1.1.9 |
26 | 28 | ||
27 | New Features | 29 | New Features |
28 | ------------ | 30 | ------------ |
29 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 31 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
30 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 32 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
31 | * Usability enhancements in OpieIRC (skyhusker) | 33 | * Usability enhancements in OpieIRC (skyhusker) |
32 | 34 | ||
33 | Fixed Bugs | 35 | Fixed Bugs |
34 | ---------- | 36 | ---------- |
35 | * #1501 - Fixed bug in todo sql backend (eilers) | 37 | * #1501 - Fixed bug in todo sql backend (eilers) |
36 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 38 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
37 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 39 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
38 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 40 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
39 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 41 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
40 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 42 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
41 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 43 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
42 | 44 | ||
43 | Internal | 45 | Internal |
44 | -------- | 46 | -------- |
45 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 47 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
46 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 48 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
47 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 49 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
48 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 50 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
49 | * Build tree cleanups (mickeyl) | 51 | * Build tree cleanups (mickeyl) |
50 | 52 | ||
51 | 2004-11-26Opie 1.1.8 | 53 | 2004-11-26Opie 1.1.8 |
52 | 54 | ||
53 | New Features | 55 | New Features |
54 | ------------ | 56 | ------------ |
55 | * PackageManager supports installation of local ipkg files (drw) | 57 | * PackageManager supports installation of local ipkg files (drw) |
56 | * PackageManager supports linking of applications to root (drw) | 58 | * PackageManager supports linking of applications to root (drw) |
57 | * PackageManager supports src/gz feeds (drw,wimpie) | 59 | * PackageManager supports src/gz feeds (drw,wimpie) |
58 | * Added a syslog information tab to sysinfo (mickeyl) | 60 | * Added a syslog information tab to sysinfo (mickeyl) |
59 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 61 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
60 | 62 | ||
61 | Fixed Bugs | 63 | Fixed Bugs |
62 | ---------- | 64 | ---------- |
63 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) | 65 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) |
64 | * #1269 - VCards were imported into personal area if it was activated (eilers) | 66 | * #1269 - VCards were imported into personal area if it was activated (eilers) |
65 | * #1464 - Packagemanager dont set active filter after install a package (drw) | 67 | * #1464 - Packagemanager dont set active filter after install a package (drw) |
66 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) | 68 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) |
67 | * #1493 - Fixed one column layout bug of the launcher (hrw) | 69 | * #1493 - Fixed one column layout bug of the launcher (hrw) |
68 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) | 70 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) |
69 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) | 71 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) |
70 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) | 72 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) |
71 | 73 | ||
72 | Internal | 74 | Internal |
73 | -------- | 75 | -------- |
74 | * Moved libopie1 to unsupported (mickeyl) | 76 | * Moved libopie1 to unsupported (mickeyl) |
75 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) | 77 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) |
76 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) | 78 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) |
77 | 79 | ||
78 | 2004-11-14Opie 1.1.7 | 80 | 2004-11-14Opie 1.1.7 |
79 | 81 | ||
80 | New Features | 82 | New Features |
81 | ------------ | 83 | ------------ |
82 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) | 84 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) |
83 | * Backup now uses the busy indicator when backing up and restore (ar) | 85 | * Backup now uses the busy indicator when backing up and restore (ar) |
84 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) | 86 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) |
85 | * OpiePlayer2 better error handling (zecke) | 87 | * OpiePlayer2 better error handling (zecke) |
86 | * OpiePlayer2 progress indication while streaming (zecke) | 88 | * OpiePlayer2 progress indication while streaming (zecke) |
87 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) | 89 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) |
88 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) | 90 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) |
89 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) | 91 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) |
90 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) | 92 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) |
91 | * Opie-Console use Custom Font and Size in a Profile (harlekin) | 93 | * Opie-Console use Custom Font and Size in a Profile (harlekin) |
92 | * Opie-Console transparently log the Output and Input to a file (harlekin) | 94 | * Opie-Console transparently log the Output and Input to a file (harlekin) |
93 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) | 95 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) |
94 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) | 96 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) |
95 | * Opie-Security gained a 'test authentication' button (clem) | 97 | * Opie-Security gained a 'test authentication' button (clem) |
96 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults | 98 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults |
97 | * Opie-Mail improve the handling of POP mail boxes (alwin) | 99 | * Opie-Mail improve the handling of POP mail boxes (alwin) |
98 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) | 100 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) |
99 | * Opie IRC - backports of the 'NeIRC fork' (zecke) | 101 | * Opie IRC - backports of the 'NeIRC fork' (zecke) |
100 | 102 | ||
101 | Fixed Bugs | 103 | Fixed Bugs |
102 | ---------- | 104 | ---------- |
103 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) | 105 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) |
104 | * #608 - Make Opie usable for left handed users (zecke) | 106 | * #608 - Make Opie usable for left handed users (zecke) |
105 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) | 107 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) |
106 | * #1245 - Opie-Go 'paused' (zecke) | 108 | * #1245 - Opie-Go 'paused' (zecke) |
107 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) | 109 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) |
108 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) | 110 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) |
109 | * #1395 - Build VNC Backend with gcc3.4 | 111 | * #1395 - Build VNC Backend with gcc3.4 |
110 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) | 112 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) |
111 | * #1426 - Add missing opie-bartender Icon (CoreDump) | 113 | * #1426 - Add missing opie-bartender Icon (CoreDump) |
112 | * #1445 - Opie-Sheet Has No Icon (CoreDump) | 114 | * #1445 - Opie-Sheet Has No Icon (CoreDump) |
113 | * #1448 - Brightness Applet added (mickeyl) | 115 | * #1448 - Brightness Applet added (mickeyl) |
114 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) | 116 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) |
115 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) | 117 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) |
116 | * n.a. - Opie-mail: fixed some crasher, some layout-problems | 118 | * n.a. - Opie-mail: fixed some crasher, some layout-problems |
117 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) | 119 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) |
118 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) | 120 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) |
119 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) | 121 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) |
120 | * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) | 122 | * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) |
121 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) | 123 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) |
122 | 124 | ||
123 | Internal | 125 | Internal |
124 | -------- | 126 | -------- |
125 | * Opie-Qashmoney has been moved to unsupported (mickeyl) | 127 | * Opie-Qashmoney has been moved to unsupported (mickeyl) |
126 | * Opie-Ubrowser has been moved to unsupported (mickeyl) | 128 | * Opie-Ubrowser has been moved to unsupported (mickeyl) |
127 | 129 | ||
128 | 2004-09-17Opie 1.1.6 | 130 | 2004-09-17Opie 1.1.6 |
129 | 131 | ||
130 | New Features | 132 | New Features |
131 | ------------ | 133 | ------------ |
132 | * Fifteen gained configurable number of items (zecke) | 134 | * Fifteen gained configurable number of items (zecke) |
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 4255b44..4ec5f4c 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -331,256 +331,264 @@ void LauncherTabWidget::paletteChange( const QPalette &p ) | |||
331 | 331 | ||
332 | void LauncherTabWidget::styleChange( QStyle & ) | 332 | void LauncherTabWidget::styleChange( QStyle & ) |
333 | { | 333 | { |
334 | QTimer::singleShot( 0, this, SLOT(setProgressStyle()) ); | 334 | QTimer::singleShot( 0, this, SLOT(setProgressStyle()) ); |
335 | } | 335 | } |
336 | 336 | ||
337 | void LauncherTabWidget::setProgressStyle() | 337 | void LauncherTabWidget::setProgressStyle() |
338 | { | 338 | { |
339 | if (docLoadingWidgetProgress) { | 339 | if (docLoadingWidgetProgress) { |
340 | docLoadingWidgetProgress->setFrameShape( QProgressBar::Box ); | 340 | docLoadingWidgetProgress->setFrameShape( QProgressBar::Box ); |
341 | docLoadingWidgetProgress->setFrameShadow( QProgressBar::Plain ); | 341 | docLoadingWidgetProgress->setFrameShadow( QProgressBar::Plain ); |
342 | docLoadingWidgetProgress->setMargin( 1 ); | 342 | docLoadingWidgetProgress->setMargin( 1 ); |
343 | docLoadingWidgetProgress->setLineWidth( 1 ); | 343 | docLoadingWidgetProgress->setLineWidth( 1 ); |
344 | } | 344 | } |
345 | } | 345 | } |
346 | 346 | ||
347 | /* | 347 | /* |
348 | * FIXME | 348 | * FIXME |
349 | * The following NULL check is triggered by inserting, then removing a tab on the fly | 349 | * The following NULL check is triggered by inserting, then removing a tab on the fly |
350 | * as you would if you had removable media (which I do). Without this check | 350 | * as you would if you had removable media (which I do). Without this check |
351 | * the first app launched after a tab removal causes qpe to Segfault. | 351 | * the first app launched after a tab removal causes qpe to Segfault. |
352 | * This obviously has a more sinister cause, but this works around it with no | 352 | * This obviously has a more sinister cause, but this works around it with no |
353 | * obvious adverse effects. Please FIXME | 353 | * obvious adverse effects. Please FIXME |
354 | * bkc - 17/6/2004 | 354 | * bkc - 17/6/2004 |
355 | * | 355 | * |
356 | */ | 356 | */ |
357 | 357 | ||
358 | void LauncherTabWidget::setBusy(bool on) | 358 | void LauncherTabWidget::setBusy(bool on) |
359 | { | 359 | { |
360 | if ( on ) | 360 | if ( on ) |
361 | currentView()->setBusy(TRUE); | 361 | currentView()->setBusy(TRUE); |
362 | else { | 362 | else { |
363 | for ( int i = 0; i < categoryBar->count(); i++ ) { | 363 | for ( int i = 0; i < categoryBar->count(); i++ ) { |
364 | if (categoryBar->tab(i)) { | 364 | if (categoryBar->tab(i)) { |
365 | LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view; | 365 | LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view; |
366 | view->setBusy( FALSE ); | 366 | view->setBusy( FALSE ); |
367 | } else { | 367 | } else { |
368 | odebug << "Averting Disaster with tab " << i << " == NULL! " << oendl; | 368 | odebug << "Averting Disaster with tab " << i << " == NULL! " << oendl; |
369 | } | 369 | } |
370 | } | 370 | } |
371 | } | 371 | } |
372 | } | 372 | } |
373 | 373 | ||
374 | void LauncherTabWidget::setBusyIndicatorType( const QString& str ) { | 374 | void LauncherTabWidget::setBusyIndicatorType( const QString& str ) { |
375 | for (int i = 0; i < categoryBar->count(); i++ ) { | 375 | for (int i = 0; i < categoryBar->count(); i++ ) { |
376 | LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view; | 376 | LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view; |
377 | view->setBusyIndicatorType( str ); | 377 | view->setBusyIndicatorType( str ); |
378 | } | 378 | } |
379 | } | 379 | } |
380 | 380 | ||
381 | LauncherView *LauncherTabWidget::currentView(void) | 381 | LauncherView *LauncherTabWidget::currentView(void) |
382 | { | 382 | { |
383 | return (LauncherView*)stack->visibleWidget(); | 383 | return (LauncherView*)stack->visibleWidget(); |
384 | } | 384 | } |
385 | 385 | ||
386 | 386 | ||
387 | 387 | ||
388 | void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &data) | 388 | void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &data) |
389 | { | 389 | { |
390 | QDataStream stream( data, IO_ReadOnly ); | 390 | QDataStream stream( data, IO_ReadOnly ); |
391 | if ( msg == "setTabView(QString,int)" ) { | 391 | if ( msg == "setTabView(QString,int)" ) { |
392 | QString id; | 392 | QString id; |
393 | stream >> id; | 393 | stream >> id; |
394 | int mode; | 394 | int mode; |
395 | stream >> mode; | 395 | stream >> mode; |
396 | if ( view(id) ) | 396 | if ( view(id) ) |
397 | view(id)->setViewMode( (LauncherView::ViewMode)mode ); | 397 | view(id)->setViewMode( (LauncherView::ViewMode)mode ); |
398 | } else if ( msg == "setTabBackground(QString,int,QString)" ) { | 398 | } else if ( msg == "setTabBackground(QString,int,QString)" ) { |
399 | QString id; | 399 | QString id; |
400 | stream >> id; | 400 | stream >> id; |
401 | int mode; | 401 | int mode; |
402 | stream >> mode; | 402 | stream >> mode; |
403 | QString pixmapOrColor; | 403 | QString pixmapOrColor; |
404 | stream >> pixmapOrColor; | 404 | stream >> pixmapOrColor; |
405 | if ( view(id) ) | 405 | if ( view(id) ) |
406 | view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); | 406 | view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); |
407 | if ( id == "Documents" ) | 407 | if ( id == "Documents" ) |
408 | docLoadingWidget->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); | 408 | docLoadingWidget->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); |
409 | } else if ( msg == "setTextColor(QString,QString)" ) { | 409 | } else if ( msg == "setTextColor(QString,QString)" ) { |
410 | QString id; | 410 | QString id; |
411 | stream >> id; | 411 | stream >> id; |
412 | QString color; | 412 | QString color; |
413 | stream >> color; | 413 | stream >> color; |
414 | if ( view(id) ) | 414 | if ( view(id) ) |
415 | view(id)->setTextColor( QColor(color) ); | 415 | view(id)->setTextColor( QColor(color) ); |
416 | if ( id == "Documents" ) | 416 | if ( id == "Documents" ) |
417 | docLoadingWidget->setTextColor( QColor(color) ); | 417 | docLoadingWidget->setTextColor( QColor(color) ); |
418 | } else if ( msg == "setIconColumns(QString,int)" ) { | 418 | } else if ( msg == "setIconColumns(QString,int)" ) { |
419 | QString id; | 419 | QString id; |
420 | stream >> id; | 420 | stream >> id; |
421 | int number; | 421 | int number; |
422 | stream >> number; | 422 | stream >> number; |
423 | if ( view(id ) ) | 423 | if ( view(id ) ) |
424 | view(id)->setColNumber( number ); | 424 | view(id)->setColNumber( number ); |
425 | } else if ( msg == "setFont(QString,QString,int,int,int)" ) { | 425 | } else if ( msg == "setFont(QString,QString,int,int,int)" ) { |
426 | QString id; | 426 | QString id; |
427 | stream >> id; | 427 | stream >> id; |
428 | QString fam; | 428 | QString fam; |
429 | stream >> fam; | 429 | stream >> fam; |
430 | int size; | 430 | int size; |
431 | stream >> size; | 431 | stream >> size; |
432 | int weight; | 432 | int weight; |
433 | stream >> weight; | 433 | stream >> weight; |
434 | int italic; | 434 | int italic; |
435 | stream >> italic; | 435 | stream >> italic; |
436 | if ( view(id) ) { | 436 | if ( view(id) ) { |
437 | if ( !fam.isEmpty() ) { | 437 | if ( !fam.isEmpty() ) { |
438 | view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); | 438 | view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); |
439 | odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl; | 439 | odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl; |
440 | } else { | 440 | } else { |
441 | view(id)->clearViewFont(); | 441 | view(id)->clearViewFont(); |
442 | } | 442 | } |
443 | } | 443 | } |
444 | }else if ( msg == "setBusyIndicatorType(QString)" ) { | 444 | }else if ( msg == "setBusyIndicatorType(QString)" ) { |
445 | QString type; | 445 | QString type; |
446 | stream >> type; | 446 | stream >> type; |
447 | setBusyIndicatorType( type ); | 447 | setBusyIndicatorType( type ); |
448 | }else if ( msg == "home()" ) { | 448 | }else if ( msg == "home()" ) { |
449 | if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) { | 449 | if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) { |
450 | if (categoryBar) | 450 | if (categoryBar) |
451 | categoryBar->nextTab(); | 451 | categoryBar->nextTab(); |
452 | }else { | 452 | }else { |
453 | static_cast<QWidget*>(parent())->raise(); | 453 | static_cast<QWidget*>(parent())->raise(); |
454 | } | 454 | } |
455 | } else if (msg=="doctabEnabled(int)") { | 455 | } else if (msg=="doctabEnabled(int)") { |
456 | int id; stream >> id; | 456 | int id; stream >> id; |
457 | odebug << "Doctab enabled " << id << oendl; | 457 | odebug << "Doctab enabled " << id << oendl; |
458 | reCheckDoctab(id); | 458 | reCheckDoctab(id); |
459 | } else if ( msg == "setStaticBackground(bool)" ) { | ||
460 | int set; stream >> set; | ||
461 | odebug << "setStaticBackground " << set << oendl; | ||
462 | for (int i = 0; i < categoryBar->count(); i++ ) | ||
463 | { | ||
464 | LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view; | ||
465 | view->iconView()->setStaticBackgroundPicture( set ); | ||
466 | } | ||
459 | } | 467 | } |
460 | } | 468 | } |
461 | 469 | ||
462 | void LauncherTabWidget::reCheckDoctab(int how) | 470 | void LauncherTabWidget::reCheckDoctab(int how) |
463 | { | 471 | { |
464 | if ((bool)how == docTabEnabled) { | 472 | if ((bool)how == docTabEnabled) { |
465 | /* nothing to do */ | 473 | /* nothing to do */ |
466 | return; | 474 | return; |
467 | } | 475 | } |
468 | if (docLoadingWidget) { | 476 | if (docLoadingWidget) { |
469 | stack->removeWidget(docLoadingWidget); | 477 | stack->removeWidget(docLoadingWidget); |
470 | delete docLoadingWidget; | 478 | delete docLoadingWidget; |
471 | docLoadingWidget = 0; | 479 | docLoadingWidget = 0; |
472 | } | 480 | } |
473 | createDocLoadingWidget(); | 481 | createDocLoadingWidget(); |
474 | { | 482 | { |
475 | QCopEnvelope( "QPE/System", "reforceDocuments()" ); | 483 | QCopEnvelope( "QPE/System", "reforceDocuments()" ); |
476 | odebug << "Sending doc rescan" << oendl; | 484 | odebug << "Sending doc rescan" << oendl; |
477 | } | 485 | } |
478 | } | 486 | } |
479 | 487 | ||
480 | //--------------------------------------------------------------------------- | 488 | //--------------------------------------------------------------------------- |
481 | 489 | ||
482 | Launcher::Launcher() | 490 | Launcher::Launcher() |
483 | : QMainWindow( 0, "PDA User Interface", QWidget::WStyle_Customize | QWidget::WGroupLeader ) | 491 | : QMainWindow( 0, "PDA User Interface", QWidget::WStyle_Customize | QWidget::WGroupLeader ) |
484 | { | 492 | { |
485 | tabs = 0; | 493 | tabs = 0; |
486 | tb = 0; | 494 | tb = 0; |
487 | Config cfg( "Launcher" ); | 495 | Config cfg( "Launcher" ); |
488 | cfg.setGroup( "DocTab" ); | 496 | cfg.setGroup( "DocTab" ); |
489 | docTabEnabled = cfg.readBoolEntry( "Enable", true ); | 497 | docTabEnabled = cfg.readBoolEntry( "Enable", true ); |
490 | } | 498 | } |
491 | 499 | ||
492 | void Launcher::createGUI() | 500 | void Launcher::createGUI() |
493 | { | 501 | { |
494 | setCaption( tr("Launcher") ); | 502 | setCaption( tr("Launcher") ); |
495 | 503 | ||
496 | // we have a pretty good idea how big we'll be | 504 | // we have a pretty good idea how big we'll be |
497 | setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); | 505 | setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); |
498 | 506 | ||
499 | tb = new TaskBar; | 507 | tb = new TaskBar; |
500 | tabs = new LauncherTabWidget( this ); | 508 | tabs = new LauncherTabWidget( this ); |
501 | setCentralWidget( tabs ); | 509 | setCentralWidget( tabs ); |
502 | 510 | ||
503 | ServerInterface::dockWidget( tb, ServerInterface::Bottom ); | 511 | ServerInterface::dockWidget( tb, ServerInterface::Bottom ); |
504 | tb->show(); | 512 | tb->show(); |
505 | 513 | ||
506 | qApp->installEventFilter( this ); | 514 | qApp->installEventFilter( this ); |
507 | 515 | ||
508 | connect( tb, SIGNAL(tabSelected(const QString&)), | 516 | connect( tb, SIGNAL(tabSelected(const QString&)), |
509 | this, SLOT(showTab(const QString&)) ); | 517 | this, SLOT(showTab(const QString&)) ); |
510 | connect( tabs, SIGNAL(selected(const QString&)), | 518 | connect( tabs, SIGNAL(selected(const QString&)), |
511 | this, SLOT(viewSelected(const QString&)) ); | 519 | this, SLOT(viewSelected(const QString&)) ); |
512 | connect( tabs, SIGNAL(clicked(const AppLnk*)), | 520 | connect( tabs, SIGNAL(clicked(const AppLnk*)), |
513 | this, SLOT(select(const AppLnk*))); | 521 | this, SLOT(select(const AppLnk*))); |
514 | connect( tabs, SIGNAL(rightPressed(AppLnk*)), | 522 | connect( tabs, SIGNAL(rightPressed(AppLnk*)), |
515 | this, SLOT(properties(AppLnk*))); | 523 | this, SLOT(properties(AppLnk*))); |
516 | 524 | ||
517 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 525 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
518 | QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); | 526 | QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); |
519 | connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), | 527 | connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), |
520 | this, SLOT(systemMessage(const QCString&,const QByteArray&)) ); | 528 | this, SLOT(systemMessage(const QCString&,const QByteArray&)) ); |
521 | #endif | 529 | #endif |
522 | 530 | ||
523 | // all documents | 531 | // all documents |
524 | QImage img( Resource::loadImage( "DocsIcon" ) ); | 532 | QImage img( Resource::loadImage( "DocsIcon" ) ); |
525 | QPixmap pm; | 533 | QPixmap pm; |
526 | pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | 534 | pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); |
527 | // It could add this itself if it handles docs | 535 | // It could add this itself if it handles docs |
528 | 536 | ||
529 | tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE ); | 537 | tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE ); |
530 | 538 | ||
531 | QTimer::singleShot( 0, tabs, SLOT( initLayout() ) ); | 539 | QTimer::singleShot( 0, tabs, SLOT( initLayout() ) ); |
532 | qApp->setMainWidget( this ); | 540 | qApp->setMainWidget( this ); |
533 | QTimer::singleShot( 500, this, SLOT( makeVisible() ) ); | 541 | QTimer::singleShot( 500, this, SLOT( makeVisible() ) ); |
534 | } | 542 | } |
535 | 543 | ||
536 | Launcher::~Launcher() | 544 | Launcher::~Launcher() |
537 | { | 545 | { |
538 | if ( tb ) | 546 | if ( tb ) |
539 | destroyGUI(); | 547 | destroyGUI(); |
540 | } | 548 | } |
541 | 549 | ||
542 | bool Launcher::requiresDocuments() const | 550 | bool Launcher::requiresDocuments() const |
543 | { | 551 | { |
544 | Config cfg( "Launcher" ); | 552 | Config cfg( "Launcher" ); |
545 | cfg.setGroup( "DocTab" ); | 553 | cfg.setGroup( "DocTab" ); |
546 | return cfg.readBoolEntry( "Enable", true ); | 554 | return cfg.readBoolEntry( "Enable", true ); |
547 | } | 555 | } |
548 | 556 | ||
549 | void Launcher::makeVisible() | 557 | void Launcher::makeVisible() |
550 | { | 558 | { |
551 | showMaximized(); | 559 | showMaximized(); |
552 | } | 560 | } |
553 | 561 | ||
554 | void Launcher::destroyGUI() | 562 | void Launcher::destroyGUI() |
555 | { | 563 | { |
556 | delete tb; | 564 | delete tb; |
557 | tb = 0; | 565 | tb = 0; |
558 | delete tabs; | 566 | delete tabs; |
559 | tabs =0; | 567 | tabs =0; |
560 | } | 568 | } |
561 | 569 | ||
562 | bool Launcher::eventFilter( QObject*, QEvent *ev ) | 570 | bool Launcher::eventFilter( QObject*, QEvent *ev ) |
563 | { | 571 | { |
564 | #ifdef QT_QWS_CUSTOM | 572 | #ifdef QT_QWS_CUSTOM |
565 | if ( ev->type() == QEvent::KeyPress ) { | 573 | if ( ev->type() == QEvent::KeyPress ) { |
566 | QKeyEvent *ke = (QKeyEvent *)ev; | 574 | QKeyEvent *ke = (QKeyEvent *)ev; |
567 | if ( ke->key() == Qt::Key_F11 ) { // menu key | 575 | if ( ke->key() == Qt::Key_F11 ) { // menu key |
568 | QWidget *active = qApp->activeWindow(); | 576 | QWidget *active = qApp->activeWindow(); |
569 | if ( active && active->isPopup() ) | 577 | if ( active && active->isPopup() ) |
570 | active->close(); | 578 | active->close(); |
571 | else { | 579 | else { |
572 | Global::terminateBuiltin("calibrate"); // No tr | 580 | Global::terminateBuiltin("calibrate"); // No tr |
573 | tb->launchStartMenu(); | 581 | tb->launchStartMenu(); |
574 | } | 582 | } |
575 | return TRUE; | 583 | return TRUE; |
576 | } | 584 | } |
577 | } | 585 | } |
578 | #else | 586 | #else |
579 | Q_UNUSED(ev); | 587 | Q_UNUSED(ev); |
580 | #endif | 588 | #endif |
581 | return FALSE; | 589 | return FALSE; |
582 | } | 590 | } |
583 | 591 | ||
584 | static bool isVisibleWindow(int wid) | 592 | static bool isVisibleWindow(int wid) |
585 | { | 593 | { |
586 | #ifdef Q_WS_QWS | 594 | #ifdef Q_WS_QWS |
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index e7229ee..a4c7561 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -169,338 +169,348 @@ void LauncherItem::paintItem( QPainter *p, const QColorGroup &cg ) | |||
169 | // Paint animation overlay | 169 | // Paint animation overlay |
170 | if ( liv->busyItem() == this ) | 170 | if ( liv->busyItem() == this ) |
171 | paintAnimatedIcon(p); | 171 | paintAnimatedIcon(p); |
172 | 172 | ||
173 | if ( liv->currentItem() == this ) | 173 | if ( liv->currentItem() == this ) |
174 | liv->setItemTextBackground( oldBrush ); | 174 | liv->setItemTextBackground( oldBrush ); |
175 | } | 175 | } |
176 | 176 | ||
177 | void LauncherItem::paintAnimatedIcon( QPainter *p ) | 177 | void LauncherItem::paintAnimatedIcon( QPainter *p ) |
178 | { | 178 | { |
179 | LauncherIconView* liv = (LauncherIconView*)iconView(); | 179 | LauncherIconView* liv = (LauncherIconView*)iconView(); |
180 | int pic = iteration % 16; | 180 | int pic = iteration % 16; |
181 | int w = pixmap()->width(), h = pixmap()->height(); | 181 | int w = pixmap()->width(), h = pixmap()->height(); |
182 | QPixmap dblBuf( w, h + 4 ); | 182 | QPixmap dblBuf( w, h + 4 ); |
183 | QPainter p2( &dblBuf ); | 183 | QPainter p2( &dblBuf ); |
184 | int x1, y1; | 184 | int x1, y1; |
185 | if ( liv->itemTextPos() == QIconView::Bottom ) { | 185 | if ( liv->itemTextPos() == QIconView::Bottom ) { |
186 | x1 = x() + (width() - w) / 2 - liv->contentsX(); | 186 | x1 = x() + (width() - w) / 2 - liv->contentsX(); |
187 | y1 = y() - liv->contentsY(); | 187 | y1 = y() - liv->contentsY(); |
188 | } else { | 188 | } else { |
189 | x1 = x() - liv->contentsX(); | 189 | x1 = x() - liv->contentsX(); |
190 | y1 = y() + (height() - h) / 2 - liv->contentsY(); | 190 | y1 = y() + (height() - h) / 2 - liv->contentsY(); |
191 | } | 191 | } |
192 | y1 -= 2; | 192 | y1 -= 2; |
193 | p2.translate(-x1,-y1); | 193 | p2.translate(-x1,-y1); |
194 | liv->drawBackground( &p2, QRect(x1,y1,w,h+4) ); | 194 | liv->drawBackground( &p2, QRect(x1,y1,w,h+4) ); |
195 | int bounceY = 2; | 195 | int bounceY = 2; |
196 | #ifdef BOUNCE_BUSY_ICON | 196 | #ifdef BOUNCE_BUSY_ICON |
197 | if ( busyType == BIT_Animated ) { | 197 | if ( busyType == BIT_Animated ) { |
198 | bounceY = 4 - ((iteration+2)%8); | 198 | bounceY = 4 - ((iteration+2)%8); |
199 | bounceY = bounceY < 0 ? -bounceY : bounceY; | 199 | bounceY = bounceY < 0 ? -bounceY : bounceY; |
200 | } | 200 | } |
201 | #endif | 201 | #endif |
202 | p2.drawPixmap( x1, y1 + bounceY, *pixmap() ); | 202 | p2.drawPixmap( x1, y1 + bounceY, *pixmap() ); |
203 | #ifdef USE_ANIMATED_BUSY_ICON_OVERLAY | 203 | #ifdef USE_ANIMATED_BUSY_ICON_OVERLAY |
204 | p2.drawPixmap( x1, y1 + bounceY, liv->busyPixmap(), w * pic, 0, w, h ); | 204 | p2.drawPixmap( x1, y1 + bounceY, liv->busyPixmap(), w * pic, 0, w, h ); |
205 | #else | 205 | #else |
206 | Q_UNUSED( pic ) | 206 | Q_UNUSED( pic ) |
207 | #endif | 207 | #endif |
208 | p->drawPixmap( x1, y1, dblBuf ); | 208 | p->drawPixmap( x1, y1, dblBuf ); |
209 | } | 209 | } |
210 | 210 | ||
211 | void LauncherItem::animateIcon() | 211 | void LauncherItem::animateIcon() |
212 | { | 212 | { |
213 | LauncherIconView* liv = (LauncherIconView*)iconView(); | 213 | LauncherIconView* liv = (LauncherIconView*)iconView(); |
214 | 214 | ||
215 | if ( liv->busyItem() != this || !app ) | 215 | if ( liv->busyItem() != this || !app ) |
216 | return; | 216 | return; |
217 | 217 | ||
218 | // Highlight the icon | 218 | // Highlight the icon |
219 | if ( iteration == 0 ) { | 219 | if ( iteration == 0 ) { |
220 | QPixmap src; | 220 | QPixmap src; |
221 | pixiter it; | 221 | pixiter it; |
222 | if (isEyeImage() && (it=LauncherIconView::sm_EyeCache->find(appLnk()->file()))!=LauncherIconView::sm_EyeCache->end()) { | 222 | if (isEyeImage() && (it=LauncherIconView::sm_EyeCache->find(appLnk()->file()))!=LauncherIconView::sm_EyeCache->end()) { |
223 | src = (*it); | 223 | src = (*it); |
224 | } else { | 224 | } else { |
225 | src = ((isBigIcon ? app->bigPixmap() : app->pixmap())); | 225 | src = ((isBigIcon ? app->bigPixmap() : app->pixmap())); |
226 | } | 226 | } |
227 | QImage img = src.convertToImage(); | 227 | QImage img = src.convertToImage(); |
228 | QRgb *rgb; | 228 | QRgb *rgb; |
229 | int count; | 229 | int count; |
230 | if ( img.depth() == 32 ) { | 230 | if ( img.depth() == 32 ) { |
231 | rgb = (QRgb*)img.bits(); | 231 | rgb = (QRgb*)img.bits(); |
232 | count = img.bytesPerLine()/sizeof(QRgb)*img.height(); | 232 | count = img.bytesPerLine()/sizeof(QRgb)*img.height(); |
233 | } else { | 233 | } else { |
234 | rgb = img.colorTable(); | 234 | rgb = img.colorTable(); |
235 | count = img.numColors(); | 235 | count = img.numColors(); |
236 | } | 236 | } |
237 | for ( int r = 0; r < count; r++, rgb++ ) { | 237 | for ( int r = 0; r < count; r++, rgb++ ) { |
238 | #if defined(BRIGHTEN_BUSY_ICON) | 238 | #if defined(BRIGHTEN_BUSY_ICON) |
239 | QColor c(*rgb); | 239 | QColor c(*rgb); |
240 | int h, s, v; | 240 | int h, s, v; |
241 | c.hsv(&h,&s,&v); | 241 | c.hsv(&h,&s,&v); |
242 | c.setHsv(h,QMAX(s-24,0),QMIN(v+48,255)); | 242 | c.setHsv(h,QMAX(s-24,0),QMIN(v+48,255)); |
243 | *rgb = qRgba(c.red(),c.green(),c.blue(),qAlpha(*rgb)); | 243 | *rgb = qRgba(c.red(),c.green(),c.blue(),qAlpha(*rgb)); |
244 | #elif defined(ALPHA_FADE_BUSY_ICON) | 244 | #elif defined(ALPHA_FADE_BUSY_ICON) |
245 | *rgb = qRgba(qRed(*rgb),qGreen(*rgb),qBlue(*rgb),qAlpha(*rgb)/2); | 245 | *rgb = qRgba(qRed(*rgb),qGreen(*rgb),qBlue(*rgb),qAlpha(*rgb)/2); |
246 | #endif | 246 | #endif |
247 | } | 247 | } |
248 | src.convertFromImage( img ); | 248 | src.convertFromImage( img ); |
249 | setPixmap( src ); | 249 | setPixmap( src ); |
250 | } | 250 | } |
251 | 251 | ||
252 | iteration++; | 252 | iteration++; |
253 | 253 | ||
254 | // Paint animation overlay | 254 | // Paint animation overlay |
255 | QPainter p( liv->viewport() ); | 255 | QPainter p( liv->viewport() ); |
256 | paintAnimatedIcon( &p ); | 256 | paintAnimatedIcon( &p ); |
257 | } | 257 | } |
258 | 258 | ||
259 | void LauncherItem::resetIcon() | 259 | void LauncherItem::resetIcon() |
260 | { | 260 | { |
261 | iteration = 0; | 261 | iteration = 0; |
262 | if (isEyeImage()) { | 262 | if (isEyeImage()) { |
263 | QMap<QString,QPixmap>::Iterator it = LauncherIconView::sm_EyeCache->find(appLnk()->file()); | 263 | QMap<QString,QPixmap>::Iterator it = LauncherIconView::sm_EyeCache->find(appLnk()->file()); |
264 | if (it != LauncherIconView::sm_EyeCache->end()) { | 264 | if (it != LauncherIconView::sm_EyeCache->end()) { |
265 | setPixmap(*it); | 265 | setPixmap(*it); |
266 | return; | 266 | return; |
267 | } | 267 | } |
268 | } | 268 | } |
269 | setPixmap(isBigIcon ? app->bigPixmap() : app->pixmap()); | 269 | setPixmap(isBigIcon ? app->bigPixmap() : app->pixmap()); |
270 | } | 270 | } |
271 | 271 | ||
272 | void LauncherItem::setEyePixmap(const QPixmap&aIcon) | 272 | void LauncherItem::setEyePixmap(const QPixmap&aIcon) |
273 | { | 273 | { |
274 | if (!isEyeImage()) return; | 274 | if (!isEyeImage()) return; |
275 | setPixmap(aIcon); | 275 | setPixmap(aIcon); |
276 | m_EyeImageSet = EYE_ICON; | 276 | m_EyeImageSet = EYE_ICON; |
277 | } | 277 | } |
278 | 278 | ||
279 | //=========================================================================== | 279 | //=========================================================================== |
280 | // Implemantation of LauncherIconview start | 280 | // Implemantation of LauncherIconview start |
281 | //=========================================================================== | 281 | //=========================================================================== |
282 | 282 | ||
283 | QMap<QString,QPixmap>* LauncherIconView::sm_EyeCache=0; | 283 | QMap<QString,QPixmap>* LauncherIconView::sm_EyeCache=0; |
284 | 284 | ||
285 | LauncherIconView::LauncherIconView( QWidget* parent, const char* name ) | 285 | LauncherIconView::LauncherIconView( QWidget* parent, const char* name ) |
286 | : QIconView(parent,name),tf(""),cf(0),bsy(0),busyTimer(0),bigIcns(TRUE),bgColor(white),numColumns(0) | 286 | : QIconView(parent,name),tf(""),cf(0),bsy(0),busyTimer(0),bigIcns(TRUE),bgColor(white),numColumns(0) |
287 | { | 287 | { |
288 | m_EyeCallBack = 0; | 288 | m_EyeCallBack = 0; |
289 | if (!sm_EyeCache) sm_EyeCache = new QMap<QString,QPixmap>(); | 289 | if (!sm_EyeCache) sm_EyeCache = new QMap<QString,QPixmap>(); |
290 | sortmeth = Name; | 290 | sortmeth = Name; |
291 | hidden.setAutoDelete(TRUE); | 291 | hidden.setAutoDelete(TRUE); |
292 | ike = FALSE; | 292 | ike = FALSE; |
293 | calculateGrid( Bottom ); | 293 | calculateGrid( Bottom ); |
294 | connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer())); | 294 | connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer())); |
295 | Config config( "Launcher" ); | 295 | Config config( "Launcher" ); |
296 | config.setGroup( "GUI" ); | 296 | config.setGroup( "GUI" ); |
297 | staticBackground = config.readEntry( "StaticBackground", false ); | 297 | setStaticBackgroundPicture( config.readBoolEntry( "StaticBackground", true ) ); |
298 | if ( staticBackground ) | ||
299 | { | ||
300 | setStaticBackground( true ); | ||
301 | verticalScrollBar()->setTracking( false ); | ||
302 | } | ||
303 | } | 298 | } |
304 | 299 | ||
305 | LauncherIconView::~LauncherIconView() | 300 | LauncherIconView::~LauncherIconView() |
306 | { | 301 | { |
307 | odebug << "LauncherIconView::~LauncherIconView()" << oendl; | 302 | odebug << "LauncherIconView::~LauncherIconView()" << oendl; |
308 | #if 0 // debuggery | 303 | #if 0 // debuggery |
309 | QListIterator<AppLnk> it(hidden); | 304 | QListIterator<AppLnk> it(hidden); |
310 | AppLnk* l; | 305 | AppLnk* l; |
311 | while ((l=it.current())) { | 306 | while ((l=it.current())) { |
312 | ++it; | 307 | ++it; |
313 | //odebug << "" << l << ": hidden (should remove)" << oendl; | 308 | //odebug << "" << l << ": hidden (should remove)" << oendl; |
314 | } | 309 | } |
315 | #endif | 310 | #endif |
316 | } | 311 | } |
317 | 312 | ||
313 | void LauncherIconView::setStaticBackgroundPicture( bool enable ) | ||
314 | { | ||
315 | staticBackground = enable; | ||
316 | if ( staticBackground ) | ||
317 | { | ||
318 | setStaticBackground( true ); | ||
319 | verticalScrollBar()->setTracking( false ); | ||
320 | } | ||
321 | else | ||
322 | { | ||
323 | setStaticBackground( false ); | ||
324 | verticalScrollBar()->setTracking( true ); | ||
325 | } | ||
326 | } | ||
327 | |||
318 | int LauncherIconView::compare(const AppLnk* a, const AppLnk* b) | 328 | int LauncherIconView::compare(const AppLnk* a, const AppLnk* b) |
319 | { | 329 | { |
320 | switch (sortmeth) { | 330 | switch (sortmeth) { |
321 | case Name: | 331 | case Name: |
322 | return a->name().lower().compare(b->name().lower()); | 332 | return a->name().lower().compare(b->name().lower()); |
323 | case Date: { | 333 | case Date: { |
324 | QFileInfo fa(a->linkFileKnown() ? a->linkFile() : a->file()); | 334 | QFileInfo fa(a->linkFileKnown() ? a->linkFile() : a->file()); |
325 | QFileInfo fb(b->linkFileKnown() ? b->linkFile() : b->file()); | 335 | QFileInfo fb(b->linkFileKnown() ? b->linkFile() : b->file()); |
326 | return fa.lastModified().secsTo(fb.lastModified()); | 336 | return fa.lastModified().secsTo(fb.lastModified()); |
327 | } | 337 | } |
328 | case Type: | 338 | case Type: |
329 | return a->type().compare(b->type()); | 339 | return a->type().compare(b->type()); |
330 | } | 340 | } |
331 | return 0; | 341 | return 0; |
332 | } | 342 | } |
333 | 343 | ||
334 | void LauncherIconView::setSortMethod( SortMethod m ) | 344 | void LauncherIconView::setSortMethod( SortMethod m ) |
335 | { | 345 | { |
336 | if ( sortmeth != m ) { | 346 | if ( sortmeth != m ) { |
337 | sortmeth = m; | 347 | sortmeth = m; |
338 | sort(); | 348 | sort(); |
339 | } | 349 | } |
340 | } | 350 | } |
341 | 351 | ||
342 | void LauncherIconView::setCategoryFilter( int catfilter, bool resort ) | 352 | void LauncherIconView::setCategoryFilter( int catfilter, bool resort ) |
343 | { | 353 | { |
344 | if ( catfilter == -2 ) | 354 | if ( catfilter == -2 ) |
345 | cf = 0; | 355 | cf = 0; |
346 | else | 356 | else |
347 | cf = catfilter; | 357 | cf = catfilter; |
348 | hideOrShowItems(resort); | 358 | hideOrShowItems(resort); |
349 | } | 359 | } |
350 | 360 | ||
351 | void LauncherIconView::setTypeFilter(const QString& typefilter, bool resort) | 361 | void LauncherIconView::setTypeFilter(const QString& typefilter, bool resort) |
352 | { | 362 | { |
353 | tf = QRegExp(typefilter,FALSE,TRUE); | 363 | tf = QRegExp(typefilter,FALSE,TRUE); |
354 | hideOrShowItems(resort); | 364 | hideOrShowItems(resort); |
355 | } | 365 | } |
356 | 366 | ||
357 | void LauncherIconView::setItemTextPos( ItemTextPos pos ) | 367 | void LauncherIconView::setItemTextPos( ItemTextPos pos ) |
358 | { | 368 | { |
359 | calculateGrid( pos ); | 369 | calculateGrid( pos ); |
360 | QIconView::setItemTextPos( pos ); | 370 | QIconView::setItemTextPos( pos ); |
361 | } | 371 | } |
362 | 372 | ||
363 | void LauncherIconView::drawBackground( QPainter *p, const QRect &r ) | 373 | void LauncherIconView::drawBackground( QPainter *p, const QRect &r ) |
364 | { | 374 | { |
365 | if ( bgPixmap.isNull() ) | 375 | if ( bgPixmap.isNull() ) |
366 | { | 376 | { |
367 | p->fillRect( r, bgColor ); | 377 | p->fillRect( r, bgColor ); |
368 | } | 378 | } |
369 | else | 379 | else |
370 | { | 380 | { |
371 | if ( staticBackground ) | 381 | if ( staticBackground ) |
372 | { | 382 | { |
373 | p->drawPixmap( r.x(), r.y(), bgPixmap, r.x(), r.y(), r.width(), r.height() ); | 383 | p->drawTiledPixmap( r, bgPixmap, QPoint( r.x() % bgPixmap.width(), r.y() % bgPixmap.height() ) ); |
374 | } | 384 | } |
375 | else | 385 | else |
376 | { | 386 | { |
377 | p->drawTiledPixmap( r, bgPixmap, QPoint( (r.x() + contentsX()) % bgPixmap.width(), | 387 | p->drawTiledPixmap( r, bgPixmap, QPoint( (r.x() + contentsX()) % bgPixmap.width(), |
378 | (r.y() + contentsY()) % bgPixmap.height() ) ); | 388 | (r.y() + contentsY()) % bgPixmap.height() ) ); |
379 | } | 389 | } |
380 | } | 390 | } |
381 | } | 391 | } |
382 | 392 | ||
383 | void LauncherIconView::addCatsAndMimes(AppLnk* app) | 393 | void LauncherIconView::addCatsAndMimes(AppLnk* app) |
384 | { | 394 | { |
385 | // QStringList c = app->categories(); | 395 | // QStringList c = app->categories(); |
386 | // for (QStringList::ConstIterator cit=c.begin(); cit!=c.end(); ++cit) { | 396 | // for (QStringList::ConstIterator cit=c.begin(); cit!=c.end(); ++cit) { |
387 | // cats.replace(*cit,(void*)1); | 397 | // cats.replace(*cit,(void*)1); |
388 | // } | 398 | // } |
389 | QString maj=app->type(); | 399 | QString maj=app->type(); |
390 | int sl=maj.find('/'); | 400 | int sl=maj.find('/'); |
391 | if (sl>=0) { | 401 | if (sl>=0) { |
392 | QString k; | 402 | QString k; |
393 | k = maj.left(12) == "application/" ? maj : maj.left(sl); | 403 | k = maj.left(12) == "application/" ? maj : maj.left(sl); |
394 | mimes.replace(k,(void*)1); | 404 | mimes.replace(k,(void*)1); |
395 | } | 405 | } |
396 | } | 406 | } |
397 | 407 | ||
398 | void LauncherIconView::setBusy(bool on) | 408 | void LauncherIconView::setBusy(bool on) |
399 | { | 409 | { |
400 | #ifdef USE_ANIMATED_BUSY_ICON_OVERLAY | 410 | #ifdef USE_ANIMATED_BUSY_ICON_OVERLAY |
401 | if ( busyPix.isNull() ) { | 411 | if ( busyPix.isNull() ) { |
402 | int size = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); | 412 | int size = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); |
403 | busyPix.convertFromImage( Resource::loadImage( "busy" ).smoothScale( size * 16, size ) ); | 413 | busyPix.convertFromImage( Resource::loadImage( "busy" ).smoothScale( size * 16, size ) ); |
404 | } | 414 | } |
405 | #endif | 415 | #endif |
406 | 416 | ||
407 | if ( on ) { | 417 | if ( on ) { |
408 | busyTimer = startTimer( 100 ); | 418 | busyTimer = startTimer( 100 ); |
409 | } else { | 419 | } else { |
410 | if ( busyTimer ) { | 420 | if ( busyTimer ) { |
411 | killTimer( busyTimer ); | 421 | killTimer( busyTimer ); |
412 | busyTimer = 0; | 422 | busyTimer = 0; |
413 | } | 423 | } |
414 | } | 424 | } |
415 | 425 | ||
416 | LauncherItem *c = on ? (LauncherItem*)currentItem() : 0; | 426 | LauncherItem *c = on ? (LauncherItem*)currentItem() : 0; |
417 | 427 | ||
418 | if ( bsy != c ) { | 428 | if ( bsy != c ) { |
419 | LauncherItem *oldBusy = bsy; | 429 | LauncherItem *oldBusy = bsy; |
420 | bsy = c; | 430 | bsy = c; |
421 | if ( oldBusy ) { | 431 | if ( oldBusy ) { |
422 | oldBusy->resetIcon(); | 432 | oldBusy->resetIcon(); |
423 | } | 433 | } |
424 | if ( bsy ) { | 434 | if ( bsy ) { |
425 | bsy->setBusyIndicatorType( busyType ) ; | 435 | bsy->setBusyIndicatorType( busyType ) ; |
426 | bsy->animateIcon(); | 436 | bsy->animateIcon(); |
427 | } | 437 | } |
428 | } | 438 | } |
429 | } | 439 | } |
430 | 440 | ||
431 | void LauncherIconView::clear() | 441 | void LauncherIconView::clear() |
432 | { | 442 | { |
433 | mimes.clear(); | 443 | mimes.clear(); |
434 | cats.clear(); | 444 | cats.clear(); |
435 | QIconView::clear(); | 445 | QIconView::clear(); |
436 | hidden.clear(); | 446 | hidden.clear(); |
437 | } | 447 | } |
438 | 448 | ||
439 | QStringList LauncherIconView::mimeTypes() const | 449 | QStringList LauncherIconView::mimeTypes() const |
440 | { | 450 | { |
441 | QStringList r; | 451 | QStringList r; |
442 | QDictIterator<void> it(mimes); | 452 | QDictIterator<void> it(mimes); |
443 | while (it.current()) { | 453 | while (it.current()) { |
444 | r.append(it.currentKey()); | 454 | r.append(it.currentKey()); |
445 | ++it; | 455 | ++it; |
446 | } | 456 | } |
447 | r.sort(); | 457 | r.sort(); |
448 | return r; | 458 | return r; |
449 | } | 459 | } |
450 | 460 | ||
451 | LauncherItem*LauncherIconView::findDocItem(const QString&fname) | 461 | LauncherItem*LauncherIconView::findDocItem(const QString&fname) |
452 | { | 462 | { |
453 | LauncherItem* item = (LauncherItem*)firstItem(); | 463 | LauncherItem* item = (LauncherItem*)firstItem(); |
454 | while (item) { | 464 | while (item) { |
455 | if (item->appLnk()->file()==fname) { | 465 | if (item->appLnk()->file()==fname) { |
456 | break; | 466 | break; |
457 | } | 467 | } |
458 | item = (LauncherItem*)item->nextItem(); | 468 | item = (LauncherItem*)item->nextItem(); |
459 | } | 469 | } |
460 | return item; | 470 | return item; |
461 | } | 471 | } |
462 | 472 | ||
463 | void LauncherIconView::setEyePixmap(const QPixmap&aPixmap,const QString&aFile,int width) | 473 | void LauncherIconView::setEyePixmap(const QPixmap&aPixmap,const QString&aFile,int width) |
464 | { | 474 | { |
465 | int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); | 475 | int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); |
466 | if (s!=width) return; | 476 | if (s!=width) return; |
467 | LauncherItem*item = findDocItem(aFile); | 477 | LauncherItem*item = findDocItem(aFile); |
468 | if (!item||!item->isEyeImage()) return; | 478 | if (!item||!item->isEyeImage()) return; |
469 | (*sm_EyeCache)[aFile]=aPixmap; | 479 | (*sm_EyeCache)[aFile]=aPixmap; |
470 | item->setEyePixmap(aPixmap); | 480 | item->setEyePixmap(aPixmap); |
471 | } | 481 | } |
472 | 482 | ||
473 | void LauncherIconView::checkCallback() | 483 | void LauncherIconView::checkCallback() |
474 | { | 484 | { |
475 | if (!m_EyeCallBack) { | 485 | if (!m_EyeCallBack) { |
476 | m_EyeCallBack = new LauncherThumbReceiver(); | 486 | m_EyeCallBack = new LauncherThumbReceiver(); |
477 | connect(m_EyeCallBack,SIGNAL(sig_Thumbnail(const QPixmap&,const QString&,int)), | 487 | connect(m_EyeCallBack,SIGNAL(sig_Thumbnail(const QPixmap&,const QString&,int)), |
478 | this,SLOT(setEyePixmap(const QPixmap&,const QString&,int))); | 488 | this,SLOT(setEyePixmap(const QPixmap&,const QString&,int))); |
479 | } | 489 | } |
480 | m_eyeTimer.changeInterval(600000); | 490 | m_eyeTimer.changeInterval(600000); |
481 | } | 491 | } |
482 | 492 | ||
483 | void LauncherIconView::addCheckItem(AppLnk* app) | 493 | void LauncherIconView::addCheckItem(AppLnk* app) |
484 | { | 494 | { |
485 | LauncherItem*item = new LauncherItem( this, app, bigIcns ); | 495 | LauncherItem*item = new LauncherItem( this, app, bigIcns ); |
486 | if (item->isEyeImage()) { | 496 | if (item->isEyeImage()) { |
487 | checkCallback(); | 497 | checkCallback(); |
488 | } | 498 | } |
489 | } | 499 | } |
490 | 500 | ||
491 | void LauncherIconView::requestEyePix(const LauncherItem*item) | 501 | void LauncherIconView::requestEyePix(const LauncherItem*item) |
492 | { | 502 | { |
493 | if (!item) return; | 503 | if (!item) return; |
494 | if (item->isEyeImage()) { | 504 | if (item->isEyeImage()) { |
495 | checkCallback(); | 505 | checkCallback(); |
496 | int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); | 506 | int s = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize(); |
497 | m_EyeCallBack->requestThumb(item->appLnk()->file(),s,s); | 507 | m_EyeCallBack->requestThumb(item->appLnk()->file(),s,s); |
498 | } | 508 | } |
499 | } | 509 | } |
500 | 510 | ||
501 | void LauncherIconView::stopEyeTimer() | 511 | void LauncherIconView::stopEyeTimer() |
502 | { | 512 | { |
503 | if (m_EyeCallBack) { | 513 | if (m_EyeCallBack) { |
504 | disconnect(m_EyeCallBack,SIGNAL(sig_Thumbnail(const QPixmap&,const QString&,int)), | 514 | disconnect(m_EyeCallBack,SIGNAL(sig_Thumbnail(const QPixmap&,const QString&,int)), |
505 | this,SLOT(setEyePixmap(const QPixmap&,const QString&,int))); | 515 | this,SLOT(setEyePixmap(const QPixmap&,const QString&,int))); |
506 | delete m_EyeCallBack; | 516 | delete m_EyeCallBack; |
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h index 97b1dea..6a2d197 100644 --- a/core/launcher/launcherview.h +++ b/core/launcher/launcherview.h | |||
@@ -1,254 +1,255 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef LAUNCHERVIEW_H | 20 | #ifndef LAUNCHERVIEW_H |
21 | #define LAUNCHERVIEW_H | 21 | #define LAUNCHERVIEW_H |
22 | 22 | ||
23 | #include <qtopia/storage.h> | 23 | #include <qtopia/storage.h> |
24 | #include <qtopia/applnk.h> | 24 | #include <qtopia/applnk.h> |
25 | 25 | ||
26 | #include <qvbox.h> | 26 | #include <qvbox.h> |
27 | #include <qiconview.h> | 27 | #include <qiconview.h> |
28 | #include <qtimer.h> | 28 | #include <qtimer.h> |
29 | #include <qmap.h> | 29 | #include <qmap.h> |
30 | 30 | ||
31 | class CategorySelect; | 31 | class CategorySelect; |
32 | class LauncherIconView; | 32 | class LauncherIconView; |
33 | class LauncherItem; | 33 | class LauncherItem; |
34 | class QIconViewItem; | 34 | class QIconViewItem; |
35 | class QLabel; | 35 | class QLabel; |
36 | class QWidgetStack; | 36 | class QWidgetStack; |
37 | class MenuButton; | 37 | class MenuButton; |
38 | class QComboBox; | 38 | class QComboBox; |
39 | 39 | ||
40 | enum BusyIndicatorType { | 40 | enum BusyIndicatorType { |
41 | BIT_Normal = 0, | 41 | BIT_Normal = 0, |
42 | BIT_Animated | 42 | BIT_Animated |
43 | }; | 43 | }; |
44 | 44 | ||
45 | class LauncherView : public QVBox | 45 | class LauncherView : public QVBox |
46 | { | 46 | { |
47 | Q_OBJECT | 47 | Q_OBJECT |
48 | 48 | ||
49 | public: | 49 | public: |
50 | LauncherView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 50 | LauncherView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
51 | ~LauncherView(); | 51 | ~LauncherView(); |
52 | 52 | ||
53 | void hideIcons(); | 53 | void hideIcons(); |
54 | 54 | ||
55 | bool removeLink(const QString& linkfile); | 55 | bool removeLink(const QString& linkfile); |
56 | void addItem(AppLnk* app, bool resort=TRUE); | 56 | void addItem(AppLnk* app, bool resort=TRUE); |
57 | void changeItem(const AppLnk&old,AppLnk*nlink); | 57 | void changeItem(const AppLnk&old,AppLnk*nlink); |
58 | 58 | ||
59 | void removeAllItems(); | 59 | void removeAllItems(); |
60 | void setSortEnabled(bool); | 60 | void setSortEnabled(bool); |
61 | void setUpdatesEnabled(bool); | 61 | void setUpdatesEnabled(bool); |
62 | void sort(); | 62 | void sort(); |
63 | 63 | ||
64 | void setToolsEnabled(bool); | 64 | void setToolsEnabled(bool); |
65 | void updateTools(); | 65 | void updateTools(); |
66 | 66 | ||
67 | void setBusy(bool); | 67 | void setBusy(bool); |
68 | void setBusyIndicatorType( const QString& ); | 68 | void setBusyIndicatorType( const QString& ); |
69 | 69 | ||
70 | enum ViewMode { Icon, List }; | 70 | enum ViewMode { Icon, List }; |
71 | void setViewMode( ViewMode m ); | 71 | void setViewMode( ViewMode m ); |
72 | ViewMode viewMode() const { return vmode; } | 72 | ViewMode viewMode() const { return vmode; } |
73 | 73 | ||
74 | enum BackgroundType { Ruled, SolidColor, Image }; | 74 | enum BackgroundType { Ruled, SolidColor, Image }; |
75 | void setBackgroundType( BackgroundType t, const QString & ); | 75 | void setBackgroundType( BackgroundType t, const QString & ); |
76 | BackgroundType backgroundType() const { return bgType; } | 76 | BackgroundType backgroundType() const { return bgType; } |
77 | 77 | ||
78 | void setTextColor( const QColor & ); | 78 | void setTextColor( const QColor & ); |
79 | QColor textColor() const { return textCol; } | 79 | QColor textColor() const { return textCol; } |
80 | 80 | ||
81 | void setViewFont( const QFont & ); | 81 | void setViewFont( const QFont & ); |
82 | void clearViewFont(); | 82 | void clearViewFont(); |
83 | 83 | ||
84 | void setColNumber( int ); | 84 | void setColNumber( int ); |
85 | |||
86 | void relayout(void); | 85 | void relayout(void); |
86 | LauncherIconView* iconView() { return icons; }; | ||
87 | 87 | ||
88 | signals: | 88 | signals: |
89 | void clicked( const AppLnk * ); | 89 | void clicked( const AppLnk * ); |
90 | void rightPressed( AppLnk * ); | 90 | void rightPressed( AppLnk * ); |
91 | 91 | ||
92 | protected slots: | 92 | protected slots: |
93 | void selectionChanged(); | 93 | void selectionChanged(); |
94 | void returnPressed( QIconViewItem *item ); | 94 | void returnPressed( QIconViewItem *item ); |
95 | void itemClicked( int, QIconViewItem * ); | 95 | void itemClicked( int, QIconViewItem * ); |
96 | void itemPressed( int, QIconViewItem * ); | 96 | void itemPressed( int, QIconViewItem * ); |
97 | void sortBy(int); | 97 | void sortBy(int); |
98 | void showType(int); | 98 | void showType(int); |
99 | void showCategory( int ); | 99 | void showCategory( int ); |
100 | void resizeEvent(QResizeEvent *); | 100 | void resizeEvent(QResizeEvent *); |
101 | void flushBgCache(); | 101 | void flushBgCache(); |
102 | 102 | ||
103 | protected: | 103 | protected: |
104 | void paletteChange( const QPalette & ); | 104 | void paletteChange( const QPalette & ); |
105 | 105 | ||
106 | void fontChanged(const QFont &); | 106 | void fontChanged(const QFont &); |
107 | 107 | ||
108 | private: | 108 | private: |
109 | static bool bsy; | 109 | static bool bsy; |
110 | QWidget* tools; | 110 | QWidget* tools; |
111 | LauncherIconView* icons; | 111 | LauncherIconView* icons; |
112 | QComboBox *typemb; | 112 | QComboBox *typemb; |
113 | QStringList typelist; | 113 | QStringList typelist; |
114 | CategorySelect *catmb; | 114 | CategorySelect *catmb; |
115 | ViewMode vmode; | 115 | ViewMode vmode; |
116 | BackgroundType bgType; | 116 | BackgroundType bgType; |
117 | QString bgName; | 117 | QString bgName; |
118 | QColor textCol; | 118 | QColor textCol; |
119 | 119 | ||
120 | QImage loadBackgroundImage(QString &fname); | 120 | QImage loadBackgroundImage(QString &fname); |
121 | 121 | ||
122 | }; | 122 | }; |
123 | 123 | ||
124 | /* from opie-eye */ | 124 | /* from opie-eye */ |
125 | struct PixmapInfo { | 125 | struct PixmapInfo { |
126 | PixmapInfo() : width( -1 ), height( -1 ) {} | 126 | PixmapInfo() : width( -1 ), height( -1 ) {} |
127 | bool operator==( const PixmapInfo& r ) { | 127 | bool operator==( const PixmapInfo& r ) { |
128 | if ( width != r.width ) return false; | 128 | if ( width != r.width ) return false; |
129 | if ( height != r.height ) return false; | 129 | if ( height != r.height ) return false; |
130 | if ( file != r.file ) return false; | 130 | if ( file != r.file ) return false; |
131 | return true; | 131 | return true; |
132 | } | 132 | } |
133 | int width, height; | 133 | int width, height; |
134 | QString file; | 134 | QString file; |
135 | QPixmap pixmap; | 135 | QPixmap pixmap; |
136 | }; | 136 | }; |
137 | 137 | ||
138 | class LauncherThumbReceiver:public QObject | 138 | class LauncherThumbReceiver:public QObject |
139 | { | 139 | { |
140 | Q_OBJECT | 140 | Q_OBJECT |
141 | typedef QValueList<PixmapInfo> PixmapInfos; | 141 | typedef QValueList<PixmapInfo> PixmapInfos; |
142 | public: | 142 | public: |
143 | LauncherThumbReceiver(); | 143 | LauncherThumbReceiver(); |
144 | ~LauncherThumbReceiver(); | 144 | ~LauncherThumbReceiver(); |
145 | void requestThumb(const QString&file,int width,int height); | 145 | void requestThumb(const QString&file,int width,int height); |
146 | 146 | ||
147 | public slots: | 147 | public slots: |
148 | void recieve( const QCString&, const QByteArray& ); | 148 | void recieve( const QCString&, const QByteArray& ); |
149 | protected slots: | 149 | protected slots: |
150 | virtual void sendRequest(); | 150 | virtual void sendRequest(); |
151 | 151 | ||
152 | signals: | 152 | signals: |
153 | void sig_Thumbnail(const QPixmap&,const QString&,int); | 153 | void sig_Thumbnail(const QPixmap&,const QString&,int); |
154 | 154 | ||
155 | protected: | 155 | protected: |
156 | PixmapInfos m_inThumbNail; | 156 | PixmapInfos m_inThumbNail; |
157 | }; | 157 | }; |
158 | 158 | ||
159 | class LauncherIconView : public QIconView { | 159 | class LauncherIconView : public QIconView { |
160 | Q_OBJECT | 160 | Q_OBJECT |
161 | public: | 161 | public: |
162 | LauncherIconView( QWidget* parent, const char* name=0 ); | 162 | LauncherIconView( QWidget* parent, const char* name=0 ); |
163 | ~LauncherIconView(); | 163 | ~LauncherIconView(); |
164 | QIconViewItem* busyItem() const; | 164 | QIconViewItem* busyItem() const; |
165 | 165 | ||
166 | #ifdef USE_ANIMATED_BUSY_ICON_OVERLAY | 166 | #ifdef USE_ANIMATED_BUSY_ICON_OVERLAY |
167 | QPixmap busyPixmap() const { return busyPix; } | 167 | QPixmap busyPixmap() const { return busyPix; } |
168 | #endif | 168 | #endif |
169 | void setBigIcons( bool bi ); | 169 | void setBigIcons( bool bi ); |
170 | void updateCategoriesAndMimeTypes(); | 170 | void updateCategoriesAndMimeTypes(); |
171 | void setBusyIndicatorType ( BusyIndicatorType t ); | 171 | void setBusyIndicatorType ( BusyIndicatorType t ); |
172 | void setStaticBackgroundPicture( bool enable ); | ||
172 | void doAutoScroll() | 173 | void doAutoScroll() |
173 | { | 174 | { |
174 | // We don't want rubberbanding (yet) | 175 | // We don't want rubberbanding (yet) |
175 | } | 176 | } |
176 | 177 | ||
177 | void setBusy(bool on); | 178 | void setBusy(bool on); |
178 | bool inKeyEvent() const { return ike; } | 179 | bool inKeyEvent() const { return ike; } |
179 | 180 | ||
180 | void addItem(AppLnk* app, bool resort=TRUE); | 181 | void addItem(AppLnk* app, bool resort=TRUE); |
181 | bool removeLink(const QString& linkfile,bool removeCache = true); | 182 | bool removeLink(const QString& linkfile,bool removeCache = true); |
182 | void changeItem(const AppLnk&old,AppLnk*nlink); | 183 | void changeItem(const AppLnk&old,AppLnk*nlink); |
183 | 184 | ||
184 | QStringList mimeTypes() const; | 185 | QStringList mimeTypes() const; |
185 | QStringList categories() const; | 186 | QStringList categories() const; |
186 | void clear(); | 187 | void clear(); |
187 | void addCatsAndMimes(AppLnk* app); | 188 | void addCatsAndMimes(AppLnk* app); |
188 | 189 | ||
189 | void setBackgroundOrigin( QWidget::BackgroundOrigin ) {} | 190 | void setBackgroundOrigin( QWidget::BackgroundOrigin ) {} |
190 | 191 | ||
191 | void setBackgroundPixmap( const QPixmap &pm ) { | 192 | void setBackgroundPixmap( const QPixmap &pm ) { |
192 | bgPixmap = pm; | 193 | bgPixmap = pm; |
193 | } | 194 | } |
194 | 195 | ||
195 | void setBackgroundColor( const QColor &c ) { | 196 | void setBackgroundColor( const QColor &c ) { |
196 | bgColor = c; | 197 | bgColor = c; |
197 | } | 198 | } |
198 | 199 | ||
199 | void setColNumber( int ); | 200 | void setColNumber( int ); |
200 | 201 | ||
201 | void drawBackground( QPainter *p, const QRect &r ); | 202 | void drawBackground( QPainter *p, const QRect &r ); |
202 | void setItemTextPos( ItemTextPos pos ); | 203 | void setItemTextPos( ItemTextPos pos ); |
203 | void hideOrShowItems(bool resort); | 204 | void hideOrShowItems(bool resort); |
204 | 205 | ||
205 | void setTypeFilter(const QString& typefilter, bool resort); | 206 | void setTypeFilter(const QString& typefilter, bool resort); |
206 | void setCategoryFilter( int catfilter, bool resort ); | 207 | void setCategoryFilter( int catfilter, bool resort ); |
207 | 208 | ||
208 | enum SortMethod { Name, Date, Type }; | 209 | enum SortMethod { Name, Date, Type }; |
209 | 210 | ||
210 | void setSortMethod( SortMethod m ); | 211 | void setSortMethod( SortMethod m ); |
211 | int compare(const AppLnk* a, const AppLnk* b); | 212 | int compare(const AppLnk* a, const AppLnk* b); |
212 | void requestEyePix(const LauncherItem*which); | 213 | void requestEyePix(const LauncherItem*which); |
213 | 214 | ||
214 | static QMap<QString,QPixmap>* sm_EyeCache; | 215 | static QMap<QString,QPixmap>* sm_EyeCache; |
215 | 216 | ||
216 | protected: | 217 | protected: |
217 | virtual void timerEvent( QTimerEvent *te ); | 218 | virtual void timerEvent( QTimerEvent *te ); |
218 | void styleChange( QStyle &old ); | 219 | void styleChange( QStyle &old ); |
219 | void calculateGrid( ItemTextPos pos ); | 220 | void calculateGrid( ItemTextPos pos ); |
220 | void focusInEvent( QFocusEvent * ) {} | 221 | void focusInEvent( QFocusEvent * ) {} |
221 | void focusOutEvent( QFocusEvent * ) {} | 222 | void focusOutEvent( QFocusEvent * ) {} |
222 | LauncherItem*findDocItem(const QString&); | 223 | LauncherItem*findDocItem(const QString&); |
223 | void addCheckItem(AppLnk* app); | 224 | void addCheckItem(AppLnk* app); |
224 | void checkCallback(); | 225 | void checkCallback(); |
225 | virtual void keyPressEvent(QKeyEvent* e); | 226 | virtual void keyPressEvent(QKeyEvent* e); |
226 | 227 | ||
227 | protected slots: | 228 | protected slots: |
228 | void setEyePixmap(const QPixmap&,const QString&,int width); | 229 | void setEyePixmap(const QPixmap&,const QString&,int width); |
229 | void stopEyeTimer(); | 230 | void stopEyeTimer(); |
230 | 231 | ||
231 | private: | 232 | private: |
232 | QList<AppLnk> hidden; | 233 | QList<AppLnk> hidden; |
233 | QDict<void> mimes; | 234 | QDict<void> mimes; |
234 | QDict<void> cats; | 235 | QDict<void> cats; |
235 | SortMethod sortmeth; | 236 | SortMethod sortmeth; |
236 | QRegExp tf; | 237 | QRegExp tf; |
237 | int cf; | 238 | int cf; |
238 | LauncherItem* bsy; | 239 | LauncherItem* bsy; |
239 | int busyTimer; | 240 | int busyTimer; |
240 | bool ike; | 241 | bool ike; |
241 | bool bigIcns; | 242 | bool bigIcns; |
242 | QPixmap bgPixmap; | 243 | QPixmap bgPixmap; |
243 | QColor bgColor; | 244 | QColor bgColor; |
244 | LauncherThumbReceiver*m_EyeCallBack; | 245 | LauncherThumbReceiver*m_EyeCallBack; |
245 | #ifdef USE_ANIMATED_BUSY_ICON_OVERLAY | 246 | #ifdef USE_ANIMATED_BUSY_ICON_OVERLAY |
246 | QPixmap busyPix; | 247 | QPixmap busyPix; |
247 | #endif | 248 | #endif |
248 | BusyIndicatorType busyType; | 249 | BusyIndicatorType busyType; |
249 | QTimer m_eyeTimer; | 250 | QTimer m_eyeTimer; |
250 | int numColumns; | 251 | int numColumns; |
251 | bool staticBackground; | 252 | bool staticBackground; |
252 | }; | 253 | }; |
253 | 254 | ||
254 | #endif // LAUNCHERVIEW_H | 255 | #endif // LAUNCHERVIEW_H |
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp index 42f0568..fca6b20 100644 --- a/core/settings/launcher/tabssettings.cpp +++ b/core/settings/launcher/tabssettings.cpp | |||
@@ -1,330 +1,339 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | =. This file is part of the OPIE Project |
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
4 | .>+-= | 4 | .>+-= |
5 | _;:, .> :=|. This file is free software; you can | 5 | _;:, .> :=|. This file is free software; you can |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .> <`_, > . <= redistribute it and/or modify it under |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | - . .-<_> .<> Foundation; either version 2 of the License, |
10 | ._= =} : or (at your option) any later version. | 10 | ._= =} : or (at your option) any later version. |
11 | .%`+i> _;_. | 11 | .%`+i> _;_. |
12 | .i_,=:_. -<s. This file is distributed in the hope that | 12 | .i_,=:_. -<s. This file is distributed in the hope that |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
17 | ..}^=.= = ; Public License for more details. | 17 | ..}^=.= = ; Public License for more details. |
18 | ++= -. .` .: | 18 | ++= -. .` .: |
19 | : = ...= . :.=- You should have received a copy of the GNU | 19 | : = ...= . :.=- You should have received a copy of the GNU |
20 | -. .:....=;==+<; General Public License along with this file; | 20 | -. .:....=;==+<; General Public License along with this file; |
21 | -_. . . )=. = see the file COPYING. If not, write to the | 21 | -_. . . )=. = see the file COPYING. If not, write to the |
22 | -- :-=` Free Software Foundation, Inc., | 22 | -- :-=` Free Software Foundation, Inc., |
23 | 59 Temple Place - Suite 330, | 23 | 59 Temple Place - Suite 330, |
24 | Boston, MA 02111-1307, USA. | 24 | Boston, MA 02111-1307, USA. |
25 | 25 | ||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "tabssettings.h" | 28 | #include "tabssettings.h" |
29 | 29 | ||
30 | #include <qpe/resource.h> | 30 | #include <qpe/resource.h> |
31 | #include <qpe/applnk.h> | 31 | #include <qpe/applnk.h> |
32 | #include <qpe/mimetype.h> | 32 | #include <qpe/mimetype.h> |
33 | #include <qpe/qcopenvelope_qws.h> | 33 | #include <qpe/qcopenvelope_qws.h> |
34 | #include <qpe/config.h> | 34 | #include <qpe/config.h> |
35 | #include <qpe/qpeapplication.h> | 35 | #include <qpe/qpeapplication.h> |
36 | 36 | ||
37 | #include <qlistbox.h> | 37 | #include <qlistbox.h> |
38 | #include <qpushbutton.h> | 38 | #include <qpushbutton.h> |
39 | #include <qlayout.h> | 39 | #include <qlayout.h> |
40 | #include <qlabel.h> | 40 | #include <qlabel.h> |
41 | #include <qwhatsthis.h> | 41 | #include <qwhatsthis.h> |
42 | #include <qcheckbox.h> | 42 | #include <qcheckbox.h> |
43 | 43 | ||
44 | #include "tabdialog.h" | 44 | #include "tabdialog.h" |
45 | 45 | ||
46 | #include <stdlib.h> | 46 | #include <stdlib.h> |
47 | #include <qmessagebox.h> | 47 | #include <qmessagebox.h> |
48 | 48 | ||
49 | 49 | ||
50 | #define GLOBALID ".global." | 50 | #define GLOBALID ".global." |
51 | 51 | ||
52 | 52 | ||
53 | TabsSettings::TabsSettings ( QWidget *parent, const char *name ) | 53 | TabsSettings::TabsSettings ( QWidget *parent, const char *name ) |
54 | : QWidget ( parent, name ) | 54 | : QWidget ( parent, name ) |
55 | { | 55 | { |
56 | QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 ); | 56 | QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 ); |
57 | 57 | ||
58 | QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this ); | 58 | QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this ); |
59 | lay-> addMultiCellWidget ( l, 0, 0, 0, 1 ); | 59 | lay-> addMultiCellWidget ( l, 0, 0, 0, 1 ); |
60 | 60 | ||
61 | m_list = new QListBox ( this ); | 61 | m_list = new QListBox ( this ); |
62 | lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 ); | 62 | lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 ); |
63 | 63 | ||
64 | QWhatsThis::add ( m_list, tr( "foobar" )); | 64 | QWhatsThis::add ( m_list, tr( "foobar" )); |
65 | 65 | ||
66 | QPushButton *p1, *p2, *p3; | 66 | QPushButton *p1, *p2, *p3; |
67 | p1 = new QPushButton ( tr( "New" ), this ); | 67 | p1 = new QPushButton ( tr( "New" ), this ); |
68 | lay-> addWidget ( p1, 1, 1 ); | 68 | lay-> addWidget ( p1, 1, 1 ); |
69 | connect ( p1, SIGNAL( clicked()), this, SLOT( newClicked())); | 69 | connect ( p1, SIGNAL( clicked()), this, SLOT( newClicked())); |
70 | 70 | ||
71 | p2 = new QPushButton ( tr( "Edit" ), this ); | 71 | p2 = new QPushButton ( tr( "Edit" ), this ); |
72 | lay-> addWidget ( p2, 2, 1 ); | 72 | lay-> addWidget ( p2, 2, 1 ); |
73 | connect ( p2, SIGNAL( clicked()), this, SLOT( editClicked())); | 73 | connect ( p2, SIGNAL( clicked()), this, SLOT( editClicked())); |
74 | 74 | ||
75 | p3 = new QPushButton ( tr( "Delete" ), this ); | 75 | p3 = new QPushButton ( tr( "Delete" ), this ); |
76 | lay-> addWidget ( p3, 3, 1 ); | 76 | lay-> addWidget ( p3, 3, 1 ); |
77 | connect ( p3, SIGNAL( clicked()), this, SLOT( deleteClicked())); | 77 | connect ( p3, SIGNAL( clicked()), this, SLOT( deleteClicked())); |
78 | 78 | ||
79 | lay-> setRowStretch ( 4, 10 ); | 79 | lay-> setRowStretch ( 4, 10 ); |
80 | 80 | ||
81 | m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this ); | 81 | m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this ); |
82 | lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 ); | 82 | lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 ); |
83 | 83 | ||
84 | m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this ); | 84 | m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this ); |
85 | lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 ); | 85 | lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 ); |
86 | |||
87 | m_staticbackground = new QCheckBox( tr( "Enable static background pixmap" ), this ); | ||
88 | lay->addMultiCellWidget( m_staticbackground, 7, 7, 0, 1 ); | ||
86 | 89 | ||
87 | p1-> setEnabled ( false ); | 90 | p1-> setEnabled ( false ); |
88 | p3-> setEnabled ( false ); | 91 | p3-> setEnabled ( false ); |
89 | 92 | ||
90 | init ( ); | 93 | init ( ); |
91 | 94 | ||
92 | QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); | 95 | QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); |
93 | QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); | 96 | QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); |
94 | QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); | 97 | QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); |
95 | QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); | 98 | QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); |
96 | QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." )); | 99 | QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." )); |
97 | QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." )); | 100 | QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." )); |
101 | QWhatsThis::add ( m_staticbackground, tr( "Activate this, if you want the background pixmap not to scroll with the icons." )); | ||
98 | } | 102 | } |
99 | 103 | ||
100 | void TabsSettings::init ( ) | 104 | void TabsSettings::init ( ) |
101 | { | 105 | { |
102 | AppLnkSet rootFolder( MimeType::appsFolderName ( )); | 106 | AppLnkSet rootFolder( MimeType::appsFolderName ( )); |
103 | QStringList types = rootFolder. types ( ); | 107 | QStringList types = rootFolder. types ( ); |
104 | 108 | ||
105 | m_list-> insertItem ( tr( "All Tabs" )); | 109 | m_list-> insertItem ( tr( "All Tabs" )); |
106 | m_ids << GLOBALID; | 110 | m_ids << GLOBALID; |
107 | 111 | ||
108 | for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { | 112 | for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { |
109 | m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it )); | 113 | m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it )); |
110 | m_ids << *it; | 114 | m_ids << *it; |
111 | } | 115 | } |
112 | QImage img ( Resource::loadImage ( "DocsIcon" )); | 116 | QImage img ( Resource::loadImage ( "DocsIcon" )); |
113 | QPixmap pix; | 117 | QPixmap pix; |
114 | pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( )); | 118 | pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( )); |
115 | m_list-> insertItem ( pix, tr( "Documents" )); | 119 | m_list-> insertItem ( pix, tr( "Documents" )); |
116 | m_ids += "Documents"; // No tr | 120 | m_ids += "Documents"; // No tr |
117 | 121 | ||
118 | Config cfg ( "Launcher" ); | 122 | Config cfg ( "Launcher" ); |
119 | 123 | ||
120 | readTabSettings ( cfg ); | 124 | readTabSettings ( cfg ); |
121 | 125 | ||
122 | cfg. setGroup ( "GUI" ); | 126 | cfg. setGroup ( "GUI" ); |
123 | m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" ); | 127 | m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" ); |
124 | m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); | 128 | m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); |
129 | m_staticbackground->setChecked( cfg.readBoolEntry( "StaticBackground", true ) ); | ||
125 | } | 130 | } |
126 | 131 | ||
127 | 132 | ||
128 | void TabsSettings::readTabSettings ( Config &cfg ) | 133 | void TabsSettings::readTabSettings ( Config &cfg ) |
129 | { | 134 | { |
130 | QString grp ( "Tab %1" ); // No tr | 135 | QString grp ( "Tab %1" ); // No tr |
131 | m_tabs. clear ( ); | 136 | m_tabs. clear ( ); |
132 | 137 | ||
133 | TabConfig global_def; | 138 | TabConfig global_def; |
134 | global_def. m_view = TabConfig::Icon; | 139 | global_def. m_view = TabConfig::Icon; |
135 | global_def. m_bg_type = TabConfig::Ruled; | 140 | global_def. m_bg_type = TabConfig::Ruled; |
136 | global_def. m_bg_image = "launcher/opie-background"; | 141 | global_def. m_bg_image = "launcher/opie-background"; |
137 | global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( ); | 142 | global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( ); |
138 | global_def. m_iconcolumns = 0; // automatic | 143 | global_def. m_iconcolumns = 0; // automatic |
139 | global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( ); | 144 | global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( ); |
140 | global_def. m_font_use = false; | 145 | global_def. m_font_use = false; |
141 | global_def. m_font_family = font ( ). family ( ); | 146 | global_def. m_font_family = font ( ). family ( ); |
142 | global_def. m_font_size = font ( ). pointSize ( ); | 147 | global_def. m_font_size = font ( ). pointSize ( ); |
143 | global_def. m_font_weight = 50; | 148 | global_def. m_font_weight = 50; |
144 | global_def. m_font_italic = false; | 149 | global_def. m_font_italic = false; |
145 | global_def. m_changed = false; | 150 | global_def. m_changed = false; |
146 | 151 | ||
147 | Config cfg2 = Config( "Launchersettings" ); | 152 | Config cfg2 = Config( "Launchersettings" ); |
148 | 153 | ||
149 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { | 154 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { |
150 | TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def; | 155 | TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def; |
151 | 156 | ||
152 | cfg. setGroup ( grp. arg ( *it )); | 157 | cfg. setGroup ( grp. arg ( *it )); |
153 | cfg2. setGroup( grp. arg ( *it )); | 158 | cfg2. setGroup( grp. arg ( *it )); |
154 | 159 | ||
155 | QString view = cfg. readEntry ( "View" ); | 160 | QString view = cfg. readEntry ( "View" ); |
156 | if ( view == "Icon" ) // No tr | 161 | if ( view == "Icon" ) // No tr |
157 | tc. m_view = TabConfig::Icon; | 162 | tc. m_view = TabConfig::Icon; |
158 | if ( view == "List" ) // No tr | 163 | if ( view == "List" ) // No tr |
159 | tc. m_view = TabConfig::List; | 164 | tc. m_view = TabConfig::List; |
160 | 165 | ||
161 | QString bgType = cfg. readEntry ( "BackgroundType" ); | 166 | QString bgType = cfg. readEntry ( "BackgroundType" ); |
162 | if ( bgType == "Image" ) | 167 | if ( bgType == "Image" ) |
163 | tc. m_bg_type = TabConfig::Image; | 168 | tc. m_bg_type = TabConfig::Image; |
164 | else if ( bgType == "SolidColor" ) | 169 | else if ( bgType == "SolidColor" ) |
165 | tc. m_bg_type = TabConfig::SolidColor; | 170 | tc. m_bg_type = TabConfig::SolidColor; |
166 | else if ( bgType == "Image" ) // No tr | 171 | else if ( bgType == "Image" ) // No tr |
167 | tc. m_bg_type = TabConfig::Image; | 172 | tc. m_bg_type = TabConfig::Image; |
168 | 173 | ||
169 | tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image ); | 174 | tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image ); |
170 | tc. m_last_directory = cfg2.readEntry( "DefaultDir", "" ); | 175 | tc. m_last_directory = cfg2.readEntry( "DefaultDir", "" ); |
171 | tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color ); | 176 | tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color ); |
172 | tc. m_iconcolumns = cfg. readNumEntry ( "Columns", tc. m_iconcolumns ); | 177 | tc. m_iconcolumns = cfg. readNumEntry ( "Columns", tc. m_iconcolumns ); |
173 | qDebug( "m_iconcolumns for %s = %d", (const char*) *it, tc.m_iconcolumns ); | 178 | qDebug( "m_iconcolumns for %s = %d", (const char*) *it, tc.m_iconcolumns ); |
174 | tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color ); | 179 | tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color ); |
175 | QStringList f = cfg. readListEntry ( "Font", ',' ); | 180 | QStringList f = cfg. readListEntry ( "Font", ',' ); |
176 | if ( f. count ( ) == 4 ) { | 181 | if ( f. count ( ) == 4 ) { |
177 | tc. m_font_use = true; | 182 | tc. m_font_use = true; |
178 | tc. m_font_family = f [0]; | 183 | tc. m_font_family = f [0]; |
179 | tc. m_font_size = f [1]. toInt ( ); | 184 | tc. m_font_size = f [1]. toInt ( ); |
180 | tc. m_font_weight = f [2]. toInt ( ); | 185 | tc. m_font_weight = f [2]. toInt ( ); |
181 | tc. m_font_italic = ( f [3]. toInt ( )); | 186 | tc. m_font_italic = ( f [3]. toInt ( )); |
182 | } | 187 | } |
183 | m_tabs [*it] = tc; | 188 | m_tabs [*it] = tc; |
184 | } | 189 | } |
185 | 190 | ||
186 | // if all tabs have the same config, then initialize the GLOBALID tab to these values | 191 | // if all tabs have the same config, then initialize the GLOBALID tab to these values |
187 | 192 | ||
188 | TabConfig *first = 0; | 193 | TabConfig *first = 0; |
189 | bool same = true; | 194 | bool same = true; |
190 | 195 | ||
191 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { | 196 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { |
192 | if ( *it == GLOBALID ) | 197 | if ( *it == GLOBALID ) |
193 | continue; | 198 | continue; |
194 | else if ( !first ) | 199 | else if ( !first ) |
195 | first = &m_tabs [*it]; | 200 | first = &m_tabs [*it]; |
196 | else | 201 | else |
197 | same &= ( *first == m_tabs [*it] ); | 202 | same &= ( *first == m_tabs [*it] ); |
198 | } | 203 | } |
199 | if ( same ) { | 204 | if ( same ) { |
200 | m_tabs [GLOBALID] = *first; | 205 | m_tabs [GLOBALID] = *first; |
201 | m_tabs [GLOBALID]. m_changed = true; | 206 | m_tabs [GLOBALID]. m_changed = true; |
202 | } | 207 | } |
203 | } | 208 | } |
204 | 209 | ||
205 | 210 | ||
206 | void TabsSettings::accept ( ) | 211 | void TabsSettings::accept ( ) |
207 | { | 212 | { |
208 | Config cfg ( "Launcher" ); | 213 | Config cfg ( "Launcher" ); |
209 | Config cfg2 ( "Launchersettings" ); | 214 | Config cfg2 ( "Launchersettings" ); |
210 | 215 | ||
211 | // Launcher Tab | 216 | // Launcher Tab |
212 | QString grp ( "Tab %1" ); // No tr | 217 | QString grp ( "Tab %1" ); // No tr |
213 | 218 | ||
214 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { | 219 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { |
215 | TabConfig &tc = m_tabs [*it]; | 220 | TabConfig &tc = m_tabs [*it]; |
216 | 221 | ||
217 | if ( !tc. m_changed ) | 222 | if ( !tc. m_changed ) |
218 | continue; | 223 | continue; |
219 | 224 | ||
220 | cfg. setGroup ( grp. arg ( *it )); | 225 | cfg. setGroup ( grp. arg ( *it )); |
221 | cfg2. setGroup ( grp. arg ( *it )); | 226 | cfg2. setGroup ( grp. arg ( *it )); |
222 | switch ( tc. m_view ) { | 227 | switch ( tc. m_view ) { |
223 | case TabConfig::Icon: | 228 | case TabConfig::Icon: |
224 | cfg.writeEntry ( "View", "Icon" ); | 229 | cfg.writeEntry ( "View", "Icon" ); |
225 | break; | 230 | break; |
226 | case TabConfig::List: | 231 | case TabConfig::List: |
227 | cfg.writeEntry ( "View", "List" ); | 232 | cfg.writeEntry ( "View", "List" ); |
228 | break; | 233 | break; |
229 | } | 234 | } |
230 | 235 | ||
231 | QCopEnvelope e ( "QPE/Launcher", "setTabView(QString,int)" ); | 236 | QCopEnvelope e ( "QPE/Launcher", "setTabView(QString,int)" ); |
232 | e << *it << tc. m_view; | 237 | e << *it << tc. m_view; |
233 | 238 | ||
234 | cfg. writeEntry ( "BackgroundImage", tc. m_bg_image ); | 239 | cfg. writeEntry ( "BackgroundImage", tc. m_bg_image ); |
235 | cfg. writeEntry ( "BackgroundColor", tc. m_bg_color ); | 240 | cfg. writeEntry ( "BackgroundColor", tc. m_bg_color ); |
236 | cfg. writeEntry ( "Columns", tc. m_iconcolumns ); | 241 | cfg. writeEntry ( "Columns", tc. m_iconcolumns ); |
237 | cfg. writeEntry ( "TextColor", tc. m_text_color ); | 242 | cfg. writeEntry ( "TextColor", tc. m_text_color ); |
238 | cfg2. writeEntry ( "DefaultDir", tc.m_last_directory ); | 243 | cfg2. writeEntry ( "DefaultDir", tc.m_last_directory ); |
239 | 244 | ||
240 | if ( tc. m_font_use ) { | 245 | if ( tc. m_font_use ) { |
241 | QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" ); | 246 | QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" ); |
242 | cfg. writeEntry ( "Font", f ); | 247 | cfg. writeEntry ( "Font", f ); |
243 | } | 248 | } |
244 | else | 249 | else |
245 | cfg. removeEntry ( "Font" ); | 250 | cfg. removeEntry ( "Font" ); |
246 | 251 | ||
247 | QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); | 252 | QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); |
248 | 253 | ||
249 | switch ( tc. m_bg_type ) { | 254 | switch ( tc. m_bg_type ) { |
250 | case TabConfig::Ruled: | 255 | case TabConfig::Ruled: |
251 | cfg.writeEntry( "BackgroundType", "Ruled" ); | 256 | cfg.writeEntry( "BackgroundType", "Ruled" ); |
252 | be << *it << tc. m_bg_type << QString(""); | 257 | be << *it << tc. m_bg_type << QString(""); |
253 | break; | 258 | break; |
254 | case TabConfig::SolidColor: | 259 | case TabConfig::SolidColor: |
255 | cfg.writeEntry( "BackgroundType", "SolidColor" ); | 260 | cfg.writeEntry( "BackgroundType", "SolidColor" ); |
256 | be << *it << tc. m_bg_type << tc. m_bg_color; | 261 | be << *it << tc. m_bg_type << tc. m_bg_color; |
257 | break; | 262 | break; |
258 | case TabConfig::Image: | 263 | case TabConfig::Image: |
259 | cfg.writeEntry( "BackgroundType", "Image" ); | 264 | cfg.writeEntry( "BackgroundType", "Image" ); |
260 | be << *it << tc. m_bg_type << tc. m_bg_image; | 265 | be << *it << tc. m_bg_type << tc. m_bg_image; |
261 | break; | 266 | break; |
262 | } | 267 | } |
263 | 268 | ||
264 | QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); | 269 | QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); |
265 | te << *it << tc. m_text_color; | 270 | te << *it << tc. m_text_color; |
266 | 271 | ||
267 | QCopEnvelope ic( "QPE/Launcher", "setIconColumns(QString,int)" ); | 272 | QCopEnvelope ic( "QPE/Launcher", "setIconColumns(QString,int)" ); |
268 | ic << *it << tc. m_iconcolumns; | 273 | ic << *it << tc. m_iconcolumns; |
269 | 274 | ||
270 | QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); | 275 | QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); |
271 | fe << *it; | 276 | fe << *it; |
272 | fe << ( tc. m_font_use ? tc. m_font_family : QString::null ); | 277 | fe << ( tc. m_font_use ? tc. m_font_family : QString::null ); |
273 | fe << tc. m_font_size; | 278 | fe << tc. m_font_size; |
274 | fe << tc. m_font_weight; | 279 | fe << tc. m_font_weight; |
275 | fe << ( tc. m_font_italic ? 1 : 0 ); | 280 | fe << ( tc. m_font_italic ? 1 : 0 ); |
276 | 281 | ||
277 | tc. m_changed = false; | 282 | tc. m_changed = false; |
278 | } | 283 | } |
279 | cfg. setGroup ( "GUI" ); | 284 | cfg. setGroup ( "GUI" ); |
280 | QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" ); | 285 | QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" ); |
281 | cfg. writeEntry ( "BusyType", busytype ); | 286 | cfg. writeEntry ( "BusyType", busytype ); |
282 | 287 | cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) ); | |
283 | cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) ); | 288 | cfg. writeEntry ( "StaticBackground", m_staticbackground->isChecked( ) ); |
284 | 289 | ||
285 | { | 290 | { |
286 | QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); | 291 | QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); |
287 | e << busytype; | 292 | e << busytype; |
288 | } | 293 | } |
294 | { | ||
295 | QCopEnvelope e ( "QPE/Launcher", "setStaticBackground(bool)" ); | ||
296 | e << m_staticbackground->isChecked(); | ||
297 | } | ||
289 | } | 298 | } |
290 | 299 | ||
291 | void TabsSettings::newClicked ( ) | 300 | void TabsSettings::newClicked ( ) |
292 | { | 301 | { |
293 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); | 302 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); |
294 | } | 303 | } |
295 | 304 | ||
296 | void TabsSettings::deleteClicked ( ) | 305 | void TabsSettings::deleteClicked ( ) |
297 | { | 306 | { |
298 | int ind = m_list-> currentItem ( ); | 307 | int ind = m_list-> currentItem ( ); |
299 | 308 | ||
300 | if ( ind < 0 ) | 309 | if ( ind < 0 ) |
301 | return; | 310 | return; |
302 | 311 | ||
303 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); | 312 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); |
304 | } | 313 | } |
305 | 314 | ||
306 | void TabsSettings::editClicked ( ) | 315 | void TabsSettings::editClicked ( ) |
307 | { | 316 | { |
308 | int ind = m_list-> currentItem ( ); | 317 | int ind = m_list-> currentItem ( ); |
309 | 318 | ||
310 | if ( ind < 0 ) | 319 | if ( ind < 0 ) |
311 | return; | 320 | return; |
312 | 321 | ||
313 | TabConfig tc = m_tabs [m_ids [ind]]; | 322 | TabConfig tc = m_tabs [m_ids [ind]]; |
314 | 323 | ||
315 | TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); | 324 | TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); |
316 | 325 | ||
317 | if ( QPEApplication::execDialog( d ) == QDialog::Accepted ) { | 326 | if ( QPEApplication::execDialog( d ) == QDialog::Accepted ) { |
318 | tc. m_changed = true; | 327 | tc. m_changed = true; |
319 | m_tabs [m_ids [ind]] = tc; | 328 | m_tabs [m_ids [ind]] = tc; |
320 | 329 | ||
321 | if ( m_ids [ind] == GLOBALID ) { | 330 | if ( m_ids [ind] == GLOBALID ) { |
322 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { | 331 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { |
323 | if ( *it != GLOBALID ) | 332 | if ( *it != GLOBALID ) |
324 | m_tabs [*it] = tc; | 333 | m_tabs [*it] = tc; |
325 | } | 334 | } |
326 | } | 335 | } |
327 | } | 336 | } |
328 | 337 | ||
329 | delete d; | 338 | delete d; |
330 | } | 339 | } |
diff --git a/core/settings/launcher/tabssettings.h b/core/settings/launcher/tabssettings.h index 600c65c..bbe1e72 100644 --- a/core/settings/launcher/tabssettings.h +++ b/core/settings/launcher/tabssettings.h | |||
@@ -1,68 +1,68 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | =. This file is part of the OPIE Project |
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
4 | .>+-= | 4 | .>+-= |
5 | _;:, .> :=|. This file is free software; you can | 5 | _;:, .> :=|. This file is free software; you can |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .> <`_, > . <= redistribute it and/or modify it under |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | - . .-<_> .<> Foundation; either version 2 of the License, |
10 | ._= =} : or (at your option) any later version. | 10 | ._= =} : or (at your option) any later version. |
11 | .%`+i> _;_. | 11 | .%`+i> _;_. |
12 | .i_,=:_. -<s. This file is distributed in the hope that | 12 | .i_,=:_. -<s. This file is distributed in the hope that |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
17 | ..}^=.= = ; Public License for more details. | 17 | ..}^=.= = ; Public License for more details. |
18 | ++= -. .` .: | 18 | ++= -. .` .: |
19 | : = ...= . :.=- You should have received a copy of the GNU | 19 | : = ...= . :.=- You should have received a copy of the GNU |
20 | -. .:....=;==+<; General Public License along with this file; | 20 | -. .:....=;==+<; General Public License along with this file; |
21 | -_. . . )=. = see the file COPYING. If not, write to the | 21 | -_. . . )=. = see the file COPYING. If not, write to the |
22 | -- :-=` Free Software Foundation, Inc., | 22 | -- :-=` Free Software Foundation, Inc., |
23 | 59 Temple Place - Suite 330, | 23 | 59 Temple Place - Suite 330, |
24 | Boston, MA 02111-1307, USA. | 24 | Boston, MA 02111-1307, USA. |
25 | 25 | ||
26 | */ | 26 | */ |
27 | #ifndef __TABS_SETTINGS_H__ | 27 | #ifndef __TABS_SETTINGS_H__ |
28 | #define __TABS_SETTINGS_H__ | 28 | #define __TABS_SETTINGS_H__ |
29 | 29 | ||
30 | #include <qwidget.h> | 30 | #include <qwidget.h> |
31 | #include <qmap.h> | 31 | #include <qmap.h> |
32 | 32 | ||
33 | #include "tabconfig.h" | 33 | #include "tabconfig.h" |
34 | 34 | ||
35 | class QListBox; | 35 | class QListBox; |
36 | class QCheckBox; | 36 | class QCheckBox; |
37 | class Config; | 37 | class Config; |
38 | 38 | ||
39 | 39 | ||
40 | class TabsSettings : public QWidget { | 40 | class TabsSettings : public QWidget { |
41 | Q_OBJECT | 41 | Q_OBJECT |
42 | 42 | ||
43 | public: | 43 | public: |
44 | TabsSettings ( QWidget *parent = 0, const char *name = 0 ); | 44 | TabsSettings ( QWidget *parent = 0, const char *name = 0 ); |
45 | 45 | ||
46 | void accept ( ); | 46 | void accept ( ); |
47 | 47 | ||
48 | protected slots: | 48 | protected slots: |
49 | void newClicked ( ); | 49 | void newClicked ( ); |
50 | void deleteClicked ( ); | 50 | void deleteClicked ( ); |
51 | void editClicked ( ); | 51 | void editClicked ( ); |
52 | 52 | ||
53 | protected: | 53 | protected: |
54 | void init ( ); | 54 | void init ( ); |
55 | void readTabSettings ( Config & ); | 55 | void readTabSettings ( Config & ); |
56 | 56 | ||
57 | private: | 57 | private: |
58 | QListBox *m_list; | 58 | QListBox *m_list; |
59 | //QString currentTab; | 59 | //QString currentTab; |
60 | QStringList m_ids; | 60 | QStringList m_ids; |
61 | QMap <QString, TabConfig> m_tabs; | 61 | QMap <QString, TabConfig> m_tabs; |
62 | QCheckBox *m_busyani, *m_bigbusy; | 62 | QCheckBox *m_busyani, *m_bigbusy, *m_staticbackground; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | 65 | ||
66 | 66 | ||
67 | 67 | ||
68 | #endif | 68 | #endif |