-rw-r--r-- | noncore/settings/doctab/.cvsignore | 4 | ||||
-rw-r--r-- | noncore/settings/doctab/config.in | 4 | ||||
-rw-r--r-- | noncore/settings/doctab/doctab.cpp | 94 | ||||
-rw-r--r-- | noncore/settings/doctab/doctab.h | 57 | ||||
-rw-r--r-- | noncore/settings/doctab/doctab.pro | 10 | ||||
-rw-r--r-- | noncore/settings/doctab/doctabsettingsbase.ui | 115 | ||||
-rw-r--r-- | noncore/settings/doctab/main.cpp | 25 | ||||
-rw-r--r-- | noncore/settings/doctab/opie-doctab.control | 10 |
8 files changed, 319 insertions, 0 deletions
diff --git a/noncore/settings/doctab/.cvsignore b/noncore/settings/doctab/.cvsignore new file mode 100644 index 0000000..50a4b1c --- a/dev/null +++ b/noncore/settings/doctab/.cvsignore | |||
@@ -0,0 +1,4 @@ | |||
1 | Makefile* | ||
2 | languagesettingsbase.cpp | ||
3 | languagesettingsbase.h | ||
4 | moc_* | ||
diff --git a/noncore/settings/doctab/config.in b/noncore/settings/doctab/config.in new file mode 100644 index 0000000..5decda5 --- a/dev/null +++ b/noncore/settings/doctab/config.in | |||
@@ -0,0 +1,4 @@ | |||
1 | config DOCTAB | ||
2 | boolean "opie-doctab (select doctab for Opie)" | ||
3 | default "y" | ||
4 | depends ( LIBQPE || LIBQPE-X11 ) | ||
diff --git a/noncore/settings/doctab/doctab.cpp b/noncore/settings/doctab/doctab.cpp new file mode 100644 index 0000000..feaf538 --- a/dev/null +++ b/noncore/settings/doctab/doctab.cpp | |||
@@ -0,0 +1,94 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include "doctab.h" | ||
22 | |||
23 | #include <qpe/global.h> | ||
24 | #include <qpe/fontmanager.h> | ||
25 | #include <qpe/config.h> | ||
26 | #include <qpe/applnk.h> | ||
27 | #include <qpe/qpedialog.h> | ||
28 | #include <qpe/qpeapplication.h> | ||
29 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | ||
30 | #include <qpe/qcopenvelope_qws.h> | ||
31 | #endif | ||
32 | |||
33 | #include <qlabel.h> | ||
34 | #include <qcheckbox.h> | ||
35 | #include <qradiobutton.h> | ||
36 | #include <qtabwidget.h> | ||
37 | #include <qslider.h> | ||
38 | #include <qfile.h> | ||
39 | #include <qtextstream.h> | ||
40 | #include <qdatastream.h> | ||
41 | #include <qmessagebox.h> | ||
42 | #include <qcombobox.h> | ||
43 | #include <qspinbox.h> | ||
44 | #include <qlistbox.h> | ||
45 | #include <qdir.h> | ||
46 | #if QT_VERSION >= 300 | ||
47 | #include <qstylefactory.h> | ||
48 | #endif | ||
49 | |||
50 | #include <stdlib.h> | ||
51 | |||
52 | |||
53 | DocTabSettings::DocTabSettings( QWidget* parent, const char* name, WFlags fl ) | ||
54 | : DocTabSettingsBase( parent, name, TRUE, fl ) | ||
55 | { | ||
56 | dl = new QPEDialogListener(this); | ||
57 | reset(); | ||
58 | } | ||
59 | |||
60 | DocTabSettings::~DocTabSettings() | ||
61 | {} | ||
62 | |||
63 | void DocTabSettings::accept() | ||
64 | { | ||
65 | applyDocTab(); | ||
66 | QDialog::accept(); | ||
67 | } | ||
68 | |||
69 | void DocTabSettings::applyDocTab() | ||
70 | { | ||
71 | Config cfg( "Launcher" ); | ||
72 | cfg.setGroup( "DocTab" ); | ||
73 | cfg.writeEntry( "Enable", yes->isChecked() ); | ||
74 | cfg.write(); | ||
75 | } | ||
76 | |||
77 | |||
78 | void DocTabSettings::reject() | ||
79 | { | ||
80 | reset(); | ||
81 | QDialog::reject(); | ||
82 | } | ||
83 | |||
84 | void DocTabSettings::reset() | ||
85 | { | ||
86 | } | ||
87 | |||
88 | QString DocTabSettings::actualDocTab; | ||
89 | |||
90 | void DocTabSettings::done(int r) | ||
91 | { | ||
92 | QDialog::done(r); | ||
93 | close(); | ||
94 | } | ||
diff --git a/noncore/settings/doctab/doctab.h b/noncore/settings/doctab/doctab.h new file mode 100644 index 0000000..ed71978 --- a/dev/null +++ b/noncore/settings/doctab/doctab.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | #ifndef DOCTAB_H | ||
21 | #define DOCTAB_H | ||
22 | |||
23 | |||
24 | #include <qstrlist.h> | ||
25 | #include <qasciidict.h> | ||
26 | #include "doctabsettingsbase.h" | ||
27 | |||
28 | class QPEDialogListener; | ||
29 | |||
30 | class DocTabSettings : public DocTabSettingsBase | ||
31 | { | ||
32 | Q_OBJECT | ||
33 | |||
34 | public: | ||
35 | DocTabSettings( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
36 | ~DocTabSettings(); | ||
37 | |||
38 | static QString appName() { return QString::fromLatin1("doctab"); } | ||
39 | |||
40 | protected: | ||
41 | void accept(); | ||
42 | void reject(); | ||
43 | void done(int); | ||
44 | |||
45 | private slots: | ||
46 | void applyDocTab(); | ||
47 | void reset(); | ||
48 | |||
49 | private: | ||
50 | static QString actualDocTab; | ||
51 | |||
52 | QPEDialogListener *dl; | ||
53 | }; | ||
54 | |||
55 | |||
56 | #endif // SETTINGS_H | ||
57 | |||
diff --git a/noncore/settings/doctab/doctab.pro b/noncore/settings/doctab/doctab.pro new file mode 100644 index 0000000..d12ac2d --- a/dev/null +++ b/noncore/settings/doctab/doctab.pro | |||
@@ -0,0 +1,10 @@ | |||
1 | CONFIG += qt warn_on release quick-app | ||
2 | HEADERS = doctab.h | ||
3 | SOURCES = doctab.cpp main.cpp | ||
4 | INTERFACES= doctabsettingsbase.ui | ||
5 | INCLUDEPATH += $(OPIEDIR)/include | ||
6 | DEPENDPATH+= ../$(OPIEDIR)/include | ||
7 | LIBS += -lqpe | ||
8 | TARGET = doctab | ||
9 | |||
10 | include ( $(OPIEDIR)/include.pro ) | ||
diff --git a/noncore/settings/doctab/doctabsettingsbase.ui b/noncore/settings/doctab/doctabsettingsbase.ui new file mode 100644 index 0000000..e3bb39b --- a/dev/null +++ b/noncore/settings/doctab/doctabsettingsbase.ui | |||
@@ -0,0 +1,115 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>DocTabSettingsBase</class> | ||
3 | <widget> | ||
4 | <class>QDialog</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>DocTabSettingsBase</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>273</width> | ||
15 | <height>293</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>DocTab Settings</string> | ||
21 | </property> | ||
22 | <vbox> | ||
23 | <property stdset="1"> | ||
24 | <name>margin</name> | ||
25 | <number>11</number> | ||
26 | </property> | ||
27 | <property stdset="1"> | ||
28 | <name>spacing</name> | ||
29 | <number>6</number> | ||
30 | </property> | ||
31 | <widget> | ||
32 | <class>QLabel</class> | ||
33 | <property stdset="1"> | ||
34 | <name>name</name> | ||
35 | <cstring>TextLabel1</cstring> | ||
36 | </property> | ||
37 | <property stdset="1"> | ||
38 | <name>text</name> | ||
39 | <string><b>Do you want a Documents Tab?</b><p> | ||
40 | (Note that such a tab scans <i>all</i> documents | ||
41 | on <i>all</i> external media, which can be quite | ||
42 | slow and annyoing...)</string> | ||
43 | </property> | ||
44 | </widget> | ||
45 | <widget> | ||
46 | <class>QButtonGroup</class> | ||
47 | <property stdset="1"> | ||
48 | <name>name</name> | ||
49 | <cstring>ButtonGroup1</cstring> | ||
50 | </property> | ||
51 | <property stdset="1"> | ||
52 | <name>title</name> | ||
53 | <string>Enable the DocTab</string> | ||
54 | </property> | ||
55 | <vbox> | ||
56 | <property stdset="1"> | ||
57 | <name>margin</name> | ||
58 | <number>11</number> | ||
59 | </property> | ||
60 | <property stdset="1"> | ||
61 | <name>spacing</name> | ||
62 | <number>6</number> | ||
63 | </property> | ||
64 | <widget> | ||
65 | <class>QRadioButton</class> | ||
66 | <property stdset="1"> | ||
67 | <name>name</name> | ||
68 | <cstring>yes</cstring> | ||
69 | </property> | ||
70 | <property stdset="1"> | ||
71 | <name>text</name> | ||
72 | <string>Yes, please!</string> | ||
73 | </property> | ||
74 | <property stdset="1"> | ||
75 | <name>checked</name> | ||
76 | <bool>true</bool> | ||
77 | </property> | ||
78 | </widget> | ||
79 | <widget> | ||
80 | <class>QRadioButton</class> | ||
81 | <property stdset="1"> | ||
82 | <name>name</name> | ||
83 | <cstring>no</cstring> | ||
84 | </property> | ||
85 | <property stdset="1"> | ||
86 | <name>text</name> | ||
87 | <string>No, thanks.</string> | ||
88 | </property> | ||
89 | </widget> | ||
90 | </vbox> | ||
91 | </widget> | ||
92 | <spacer> | ||
93 | <property> | ||
94 | <name>name</name> | ||
95 | <cstring>Spacer1</cstring> | ||
96 | </property> | ||
97 | <property stdset="1"> | ||
98 | <name>orientation</name> | ||
99 | <enum>Vertical</enum> | ||
100 | </property> | ||
101 | <property stdset="1"> | ||
102 | <name>sizeType</name> | ||
103 | <enum>Expanding</enum> | ||
104 | </property> | ||
105 | <property> | ||
106 | <name>sizeHint</name> | ||
107 | <size> | ||
108 | <width>20</width> | ||
109 | <height>20</height> | ||
110 | </size> | ||
111 | </property> | ||
112 | </spacer> | ||
113 | </vbox> | ||
114 | </widget> | ||
115 | </UI> | ||
diff --git a/noncore/settings/doctab/main.cpp b/noncore/settings/doctab/main.cpp new file mode 100644 index 0000000..bfeb2a3 --- a/dev/null +++ b/noncore/settings/doctab/main.cpp | |||
@@ -0,0 +1,25 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include "settings.h" | ||
22 | |||
23 | #include <opie/oapplicationfactory.h> | ||
24 | |||
25 | OPIE_EXPORT_APP( OApplicationFactory<DocTabSettings> ) | ||
diff --git a/noncore/settings/doctab/opie-doctab.control b/noncore/settings/doctab/opie-doctab.control new file mode 100644 index 0000000..9951561 --- a/dev/null +++ b/noncore/settings/doctab/opie-doctab.control | |||
@@ -0,0 +1,10 @@ | |||
1 | Package: opie-doctab | ||
2 | Files: plugins/application/libdoctab.so* bin/doctab apps/Settings/DocTab.desktop | ||
3 | Priority: optional | ||
4 | Section: opie/settings | ||
5 | Maintainer: The Opie Team <opie-devel@handhelds.org> | ||
6 | Architecture: arm | ||
7 | Depends: task-opie-minimal | ||
8 | Description: DocTab settings dialog | ||
9 | For the Opie environment. | ||
10 | Version: $QPE_VERSION$EXTRAVERSION | ||