-rw-r--r-- | core/settings/launcher/doctabsettings.cpp | 71 | ||||
-rw-r--r-- | core/settings/launcher/doctabsettings.h | 55 | ||||
-rw-r--r-- | core/settings/launcher/inputmethodsettings.cpp | 3 | ||||
-rw-r--r-- | core/settings/launcher/launcher.pro | 2 | ||||
-rw-r--r-- | core/settings/launcher/launchersettings.cpp | 5 | ||||
-rw-r--r-- | core/settings/launcher/launchersettings.h | 2 |
6 files changed, 135 insertions, 3 deletions
diff --git a/core/settings/launcher/doctabsettings.cpp b/core/settings/launcher/doctabsettings.cpp new file mode 100644 index 0000000..8077b8c --- a/dev/null +++ b/core/settings/launcher/doctabsettings.cpp | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | This file is part of the OPIE Project | ||
3 | =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> | ||
4 | .=l. Copyright (c) 2003 Michael Lauer <mickeyl@handhelds.org> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | |||
29 | #include "doctabsettings.h" | ||
30 | |||
31 | #include <qpe/config.h> | ||
32 | #include <qpe/qlibrary.h> | ||
33 | #include <qpe/qpeapplication.h> | ||
34 | |||
35 | #include <qspinbox.h> | ||
36 | #include <qcheckbox.h> | ||
37 | #include <qlayout.h> | ||
38 | #include <qlabel.h> | ||
39 | #include <qwhatsthis.h> | ||
40 | |||
41 | DocTabSettings::DocTabSettings( QWidget *parent, const char *name ):QWidget( parent, name ) | ||
42 | { | ||
43 | QBoxLayout *lay = new QVBoxLayout( this, 4, 4 ); | ||
44 | |||
45 | _enable = new QCheckBox( tr( "Enable the Documents Tab" ), this ); | ||
46 | |||
47 | Config cfg( "Launcher" ); | ||
48 | cfg.setGroup( "DocTab" ); | ||
49 | _enable->setChecked( cfg.readBoolEntry( "Enable", true ) ); | ||
50 | |||
51 | lay->addWidget( _enable ); | ||
52 | lay->addWidget( new QLabel( tr( "<b>Note:</b> Changing these settings may need restarting Opie to become effective." ), this ) ); | ||
53 | |||
54 | lay->addStretch(); | ||
55 | |||
56 | QWhatsThis::add( _enable, tr( "Check, if you want the Documents Tab to be visible." ) ); | ||
57 | } | ||
58 | |||
59 | void DocTabSettings::appletChanged() | ||
60 | { | ||
61 | } | ||
62 | |||
63 | void DocTabSettings::accept() | ||
64 | { | ||
65 | qDebug( "DocTabSettings::accept()" ); | ||
66 | Config cfg( "Launcher" ); | ||
67 | cfg.setGroup( "DocTab" ); | ||
68 | cfg.writeEntry( "Enable", _enable->isChecked() ); | ||
69 | cfg.write(); | ||
70 | } | ||
71 | |||
diff --git a/core/settings/launcher/doctabsettings.h b/core/settings/launcher/doctabsettings.h new file mode 100644 index 0000000..ad6447c --- a/dev/null +++ b/core/settings/launcher/doctabsettings.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2003 Michael Lauer <mickeyl@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | |||
26 | */ | ||
27 | |||
28 | #ifndef __DOCTAB_SETTINGS_H__ | ||
29 | #define __DOCTAB_SETTINGS_H__ | ||
30 | |||
31 | #include <qwidget.h> | ||
32 | |||
33 | class QCheckBox; | ||
34 | class QSpinBox; | ||
35 | |||
36 | class DocTabSettings : public QWidget | ||
37 | { | ||
38 | Q_OBJECT | ||
39 | |||
40 | public: | ||
41 | DocTabSettings ( QWidget *parent = 0, const char *name = 0 ); | ||
42 | |||
43 | void accept ( ); | ||
44 | |||
45 | protected slots: | ||
46 | void appletChanged ( ); | ||
47 | |||
48 | protected: | ||
49 | void init ( ); | ||
50 | |||
51 | private: | ||
52 | QCheckBox* _enable; | ||
53 | }; | ||
54 | |||
55 | #endif | ||
diff --git a/core/settings/launcher/inputmethodsettings.cpp b/core/settings/launcher/inputmethodsettings.cpp index 1aa1ae8..147a00d 100644 --- a/core/settings/launcher/inputmethodsettings.cpp +++ b/core/settings/launcher/inputmethodsettings.cpp | |||
@@ -36,40 +36,39 @@ | |||
36 | #include <qcheckbox.h> | 36 | #include <qcheckbox.h> |
37 | #include <qlayout.h> | 37 | #include <qlayout.h> |
38 | #include <qlabel.h> | 38 | #include <qlabel.h> |
39 | #include <qwhatsthis.h> | 39 | #include <qwhatsthis.h> |
40 | 40 | ||
41 | InputMethodSettings::InputMethodSettings( QWidget *parent, const char *name ):QWidget( parent, name ) | 41 | InputMethodSettings::InputMethodSettings( QWidget *parent, const char *name ):QWidget( parent, name ) |
42 | { | 42 | { |
43 | QBoxLayout *lay = new QVBoxLayout( this, 4, 4 ); | 43 | QBoxLayout *lay = new QVBoxLayout( this, 4, 4 ); |
44 | 44 | ||
45 | _resize = new QCheckBox( tr( "Resize application on Popup" ), this ); | 45 | _resize = new QCheckBox( tr( "Resize application on Popup" ), this ); |
46 | _float = new QCheckBox( tr( "Enable floating and resizing" ), this ); | 46 | _float = new QCheckBox( tr( "Enable floating and resizing" ), this ); |
47 | 47 | ||
48 | QHBoxLayout* hbox = new QHBoxLayout( this, 4, 4 ); | 48 | QHBoxLayout* hbox = new QHBoxLayout( lay, 4 ); |
49 | hbox->addWidget( new QLabel( "Initial Width:", this ) ); | 49 | hbox->addWidget( new QLabel( "Initial Width:", this ) ); |
50 | _size = new QSpinBox( 10, 100, 10, this ); | 50 | _size = new QSpinBox( 10, 100, 10, this ); |
51 | _size->setSuffix( "%" ); | 51 | _size->setSuffix( "%" ); |
52 | hbox->addWidget( _size ); | 52 | hbox->addWidget( _size ); |
53 | hbox->addStretch(); | 53 | hbox->addStretch(); |
54 | 54 | ||
55 | Config cfg( "Launcher" ); | 55 | Config cfg( "Launcher" ); |
56 | cfg.setGroup( "InputMethods" ); | 56 | cfg.setGroup( "InputMethods" ); |
57 | _resize->setChecked( cfg.readBoolEntry( "Resize", true ) ); | 57 | _resize->setChecked( cfg.readBoolEntry( "Resize", true ) ); |
58 | _float->setChecked( cfg.readBoolEntry( "Float", false ) ); | 58 | _float->setChecked( cfg.readBoolEntry( "Float", false ) ); |
59 | _size->setValue( cfg.readNumEntry( "Width", 100 ) ); | 59 | _size->setValue( cfg.readNumEntry( "Width", 100 ) ); |
60 | 60 | ||
61 | lay->addWidget( _resize ); | 61 | lay->addWidget( _resize ); |
62 | lay->addWidget( _float ); | 62 | lay->addWidget( _float ); |
63 | lay->addLayout( hbox ); | ||
64 | lay->addWidget( new QLabel( tr( "<b>Note:</b> Changing these settings may need restarting Opie to become effective." ), this ) ); | 63 | lay->addWidget( new QLabel( tr( "<b>Note:</b> Changing these settings may need restarting Opie to become effective." ), this ) ); |
65 | 64 | ||
66 | lay->addStretch(); | 65 | lay->addStretch(); |
67 | 66 | ||
68 | QWhatsThis::add( _resize, tr( "Check, if you want the application to be automatically resized if the input method pops up." ) ); | 67 | QWhatsThis::add( _resize, tr( "Check, if you want the application to be automatically resized if the input method pops up." ) ); |
69 | QWhatsThis::add( _float, tr( "Check, if you want to move and/or resize input methods" ) ); | 68 | QWhatsThis::add( _float, tr( "Check, if you want to move and/or resize input methods" ) ); |
70 | QWhatsThis::add( _size, tr( "Specify the percentage of the screen width for the input method" ) ); | 69 | QWhatsThis::add( _size, tr( "Specify the percentage of the screen width for the input method" ) ); |
71 | } | 70 | } |
72 | 71 | ||
73 | void InputMethodSettings::appletChanged() | 72 | void InputMethodSettings::appletChanged() |
74 | { | 73 | { |
75 | } | 74 | } |
diff --git a/core/settings/launcher/launcher.pro b/core/settings/launcher/launcher.pro index 9d05832..3261ee8 100644 --- a/core/settings/launcher/launcher.pro +++ b/core/settings/launcher/launcher.pro | |||
@@ -1,26 +1,28 @@ | |||
1 | CONFIG += qt warn_on release quick-app | 1 | CONFIG += qt warn_on release quick-app |
2 | HEADERS = launchersettings.h \ | 2 | HEADERS = launchersettings.h \ |
3 | tabssettings.h \ | 3 | tabssettings.h \ |
4 | taskbarsettings.h \ | 4 | taskbarsettings.h \ |
5 | menusettings.h \ | 5 | menusettings.h \ |
6 | inputmethodsettings.h \ | 6 | inputmethodsettings.h \ |
7 | doctabsettings.h \ | ||
7 | tabconfig.h \ | 8 | tabconfig.h \ |
8 | tabdialog.h | 9 | tabdialog.h |
9 | 10 | ||
10 | SOURCES = main.cpp \ | 11 | SOURCES = main.cpp \ |
11 | launchersettings.cpp \ | 12 | launchersettings.cpp \ |
12 | tabssettings.cpp \ | 13 | tabssettings.cpp \ |
13 | taskbarsettings.cpp \ | 14 | taskbarsettings.cpp \ |
14 | menusettings.cpp \ | 15 | menusettings.cpp \ |
15 | inputmethodsettings.cpp \ | 16 | inputmethodsettings.cpp \ |
17 | doctabsettings.cpp \ | ||
16 | tabdialog.cpp | 18 | tabdialog.cpp |
17 | 19 | ||
18 | INCLUDEPATH += $(OPIEDIR)/include | 20 | INCLUDEPATH += $(OPIEDIR)/include |
19 | DEPENDPATH += $(OPIEDIR)/include | 21 | DEPENDPATH += $(OPIEDIR)/include |
20 | LIBS += -lqpe -lopie | 22 | LIBS += -lqpe -lopie |
21 | TARGET = launchersettings | 23 | TARGET = launchersettings |
22 | 24 | ||
23 | 25 | ||
24 | 26 | ||
25 | 27 | ||
26 | include ( $(OPIEDIR)/include.pro ) | 28 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/settings/launcher/launchersettings.cpp b/core/settings/launcher/launchersettings.cpp index efc4a86..e129849 100644 --- a/core/settings/launcher/launchersettings.cpp +++ b/core/settings/launcher/launchersettings.cpp | |||
@@ -27,51 +27,54 @@ | |||
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 | #include "doctabsettings.h" | ||
39 | 40 | ||
40 | LauncherSettings::LauncherSettings (QWidget*,const char*, WFlags) | 41 | LauncherSettings::LauncherSettings (QWidget*,const char*, WFlags) |
41 | : QDialog ( 0, "LauncherSettings", false, WStyle_ContextHelp ) | 42 | : QDialog ( 0, "LauncherSettings", false, WStyle_ContextHelp ) |
42 | { | 43 | { |
43 | setCaption ( tr( "Launcher Settings" )); | 44 | setCaption ( tr( "Launcher Settings" )); |
44 | 45 | ||
45 | QVBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); | 46 | QVBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); |
46 | 47 | ||
47 | OTabWidget *tw = new OTabWidget ( this, "otab" ); | 48 | OTabWidget *tw = new OTabWidget ( this, "otab" ); |
48 | lay-> addWidget ( tw ); | 49 | lay-> addWidget ( tw ); |
49 | 50 | ||
50 | m_tabs = new TabsSettings ( tw ); | 51 | m_tabs = new TabsSettings ( tw ); |
51 | m_taskbar = new TaskbarSettings ( tw ); | 52 | m_taskbar = new TaskbarSettings ( tw ); |
52 | m_menu = new MenuSettings ( tw ); | 53 | m_menu = new MenuSettings ( tw ); |
53 | m_imethods = new InputMethodSettings ( tw ); | 54 | m_imethods = new InputMethodSettings ( tw ); |
55 | m_doctab = new DocTabSettings ( tw ); | ||
54 | 56 | ||
55 | tw-> addTab ( m_taskbar, "wait", tr( "Taskbar" )); | 57 | tw-> addTab ( m_taskbar, "wait", tr( "Taskbar" )); |
56 | tw-> addTab ( m_menu, "go", tr( "O-Menu" )); | 58 | tw-> addTab ( m_menu, "go", tr( "O-Menu" )); |
57 | tw-> addTab ( m_tabs, "launchersettings/tabstab.png", tr( "Tabs" )); | 59 | tw-> addTab ( m_tabs, "launchersettings/tabstab.png", tr( "Tabs" )); |
58 | tw-> addTab ( m_imethods, "launchersettings/inputmethod.png", tr( "InputMethods" )); | 60 | tw-> addTab ( m_imethods, "launchersettings/inputmethod.png", tr( "InputMethods" )); |
59 | 61 | tw-> addTab ( m_doctab, "DocsIcon", tr( "DocTab" ) ); | |
60 | tw-> setCurrentTab ( m_taskbar ); | 62 | tw-> setCurrentTab ( m_taskbar ); |
61 | } | 63 | } |
62 | 64 | ||
63 | void LauncherSettings::accept ( ) | 65 | void LauncherSettings::accept ( ) |
64 | { | 66 | { |
65 | m_taskbar-> accept ( ); | 67 | m_taskbar-> accept ( ); |
66 | m_menu-> accept ( ); | 68 | m_menu-> accept ( ); |
67 | m_tabs-> accept ( ); | 69 | m_tabs-> accept ( ); |
68 | m_imethods-> accept ( ); | 70 | m_imethods-> accept ( ); |
71 | m_doctab-> accept ( ); | ||
69 | 72 | ||
70 | QDialog::accept ( ); | 73 | QDialog::accept ( ); |
71 | } | 74 | } |
72 | 75 | ||
73 | void LauncherSettings::done ( int r ) | 76 | void LauncherSettings::done ( int r ) |
74 | { | 77 | { |
75 | QDialog::done ( r ); | 78 | QDialog::done ( r ); |
76 | close ( ); | 79 | close ( ); |
77 | } | 80 | } |
diff --git a/core/settings/launcher/launchersettings.h b/core/settings/launcher/launchersettings.h index 7458d8b..9ba2942 100644 --- a/core/settings/launcher/launchersettings.h +++ b/core/settings/launcher/launchersettings.h | |||
@@ -25,31 +25,33 @@ | |||
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 | class DocTabSettings; | ||
37 | 38 | ||
38 | class LauncherSettings : public QDialog { | 39 | class LauncherSettings : public QDialog { |
39 | Q_OBJECT | 40 | Q_OBJECT |
40 | 41 | ||
41 | public: | 42 | public: |
42 | static QString appName() { return QString::fromLatin1("launchersettings"); } | 43 | static QString appName() { return QString::fromLatin1("launchersettings"); } |
43 | LauncherSettings (QWidget *parent = 0, const char* name = 0, WFlags fl = 0 ); | 44 | LauncherSettings (QWidget *parent = 0, const char* name = 0, WFlags fl = 0 ); |
44 | 45 | ||
45 | virtual void accept ( ); | 46 | virtual void accept ( ); |
46 | virtual void done ( int r ); | 47 | virtual void done ( int r ); |
47 | 48 | ||
48 | private: | 49 | private: |
49 | TabsSettings *m_tabs; | 50 | TabsSettings *m_tabs; |
50 | TaskbarSettings *m_taskbar; | 51 | TaskbarSettings *m_taskbar; |
51 | MenuSettings *m_menu; | 52 | MenuSettings *m_menu; |
52 | InputMethodSettings* m_imethods; | 53 | InputMethodSettings* m_imethods; |
54 | DocTabSettings *m_doctab; | ||
53 | }; | 55 | }; |
54 | 56 | ||
55 | #endif | 57 | #endif |