author | mickeyl <mickeyl> | 2003-11-06 10:17:45 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-11-06 10:17:45 (UTC) |
commit | 55ea6367fba8a82fbdca74599422717e4b3c3ec6 (patch) (unidiff) | |
tree | b40bb13a1b4f05b4eda61cf0c4a02e32719a70c4 /core/settings/launcher | |
parent | 56ad1eb7fb39ddc78026a0df096703fcf42f5a94 (diff) | |
download | opie-55ea6367fba8a82fbdca74599422717e4b3c3ec6.zip opie-55ea6367fba8a82fbdca74599422717e4b3c3ec6.tar.gz opie-55ea6367fba8a82fbdca74599422717e4b3c3ec6.tar.bz2 |
merge core/settings/*
- light-and-power and security were a bit ugly, so I recommend someone
who actually dealt with these files looking into if I got it right
(not to tell about the frustratation about the fact that the ones who
dealt with these files didn't do the merge in the first place :(
-rw-r--r-- | core/settings/launcher/launcher.pro | 4 | ||||
-rw-r--r-- | core/settings/launcher/launchersettings.cpp | 3 | ||||
-rw-r--r-- | core/settings/launcher/launchersettings.h | 3 | ||||
-rw-r--r-- | core/settings/launcher/main.cpp | 12 | ||||
-rw-r--r-- | core/settings/launcher/menusettings.cpp | 18 | ||||
-rw-r--r-- | core/settings/launcher/menusettings.h | 2 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 10 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.h | 2 |
8 files changed, 29 insertions, 25 deletions
diff --git a/core/settings/launcher/launcher.pro b/core/settings/launcher/launcher.pro index cea268d..9d05832 100644 --- a/core/settings/launcher/launcher.pro +++ b/core/settings/launcher/launcher.pro | |||
@@ -1,28 +1,26 @@ | |||
1 | TEMPLATE = app | 1 | CONFIG += qt warn_on release quick-app |
2 | CONFIG += qt warn_on release | ||
3 | DESTDIR = $(OPIEDIR)/bin | ||
4 | HEADERS = launchersettings.h \ | 2 | HEADERS = launchersettings.h \ |
5 | tabssettings.h \ | 3 | tabssettings.h \ |
6 | taskbarsettings.h \ | 4 | taskbarsettings.h \ |
7 | menusettings.h \ | 5 | menusettings.h \ |
8 | inputmethodsettings.h \ | 6 | inputmethodsettings.h \ |
9 | tabconfig.h \ | 7 | tabconfig.h \ |
10 | tabdialog.h | 8 | tabdialog.h |
11 | 9 | ||
12 | SOURCES = main.cpp \ | 10 | SOURCES = main.cpp \ |
13 | launchersettings.cpp \ | 11 | launchersettings.cpp \ |
14 | tabssettings.cpp \ | 12 | tabssettings.cpp \ |
15 | taskbarsettings.cpp \ | 13 | taskbarsettings.cpp \ |
16 | menusettings.cpp \ | 14 | menusettings.cpp \ |
17 | inputmethodsettings.cpp \ | 15 | inputmethodsettings.cpp \ |
18 | tabdialog.cpp | 16 | tabdialog.cpp |
19 | 17 | ||
20 | INCLUDEPATH += $(OPIEDIR)/include | 18 | INCLUDEPATH += $(OPIEDIR)/include |
21 | DEPENDPATH += $(OPIEDIR)/include | 19 | DEPENDPATH += $(OPIEDIR)/include |
22 | LIBS += -lqpe -lopie | 20 | LIBS += -lqpe -lopie |
23 | TARGET = launchersettings | 21 | TARGET = launchersettings |
24 | 22 | ||
25 | 23 | ||
26 | 24 | ||
27 | 25 | ||
28 | include ( $(OPIEDIR)/include.pro ) | 26 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/settings/launcher/launchersettings.cpp b/core/settings/launcher/launchersettings.cpp index 3982194..efc4a86 100644 --- a/core/settings/launcher/launchersettings.cpp +++ b/core/settings/launcher/launchersettings.cpp | |||
@@ -1,76 +1,77 @@ | |||
1 | 1 | ||
2 | /* | 2 | /* |
3 | =. This file is part of the OPIE Project | 3 | =. This file is part of the OPIE Project |
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 6 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qapplication.h> | 30 | #include <qapplication.h> |
31 | 31 | ||
32 | #include <opie/otabwidget.h> | 32 | #include <opie/otabwidget.h> |
33 | 33 | ||
34 | #include "launchersettings.h" | 34 | #include "launchersettings.h" |
35 | #include "tabssettings.h" | 35 | #include "tabssettings.h" |
36 | #include "menusettings.h" | 36 | #include "menusettings.h" |
37 | #include "taskbarsettings.h" | 37 | #include "taskbarsettings.h" |
38 | #include "inputmethodsettings.h" | 38 | #include "inputmethodsettings.h" |
39 | 39 | ||
40 | LauncherSettings::LauncherSettings ( ) : QDialog ( 0, "LauncherSettings", false, WStyle_ContextHelp ) | 40 | LauncherSettings::LauncherSettings (QWidget*,const char*, WFlags) |
41 | : QDialog ( 0, "LauncherSettings", false, WStyle_ContextHelp ) | ||
41 | { | 42 | { |
42 | setCaption ( tr( "Launcher Settings" )); | 43 | setCaption ( tr( "Launcher Settings" )); |
43 | 44 | ||
44 | QVBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); | 45 | QVBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); |
45 | 46 | ||
46 | OTabWidget *tw = new OTabWidget ( this, "otab" ); | 47 | OTabWidget *tw = new OTabWidget ( this, "otab" ); |
47 | lay-> addWidget ( tw ); | 48 | lay-> addWidget ( tw ); |
48 | 49 | ||
49 | m_tabs = new TabsSettings ( tw ); | 50 | m_tabs = new TabsSettings ( tw ); |
50 | m_taskbar = new TaskbarSettings ( tw ); | 51 | m_taskbar = new TaskbarSettings ( tw ); |
51 | m_menu = new MenuSettings ( tw ); | 52 | m_menu = new MenuSettings ( tw ); |
52 | m_imethods = new InputMethodSettings ( tw ); | 53 | m_imethods = new InputMethodSettings ( tw ); |
53 | 54 | ||
54 | tw-> addTab ( m_taskbar, "wait", tr( "Taskbar" )); | 55 | tw-> addTab ( m_taskbar, "wait", tr( "Taskbar" )); |
55 | tw-> addTab ( m_menu, "go", tr( "O-Menu" )); | 56 | tw-> addTab ( m_menu, "go", tr( "O-Menu" )); |
56 | tw-> addTab ( m_tabs, "launchersettings/tabstab.png", tr( "Tabs" )); | 57 | tw-> addTab ( m_tabs, "launchersettings/tabstab.png", tr( "Tabs" )); |
57 | tw-> addTab ( m_imethods, "launchersettings/inputmethod.png", tr( "InputMethods" )); | 58 | tw-> addTab ( m_imethods, "launchersettings/inputmethod.png", tr( "InputMethods" )); |
58 | 59 | ||
59 | tw-> setCurrentTab ( m_taskbar ); | 60 | tw-> setCurrentTab ( m_taskbar ); |
60 | } | 61 | } |
61 | 62 | ||
62 | void LauncherSettings::accept ( ) | 63 | void LauncherSettings::accept ( ) |
63 | { | 64 | { |
64 | m_taskbar-> accept ( ); | 65 | m_taskbar-> accept ( ); |
65 | m_menu-> accept ( ); | 66 | m_menu-> accept ( ); |
66 | m_tabs-> accept ( ); | 67 | m_tabs-> accept ( ); |
67 | m_imethods-> accept ( ); | 68 | m_imethods-> accept ( ); |
68 | 69 | ||
69 | QDialog::accept ( ); | 70 | QDialog::accept ( ); |
70 | } | 71 | } |
71 | 72 | ||
72 | void LauncherSettings::done ( int r ) | 73 | void LauncherSettings::done ( int r ) |
73 | { | 74 | { |
74 | QDialog::done ( r ); | 75 | QDialog::done ( r ); |
75 | close ( ); | 76 | close ( ); |
76 | } | 77 | } |
diff --git a/core/settings/launcher/launchersettings.h b/core/settings/launcher/launchersettings.h index 71165a3..7458d8b 100644 --- a/core/settings/launcher/launchersettings.h +++ b/core/settings/launcher/launchersettings.h | |||
@@ -1,54 +1,55 @@ | |||
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 | #ifndef __LAUNCHER_SETTINGS_H__ | 28 | #ifndef __LAUNCHER_SETTINGS_H__ |
29 | #define __LAUNCHER_SETTINGS_H__ | 29 | #define __LAUNCHER_SETTINGS_H__ |
30 | 30 | ||
31 | #include <qdialog.h> | 31 | #include <qdialog.h> |
32 | 32 | ||
33 | class TabsSettings; | 33 | class TabsSettings; |
34 | class TaskbarSettings; | 34 | class TaskbarSettings; |
35 | class MenuSettings; | 35 | class MenuSettings; |
36 | class InputMethodSettings; | 36 | class InputMethodSettings; |
37 | 37 | ||
38 | class LauncherSettings : public QDialog { | 38 | class LauncherSettings : public QDialog { |
39 | Q_OBJECT | 39 | Q_OBJECT |
40 | 40 | ||
41 | public: | 41 | public: |
42 | LauncherSettings ( ); | 42 | static QString appName() { return QString::fromLatin1("launchersettings"); } |
43 | LauncherSettings (QWidget *parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
43 | 44 | ||
44 | virtual void accept ( ); | 45 | virtual void accept ( ); |
45 | virtual void done ( int r ); | 46 | virtual void done ( int r ); |
46 | 47 | ||
47 | private: | 48 | private: |
48 | TabsSettings *m_tabs; | 49 | TabsSettings *m_tabs; |
49 | TaskbarSettings *m_taskbar; | 50 | TaskbarSettings *m_taskbar; |
50 | MenuSettings *m_menu; | 51 | MenuSettings *m_menu; |
51 | InputMethodSettings* m_imethods; | 52 | InputMethodSettings* m_imethods; |
52 | }; | 53 | }; |
53 | 54 | ||
54 | #endif | 55 | #endif |
diff --git a/core/settings/launcher/main.cpp b/core/settings/launcher/main.cpp index f65dab8..4cc1d35 100644 --- a/core/settings/launcher/main.cpp +++ b/core/settings/launcher/main.cpp | |||
@@ -1,43 +1,35 @@ | |||
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 "launchersettings.h" | 28 | #include "launchersettings.h" |
29 | 29 | ||
30 | #include <qpe/qpeapplication.h> | 30 | #include <qpe/qpeapplication.h> |
31 | #include <opie/oapplicationfactory.h> | ||
31 | 32 | ||
33 | OPIE_EXPORT_APP( OApplicationFactory<LauncherSettings> ) | ||
32 | 34 | ||
33 | int main ( int argc, char** argv ) | ||
34 | { | ||
35 | QPEApplication a ( argc,argv ); | ||
36 | |||
37 | LauncherSettings dlg; | ||
38 | a. showMainWidget ( &dlg ); | ||
39 | dlg. showMaximized ( ); | ||
40 | |||
41 | return a. exec ( ); | ||
42 | } | ||
43 | 35 | ||
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp index 6fca621..faa7cf4 100644 --- a/core/settings/launcher/menusettings.cpp +++ b/core/settings/launcher/menusettings.cpp | |||
@@ -1,163 +1,175 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> | 3 | =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> |
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 6 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "menusettings.h" | 29 | #include "menusettings.h" |
30 | 30 | ||
31 | #include <qpe/config.h> | 31 | #include <qpe/config.h> |
32 | #include <qpe/qlibrary.h> | 32 | #include <qpe/qlibrary.h> |
33 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
34 | #include <qpe/menuappletinterface.h> | 34 | #include <qpe/menuappletinterface.h> |
35 | #include <qpe/qcopenvelope_qws.h> | 35 | #include <qpe/qcopenvelope_qws.h> |
36 | 36 | ||
37 | #include <qdir.h> | 37 | #include <qdir.h> |
38 | #include <qlistview.h> | 38 | #include <qlistview.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qheader.h> | 40 | #include <qheader.h> |
41 | #include <qlayout.h> | 41 | #include <qlayout.h> |
42 | #include <qlabel.h> | 42 | #include <qlabel.h> |
43 | #include <qwhatsthis.h> | 43 | #include <qwhatsthis.h> |
44 | 44 | ||
45 | #include <stdlib.h> | 45 | #include <stdlib.h> |
46 | 46 | ||
47 | 47 | ||
48 | MenuSettings::MenuSettings ( QWidget *parent, const char *name ) | 48 | MenuSettings::MenuSettings ( QWidget *parent, const char *name ) |
49 | : QWidget ( parent, name ) | 49 | : QWidget ( parent, name ) |
50 | { | 50 | { |
51 | m_applets_changed = false; | 51 | m_applets_changed = false; |
52 | 52 | ||
53 | QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); | 53 | QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); |
54 | 54 | ||
55 | QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this ); | 55 | QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this ); |
56 | lay-> addWidget ( l ); | 56 | lay-> addWidget ( l ); |
57 | 57 | ||
58 | m_list = new QListView ( this ); | 58 | m_list = new QListView ( this ); |
59 | m_list-> addColumn ( "foobar" ); | 59 | m_list-> addColumn ( "foobar" ); |
60 | m_list-> header ( )-> hide ( ); | 60 | m_list-> header ( )-> hide ( ); |
61 | 61 | ||
62 | lay-> addWidget ( m_list ); | 62 | lay-> addWidget ( m_list ); |
63 | 63 | ||
64 | m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); | 64 | m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); |
65 | lay-> addWidget ( m_menutabs ); | 65 | lay-> addWidget ( m_menutabs ); |
66 | 66 | ||
67 | m_menusubpopup = new QCheckBox ( tr( "Show Applications in subpopups" ), this ); | ||
68 | lay-> addWidget ( m_menusubpopup ); | ||
69 | |||
67 | QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); | 70 | QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); |
68 | QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); | 71 | QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); |
69 | 72 | ||
70 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); | 73 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); |
71 | 74 | ||
72 | init ( ); | 75 | init ( ); |
73 | } | 76 | } |
74 | 77 | ||
75 | void MenuSettings::init ( ) | 78 | void MenuSettings::init ( ) |
76 | { | 79 | { |
77 | Config cfg ( "StartMenu" ); | 80 | Config cfg ( "StartMenu" ); |
78 | cfg. setGroup ( "Applets" ); | 81 | cfg. setGroup ( "Applets" ); |
79 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); | 82 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); |
80 | 83 | ||
81 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; | 84 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; |
82 | #ifdef Q_OS_MACX | 85 | #ifdef Q_OS_MACX |
83 | QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); | 86 | QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); |
84 | #else | 87 | #else |
85 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); | 88 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); |
86 | #endif /* Q_OS_MACX */ | 89 | #endif /* Q_OS_MACX */ |
87 | 90 | ||
88 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { | 91 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { |
89 | QString name; | 92 | QString name; |
90 | QPixmap icon; | 93 | QPixmap icon; |
91 | MenuAppletInterface *iface = 0; | 94 | MenuAppletInterface *iface = 0; |
92 | 95 | ||
93 | QLibrary *lib = new QLibrary ( path + "/" + *it ); | 96 | QLibrary *lib = new QLibrary ( path + "/" + *it ); |
94 | lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); | 97 | lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); |
95 | if ( iface ) { | 98 | if ( iface ) { |
96 | QString lang = getenv( "LANG" ); | 99 | QString lang = getenv( "LANG" ); |
97 | QTranslator *trans = new QTranslator ( qApp ); | 100 | QTranslator *trans = new QTranslator ( qApp ); |
98 | QString type = (*it). left ((*it). find (".")); | 101 | QString type = (*it). left ((*it). find (".")); |
99 | QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; | 102 | QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; |
100 | if ( trans-> load ( tfn )) | 103 | if ( trans-> load ( tfn )) |
101 | qApp-> installTranslator ( trans ); | 104 | qApp-> installTranslator ( trans ); |
102 | else | 105 | else |
103 | delete trans; | 106 | delete trans; |
104 | name = iface-> name ( ); | 107 | name = iface-> name ( ); |
105 | icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal ); | 108 | icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal ); |
106 | iface-> release ( ); | 109 | iface-> release ( ); |
107 | lib-> unload ( ); | 110 | lib-> unload ( ); |
108 | 111 | ||
109 | QCheckListItem *item; | 112 | QCheckListItem *item; |
110 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); | 113 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); |
111 | if ( !icon. isNull ( )) | 114 | if ( !icon. isNull ( )) |
112 | item-> setPixmap ( 0, icon ); | 115 | item-> setPixmap ( 0, icon ); |
113 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); | 116 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); |
114 | m_applets [*it] = item; | 117 | m_applets [*it] = item; |
115 | } else { | 118 | } else { |
116 | delete lib; | 119 | delete lib; |
117 | } | 120 | } |
118 | } | 121 | } |
119 | 122 | ||
120 | cfg. setGroup ( "Menu" ); | 123 | cfg. setGroup ( "Menu" ); |
121 | m_menutabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); | 124 | m_menutabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); |
125 | m_menusubpopup-> setChecked ( cfg. readBoolEntry ( "LauncherSubPopup", true )); | ||
122 | } | 126 | } |
123 | 127 | ||
124 | void MenuSettings::appletChanged() | 128 | void MenuSettings::appletChanged() |
125 | { | 129 | { |
126 | m_applets_changed = true; | 130 | m_applets_changed = true; |
127 | } | 131 | } |
128 | 132 | ||
129 | void MenuSettings::accept ( ) | 133 | void MenuSettings::accept ( ) |
130 | { | 134 | { |
131 | bool apps_changed = false; | 135 | bool apps_changed = false; |
132 | 136 | ||
133 | Config cfg ( "StartMenu" ); | 137 | Config cfg ( "StartMenu" ); |
134 | cfg. setGroup ( "Applets" ); | 138 | cfg. setGroup ( "Applets" ); |
135 | if ( m_applets_changed ) { | 139 | if ( m_applets_changed ) { |
136 | QStringList exclude; | 140 | QStringList exclude; |
137 | QMap <QString, QCheckListItem *>::Iterator it; | 141 | QMap <QString, QCheckListItem *>::Iterator it; |
138 | for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { | 142 | for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { |
139 | if ( !(*it)-> isOn ( )) | 143 | if ( !(*it)-> isOn ( )) |
140 | exclude << it. key ( ); | 144 | exclude << it. key ( ); |
141 | } | 145 | } |
142 | cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); | 146 | cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); |
143 | } | 147 | } |
144 | cfg. writeEntry ( "SafeMode", false ); | 148 | cfg. writeEntry ( "SafeMode", false ); |
145 | 149 | ||
146 | cfg. setGroup ( "Menu" ); | 150 | cfg. setGroup ( "Menu" ); |
147 | 151 | ||
148 | if ( m_menutabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { | 152 | if ( m_menutabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { |
149 | apps_changed = true; | 153 | apps_changed = true; |
150 | cfg. writeEntry ( "LauncherTabs", m_menutabs-> isChecked ( )); | 154 | cfg. writeEntry ( "LauncherTabs", m_menutabs-> isChecked ( )); |
151 | } | 155 | } |
152 | 156 | ||
157 | if ( m_menusubpopup-> isChecked ( ) != cfg. readBoolEntry ( "LauncherSubPopup", true )) { | ||
158 | apps_changed = true; | ||
159 | cfg. writeEntry ( "LauncherSubPopup", m_menusubpopup-> isChecked ( )); | ||
160 | } | ||
161 | |||
153 | cfg. write ( ); | 162 | cfg. write ( ); |
154 | 163 | ||
155 | if ( m_applets_changed ) { | 164 | if ( m_applets_changed ) { |
156 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); | 165 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); |
157 | m_applets_changed = false; | 166 | m_applets_changed = false; |
158 | } | 167 | } |
159 | if ( apps_changed ) { | 168 | if ( apps_changed ) { |
169 | // currently use reloadApplets() since reloadApps is now used exclusive for server | ||
170 | // to refresh the tabs. But what we want here is also a refresh of the startmenu entries | ||
160 | QCopEnvelope ( "QPE/TaskBar", "reloadApps()" ); | 171 | QCopEnvelope ( "QPE/TaskBar", "reloadApps()" ); |
172 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); | ||
161 | } | 173 | } |
162 | } | 174 | } |
163 | 175 | ||
diff --git a/core/settings/launcher/menusettings.h b/core/settings/launcher/menusettings.h index 5986958..5bb7afa 100644 --- a/core/settings/launcher/menusettings.h +++ b/core/settings/launcher/menusettings.h | |||
@@ -1,60 +1,60 @@ | |||
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 | #ifndef __MENU_SETTINGS_H__ | 28 | #ifndef __MENU_SETTINGS_H__ |
29 | #define __MENU_SETTINGS_H__ | 29 | #define __MENU_SETTINGS_H__ |
30 | 30 | ||
31 | #include <qwidget.h> | 31 | #include <qwidget.h> |
32 | #include <qmap.h> | 32 | #include <qmap.h> |
33 | 33 | ||
34 | class QListView; | 34 | class QListView; |
35 | class QCheckListItem; | 35 | class QCheckListItem; |
36 | class QCheckBox; | 36 | class QCheckBox; |
37 | 37 | ||
38 | 38 | ||
39 | class MenuSettings : public QWidget { | 39 | class MenuSettings : public QWidget { |
40 | Q_OBJECT | 40 | Q_OBJECT |
41 | 41 | ||
42 | public: | 42 | public: |
43 | MenuSettings ( QWidget *parent = 0, const char *name = 0 ); | 43 | MenuSettings ( QWidget *parent = 0, const char *name = 0 ); |
44 | 44 | ||
45 | void accept ( ); | 45 | void accept ( ); |
46 | 46 | ||
47 | protected slots: | 47 | protected slots: |
48 | void appletChanged ( ); | 48 | void appletChanged ( ); |
49 | 49 | ||
50 | protected: | 50 | protected: |
51 | void init ( ); | 51 | void init ( ); |
52 | 52 | ||
53 | private: | 53 | private: |
54 | QListView *m_list; | 54 | QListView *m_list; |
55 | QMap <QString, QCheckListItem *> m_applets; | 55 | QMap <QString, QCheckListItem *> m_applets; |
56 | bool m_applets_changed; | 56 | bool m_applets_changed; |
57 | QCheckBox *m_menutabs; | 57 | QCheckBox *m_menutabs, *m_menusubpopup; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | #endif | 60 | #endif |
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp index 7cd00bd..3d8b456 100644 --- a/core/settings/launcher/tabssettings.cpp +++ b/core/settings/launcher/tabssettings.cpp | |||
@@ -1,318 +1,318 @@ | |||
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/qpeapplication.h> | 30 | #include <qpe/qpeapplication.h> |
31 | #include <qpe/resource.h> | 31 | #include <qpe/resource.h> |
32 | #include <qpe/applnk.h> | 32 | #include <qpe/applnk.h> |
33 | #include <qpe/mimetype.h> | 33 | #include <qpe/mimetype.h> |
34 | #include <qpe/qcopenvelope_qws.h> | 34 | #include <qpe/qcopenvelope_qws.h> |
35 | #include <qpe/config.h> | 35 | #include <qpe/config.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_busyblink = new QCheckBox ( tr( "Enable blinking busy indicator" ), this ); | 84 | m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this ); |
85 | lay-> addMultiCellWidget ( m_busyblink, 6, 6, 0, 1 ); | 85 | lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 ); |
86 | 86 | ||
87 | p1-> setEnabled ( false ); | 87 | p1-> setEnabled ( false ); |
88 | p3-> setEnabled ( false ); | 88 | p3-> setEnabled ( false ); |
89 | 89 | ||
90 | init ( ); | 90 | init ( ); |
91 | 91 | ||
92 | QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); | 92 | 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>." )); | 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>." )); |
94 | QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); | 94 | 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>." )); | 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>." )); |
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." )); | 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." )); |
97 | QWhatsThis::add ( m_busyblink, tr( "Activate this, if you want a blinking busy indicator for starting applications in the Launcher." )); | 97 | QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." )); |
98 | } | 98 | } |
99 | 99 | ||
100 | void TabsSettings::init ( ) | 100 | void TabsSettings::init ( ) |
101 | { | 101 | { |
102 | AppLnkSet rootFolder( MimeType::appsFolderName ( )); | 102 | AppLnkSet rootFolder( MimeType::appsFolderName ( )); |
103 | QStringList types = rootFolder. types ( ); | 103 | QStringList types = rootFolder. types ( ); |
104 | 104 | ||
105 | m_list-> insertItem ( tr( "All Tabs" )); | 105 | m_list-> insertItem ( tr( "All Tabs" )); |
106 | m_ids << GLOBALID; | 106 | m_ids << GLOBALID; |
107 | 107 | ||
108 | for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { | 108 | for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { |
109 | m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it )); | 109 | m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it )); |
110 | m_ids << *it; | 110 | m_ids << *it; |
111 | } | 111 | } |
112 | QImage img ( Resource::loadImage ( "DocsIcon" )); | 112 | QImage img ( Resource::loadImage ( "DocsIcon" )); |
113 | QPixmap pix; | 113 | QPixmap pix; |
114 | pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( )); | 114 | pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( )); |
115 | m_list-> insertItem ( pix, tr( "Documents" )); | 115 | m_list-> insertItem ( pix, tr( "Documents" )); |
116 | m_ids += "Documents"; // No tr | 116 | m_ids += "Documents"; // No tr |
117 | 117 | ||
118 | Config cfg ( "Launcher" ); | 118 | Config cfg ( "Launcher" ); |
119 | 119 | ||
120 | readTabSettings ( cfg ); | 120 | readTabSettings ( cfg ); |
121 | 121 | ||
122 | cfg. setGroup ( "GUI" ); | 122 | cfg. setGroup ( "GUI" ); |
123 | m_busyblink-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "blink" ); | 123 | m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" ); |
124 | m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); | 124 | m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); |
125 | } | 125 | } |
126 | 126 | ||
127 | 127 | ||
128 | void TabsSettings::readTabSettings ( Config &cfg ) | 128 | void TabsSettings::readTabSettings ( Config &cfg ) |
129 | { | 129 | { |
130 | QString grp ( "Tab %1" ); // No tr | 130 | QString grp ( "Tab %1" ); // No tr |
131 | m_tabs. clear ( ); | 131 | m_tabs. clear ( ); |
132 | 132 | ||
133 | TabConfig global_def; | 133 | TabConfig global_def; |
134 | global_def. m_view = TabConfig::Icon; | 134 | global_def. m_view = TabConfig::Icon; |
135 | global_def. m_bg_type = TabConfig::Ruled; | 135 | global_def. m_bg_type = TabConfig::Ruled; |
136 | global_def. m_bg_image = "launcher/opie-background"; | 136 | global_def. m_bg_image = "launcher/opie-background"; |
137 | global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( ); | 137 | global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( ); |
138 | global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( ); | 138 | global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( ); |
139 | global_def. m_font_use = false; | 139 | global_def. m_font_use = false; |
140 | global_def. m_font_family = font ( ). family ( ); | 140 | global_def. m_font_family = font ( ). family ( ); |
141 | global_def. m_font_size = font ( ). pointSize ( ); | 141 | global_def. m_font_size = font ( ). pointSize ( ); |
142 | global_def. m_font_weight = 50; | 142 | global_def. m_font_weight = 50; |
143 | global_def. m_font_italic = false; | 143 | global_def. m_font_italic = false; |
144 | global_def. m_changed = false; | 144 | global_def. m_changed = false; |
145 | 145 | ||
146 | 146 | ||
147 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { | 147 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { |
148 | TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def; | 148 | TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def; |
149 | 149 | ||
150 | cfg. setGroup ( grp. arg ( *it )); | 150 | cfg. setGroup ( grp. arg ( *it )); |
151 | 151 | ||
152 | QString view = cfg. readEntry ( "View" ); | 152 | QString view = cfg. readEntry ( "View" ); |
153 | if ( view == "Icon" ) // No tr | 153 | if ( view == "Icon" ) // No tr |
154 | tc. m_view = TabConfig::Icon; | 154 | tc. m_view = TabConfig::Icon; |
155 | if ( view == "List" ) // No tr | 155 | if ( view == "List" ) // No tr |
156 | tc. m_view = TabConfig::List; | 156 | tc. m_view = TabConfig::List; |
157 | 157 | ||
158 | QString bgType = cfg. readEntry ( "BackgroundType" ); | 158 | QString bgType = cfg. readEntry ( "BackgroundType" ); |
159 | if ( bgType == "Image" ) | 159 | if ( bgType == "Image" ) |
160 | tc. m_bg_type = TabConfig::Image; | 160 | tc. m_bg_type = TabConfig::Image; |
161 | else if ( bgType == "SolidColor" ) | 161 | else if ( bgType == "SolidColor" ) |
162 | tc. m_bg_type = TabConfig::SolidColor; | 162 | tc. m_bg_type = TabConfig::SolidColor; |
163 | else if ( bgType == "Image" ) // No tr | 163 | else if ( bgType == "Image" ) // No tr |
164 | tc. m_bg_type = TabConfig::Image; | 164 | tc. m_bg_type = TabConfig::Image; |
165 | 165 | ||
166 | tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image ); | 166 | tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image ); |
167 | tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color ); | 167 | tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color ); |
168 | tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color ); | 168 | tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color ); |
169 | QStringList f = cfg. readListEntry ( "Font", ',' ); | 169 | QStringList f = cfg. readListEntry ( "Font", ',' ); |
170 | if ( f. count ( ) == 4 ) { | 170 | if ( f. count ( ) == 4 ) { |
171 | tc. m_font_use = true; | 171 | tc. m_font_use = true; |
172 | tc. m_font_family = f [0]; | 172 | tc. m_font_family = f [0]; |
173 | tc. m_font_size = f [1]. toInt ( ); | 173 | tc. m_font_size = f [1]. toInt ( ); |
174 | tc. m_font_weight = f [2]. toInt ( ); | 174 | tc. m_font_weight = f [2]. toInt ( ); |
175 | tc. m_font_italic = ( f [3]. toInt ( )); | 175 | tc. m_font_italic = ( f [3]. toInt ( )); |
176 | } | 176 | } |
177 | m_tabs [*it] = tc; | 177 | m_tabs [*it] = tc; |
178 | } | 178 | } |
179 | 179 | ||
180 | // if all tabs have the same config, then initialize the GLOBALID tab to these values | 180 | // if all tabs have the same config, then initialize the GLOBALID tab to these values |
181 | 181 | ||
182 | TabConfig *first = 0; | 182 | TabConfig *first = 0; |
183 | bool same = true; | 183 | bool same = true; |
184 | 184 | ||
185 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { | 185 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { |
186 | if ( *it == GLOBALID ) | 186 | if ( *it == GLOBALID ) |
187 | continue; | 187 | continue; |
188 | else if ( !first ) | 188 | else if ( !first ) |
189 | first = &m_tabs [*it]; | 189 | first = &m_tabs [*it]; |
190 | else | 190 | else |
191 | same &= ( *first == m_tabs [*it] ); | 191 | same &= ( *first == m_tabs [*it] ); |
192 | } | 192 | } |
193 | if ( same ) { | 193 | if ( same ) { |
194 | m_tabs [GLOBALID] = *first; | 194 | m_tabs [GLOBALID] = *first; |
195 | m_tabs [GLOBALID]. m_changed = true; | 195 | m_tabs [GLOBALID]. m_changed = true; |
196 | } | 196 | } |
197 | } | 197 | } |
198 | 198 | ||
199 | 199 | ||
200 | void TabsSettings::accept ( ) | 200 | void TabsSettings::accept ( ) |
201 | { | 201 | { |
202 | Config cfg ( "Launcher" ); | 202 | Config cfg ( "Launcher" ); |
203 | 203 | ||
204 | // Launcher Tab | 204 | // Launcher Tab |
205 | QString grp ( "Tab %1" ); // No tr | 205 | QString grp ( "Tab %1" ); // No tr |
206 | 206 | ||
207 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { | 207 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { |
208 | TabConfig &tc = m_tabs [*it]; | 208 | TabConfig &tc = m_tabs [*it]; |
209 | 209 | ||
210 | if ( !tc. m_changed ) | 210 | if ( !tc. m_changed ) |
211 | continue; | 211 | continue; |
212 | 212 | ||
213 | cfg. setGroup ( grp. arg ( *it )); | 213 | cfg. setGroup ( grp. arg ( *it )); |
214 | switch ( tc. m_view ) { | 214 | switch ( tc. m_view ) { |
215 | case TabConfig::Icon: | 215 | case TabConfig::Icon: |
216 | cfg.writeEntry ( "View", "Icon" ); | 216 | cfg.writeEntry ( "View", "Icon" ); |
217 | break; | 217 | break; |
218 | case TabConfig::List: | 218 | case TabConfig::List: |
219 | cfg.writeEntry ( "View", "List" ); | 219 | cfg.writeEntry ( "View", "List" ); |
220 | break; | 220 | break; |
221 | } | 221 | } |
222 | 222 | ||
223 | QCopEnvelope e ( "QPE/Launcher", "setTabView(QString,int)" ); | 223 | QCopEnvelope e ( "QPE/Launcher", "setTabView(QString,int)" ); |
224 | e << *it << tc. m_view; | 224 | e << *it << tc. m_view; |
225 | 225 | ||
226 | cfg. writeEntry ( "BackgroundImage", tc. m_bg_image ); | 226 | cfg. writeEntry ( "BackgroundImage", tc. m_bg_image ); |
227 | cfg. writeEntry ( "BackgroundColor", tc. m_bg_color ); | 227 | cfg. writeEntry ( "BackgroundColor", tc. m_bg_color ); |
228 | cfg. writeEntry ( "TextColor", tc. m_text_color ); | 228 | cfg. writeEntry ( "TextColor", tc. m_text_color ); |
229 | 229 | ||
230 | if ( tc. m_font_use ) { | 230 | if ( tc. m_font_use ) { |
231 | QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" ); | 231 | QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" ); |
232 | cfg. writeEntry ( "Font", f ); | 232 | cfg. writeEntry ( "Font", f ); |
233 | } | 233 | } |
234 | else | 234 | else |
235 | cfg. removeEntry ( "Font" ); | 235 | cfg. removeEntry ( "Font" ); |
236 | 236 | ||
237 | QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); | 237 | QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); |
238 | 238 | ||
239 | switch ( tc. m_bg_type ) { | 239 | switch ( tc. m_bg_type ) { |
240 | case TabConfig::Ruled: | 240 | case TabConfig::Ruled: |
241 | cfg.writeEntry( "BackgroundType", "Ruled" ); | 241 | cfg.writeEntry( "BackgroundType", "Ruled" ); |
242 | be << *it << tc. m_bg_type << QString(""); | 242 | be << *it << tc. m_bg_type << QString(""); |
243 | break; | 243 | break; |
244 | case TabConfig::SolidColor: | 244 | case TabConfig::SolidColor: |
245 | cfg.writeEntry( "BackgroundType", "SolidColor" ); | 245 | cfg.writeEntry( "BackgroundType", "SolidColor" ); |
246 | be << *it << tc. m_bg_type << tc. m_bg_color; | 246 | be << *it << tc. m_bg_type << tc. m_bg_color; |
247 | break; | 247 | break; |
248 | case TabConfig::Image: | 248 | case TabConfig::Image: |
249 | cfg.writeEntry( "BackgroundType", "Image" ); | 249 | cfg.writeEntry( "BackgroundType", "Image" ); |
250 | be << *it << tc. m_bg_type << tc. m_bg_image; | 250 | be << *it << tc. m_bg_type << tc. m_bg_image; |
251 | break; | 251 | break; |
252 | } | 252 | } |
253 | 253 | ||
254 | QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); | 254 | QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); |
255 | te << *it << tc. m_text_color; | 255 | te << *it << tc. m_text_color; |
256 | 256 | ||
257 | QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); | 257 | QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); |
258 | fe << *it; | 258 | fe << *it; |
259 | fe << ( tc. m_font_use ? tc. m_font_family : QString::null ); | 259 | fe << ( tc. m_font_use ? tc. m_font_family : QString::null ); |
260 | fe << tc. m_font_size; | 260 | fe << tc. m_font_size; |
261 | fe << tc. m_font_weight; | 261 | fe << tc. m_font_weight; |
262 | fe << ( tc. m_font_italic ? 1 : 0 ); | 262 | fe << ( tc. m_font_italic ? 1 : 0 ); |
263 | 263 | ||
264 | tc. m_changed = false; | 264 | tc. m_changed = false; |
265 | } | 265 | } |
266 | cfg. setGroup ( "GUI" ); | 266 | cfg. setGroup ( "GUI" ); |
267 | QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" ); | 267 | QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" ); |
268 | cfg. writeEntry ( "BusyType", busytype ); | 268 | cfg. writeEntry ( "BusyType", busytype ); |
269 | 269 | ||
270 | cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) ); | 270 | cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) ); |
271 | 271 | ||
272 | { | 272 | { |
273 | QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); | 273 | QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); |
274 | e << busytype; | 274 | e << busytype; |
275 | } | 275 | } |
276 | } | 276 | } |
277 | 277 | ||
278 | void TabsSettings::newClicked ( ) | 278 | void TabsSettings::newClicked ( ) |
279 | { | 279 | { |
280 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); | 280 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); |
281 | } | 281 | } |
282 | 282 | ||
283 | void TabsSettings::deleteClicked ( ) | 283 | void TabsSettings::deleteClicked ( ) |
284 | { | 284 | { |
285 | int ind = m_list-> currentItem ( ); | 285 | int ind = m_list-> currentItem ( ); |
286 | 286 | ||
287 | if ( ind < 0 ) | 287 | if ( ind < 0 ) |
288 | return; | 288 | return; |
289 | 289 | ||
290 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); | 290 | QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); |
291 | } | 291 | } |
292 | 292 | ||
293 | void TabsSettings::editClicked ( ) | 293 | void TabsSettings::editClicked ( ) |
294 | { | 294 | { |
295 | int ind = m_list-> currentItem ( ); | 295 | int ind = m_list-> currentItem ( ); |
296 | 296 | ||
297 | if ( ind < 0 ) | 297 | if ( ind < 0 ) |
298 | return; | 298 | return; |
299 | 299 | ||
300 | TabConfig tc = m_tabs [m_ids [ind]]; | 300 | TabConfig tc = m_tabs [m_ids [ind]]; |
301 | 301 | ||
302 | TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); | 302 | TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); |
303 | 303 | ||
304 | d-> showMaximized ( ); | 304 | d-> showMaximized ( ); |
305 | if ( d-> exec ( ) == QDialog::Accepted ) { | 305 | if ( d-> exec ( ) == QDialog::Accepted ) { |
306 | tc. m_changed = true; | 306 | tc. m_changed = true; |
307 | m_tabs [m_ids [ind]] = tc; | 307 | m_tabs [m_ids [ind]] = tc; |
308 | 308 | ||
309 | if ( m_ids [ind] == GLOBALID ) { | 309 | if ( m_ids [ind] == GLOBALID ) { |
310 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { | 310 | for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { |
311 | if ( *it != GLOBALID ) | 311 | if ( *it != GLOBALID ) |
312 | m_tabs [*it] = tc; | 312 | m_tabs [*it] = tc; |
313 | } | 313 | } |
314 | } | 314 | } |
315 | } | 315 | } |
316 | 316 | ||
317 | delete d; | 317 | delete d; |
318 | } | 318 | } |
diff --git a/core/settings/launcher/tabssettings.h b/core/settings/launcher/tabssettings.h index 439def6..600c65c 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_busyblink, *m_bigbusy; | 62 | QCheckBox *m_busyani, *m_bigbusy; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | 65 | ||
66 | 66 | ||
67 | 67 | ||
68 | #endif | 68 | #endif |