-rw-r--r-- | libopie2/opiecore/oapplication.h | 5 | ||||
-rw-r--r-- | libopie2/opiecore/opieapplication.cpp | 22 | ||||
-rw-r--r-- | libopie2/opiecore/opieapplication.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/opieconfig.h | 3 | ||||
-rw-r--r-- | libopie2/opieui/omenubar.cpp | 36 | ||||
-rw-r--r-- | libopie2/opieui/omenubar.h | 49 | ||||
-rw-r--r-- | libopie2/opieui/omessagebox.h | 53 | ||||
-rw-r--r-- | libopie2/opieui/opiemenubar.cpp | 43 | ||||
-rw-r--r-- | libopie2/opieui/opiemenubar.h | 52 | ||||
-rw-r--r-- | libopie2/opieui/opieui.pro | 9 | ||||
-rw-r--r-- | libopie2/opieui/oresource.cpp | 58 | ||||
-rw-r--r-- | libopie2/opieui/oresource.h | 49 | ||||
-rw-r--r-- | libopie2/opieui/otoolbar.cpp | 41 | ||||
-rw-r--r-- | libopie2/opieui/otoolbar.h | 55 |
14 files changed, 476 insertions, 1 deletions
diff --git a/libopie2/opiecore/oapplication.h b/libopie2/opiecore/oapplication.h index da5b905..a3f2201 100644 --- a/libopie2/opiecore/oapplication.h +++ b/libopie2/opiecore/oapplication.h | |||
@@ -47,59 +47,64 @@ class OApplication : public OpieApplication | |||
47 | 47 | ||
48 | public: | 48 | public: |
49 | /** | 49 | /** |
50 | * Constructor. Parses command-line arguments and sets the window caption. | 50 | * Constructor. Parses command-line arguments and sets the window caption. |
51 | * | 51 | * |
52 | * @param rAppName application name. Will be used for finding the | 52 | * @param rAppName application name. Will be used for finding the |
53 | * associated message, icon and configuration files | 53 | * associated message, icon and configuration files |
54 | * | 54 | * |
55 | */ | 55 | */ |
56 | OApplication( int& argc, char** argv, const QCString& rAppName ); | 56 | OApplication( int& argc, char** argv, const QCString& rAppName ); |
57 | /** | 57 | /** |
58 | * Destructor. Destroys the application object and its children. | 58 | * Destructor. Destroys the application object and its children. |
59 | */ | 59 | */ |
60 | virtual ~OApplication(); | 60 | virtual ~OApplication(); |
61 | /** | 61 | /** |
62 | * @returns the process-wide application object | 62 | * @returns the process-wide application object |
63 | * | 63 | * |
64 | * This is similar to the global @ref QApplication pointer qApp. It | 64 | * This is similar to the global @ref QApplication pointer qApp. It |
65 | * allows access to the single global OApplication object, since | 65 | * allows access to the single global OApplication object, since |
66 | * more than one cannot be created in the same application. It | 66 | * more than one cannot be created in the same application. It |
67 | * saves you the trouble of having to pass the pointer explicitly | 67 | * saves you the trouble of having to pass the pointer explicitly |
68 | * to every function that may require it. | 68 | * to every function that may require it. |
69 | */ | 69 | */ |
70 | static OApplication* oApplication() { return _instance; }; | 70 | static OApplication* oApplication() { return _instance; }; |
71 | /** | 71 | /** |
72 | * Returns the application name as given during creation. | 72 | * Returns the application name as given during creation. |
73 | * | 73 | * |
74 | * @returns a reference to the application name | 74 | * @returns a reference to the application name |
75 | */ | 75 | */ |
76 | const QCString& appName() const { return _appname; }; | 76 | const QCString& appName() const { return _appname; }; |
77 | /** | 77 | /** |
78 | * @returns the application session config object. | 78 | * @returns the application session config object. |
79 | * | 79 | * |
80 | * @see OConfig | 80 | * @see OConfig |
81 | */ | 81 | */ |
82 | OConfig* config(); | 82 | OConfig* config(); |
83 | /** | 83 | /** |
84 | * Shows the main @a widget and sets the name of the application as window caption. | 84 | * Shows the main @a widget and sets the name of the application as window caption. |
85 | */ | 85 | */ |
86 | virtual void showMainWidget( QWidget* widget, bool nomax = false ); | 86 | virtual void showMainWidget( QWidget* widget, bool nomax = false ); |
87 | /** | 87 | /** |
88 | * Set the application title. The application title will be concatenated | 88 | * Set the application title. The application title will be concatenated |
89 | * to the application name given in the constructor. | 89 | * to the application name given in the constructor. |
90 | * | 90 | * |
91 | * @param title the title. If not given, resets caption to appname | 91 | * @param title the title. If not given, resets caption to appname |
92 | */ | 92 | */ |
93 | virtual void setTitle( const QString& title = QString::null ) const; | 93 | virtual void setTitle( const QString& title = QString::null ) const; |
94 | 94 | ||
95 | /** | ||
96 | * see qpeDir() | ||
97 | */ | ||
98 | static QString opieDir() {return qpeDir();}; | ||
99 | |||
95 | protected: | 100 | protected: |
96 | void init(); | 101 | void init(); |
97 | 102 | ||
98 | private: | 103 | private: |
99 | const QCString _appname; | 104 | const QCString _appname; |
100 | static OApplication* _instance; | 105 | static OApplication* _instance; |
101 | OConfig* _config; | 106 | OConfig* _config; |
102 | OApplicationPrivate* d; | 107 | OApplicationPrivate* d; |
103 | }; | 108 | }; |
104 | 109 | ||
105 | #endif // OAPPLICATION_H | 110 | #endif // OAPPLICATION_H |
diff --git a/libopie2/opiecore/opieapplication.cpp b/libopie2/opiecore/opieapplication.cpp index 7ff7b44..ae27b25 100644 --- a/libopie2/opiecore/opieapplication.cpp +++ b/libopie2/opiecore/opieapplication.cpp | |||
@@ -1,48 +1,70 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> | 4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> |
5 | =. | 5 | =. |
6 | .=l. | 6 | .=l. |
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <opie2/odebug.h> | ||
31 | 32 | ||
32 | #include "opieapplication.h" | 33 | #include "opieapplication.h" |
33 | 34 | ||
34 | OpieApplication::OpieApplication( int& argc, char** argv) | 35 | OpieApplication::OpieApplication( int& argc, char** argv) |
35 | #ifdef QWS | 36 | #ifdef QWS |
36 | : QPEApplication(argc,argv) | 37 | : QPEApplication(argc,argv) |
37 | #else | 38 | #else |
38 | : QApplication(argc,argv) | 39 | : QApplication(argc,argv) |
39 | #endif | 40 | #endif |
40 | {}; | 41 | {}; |
41 | 42 | ||
42 | #ifndef QWS | 43 | #ifndef QWS |
43 | void OpieApplication::showMainWidget( QWidget* widget, bool nomax ) | 44 | void OpieApplication::showMainWidget( QWidget* widget, bool nomax ) |
44 | { | 45 | { |
46 | if (nomax) odebug << "ignoring nomax"; | ||
45 | setMainWidget( widget ); | 47 | setMainWidget( widget ); |
46 | widget->show(); | 48 | widget->show(); |
47 | }; | 49 | }; |
48 | #endif | 50 | #endif |
51 | |||
52 | #ifndef QWS | ||
53 | QString OpieApplication::qpeDir() | ||
54 | { | ||
55 | const char * base = getenv( "OPIEDIR" ); | ||
56 | if ( base ) | ||
57 | return QString( base ) + "/"; | ||
58 | |||
59 | return QString( "../" ); | ||
60 | } | ||
61 | #endif | ||
62 | |||
63 | |||
64 | #ifndef QWS | ||
65 | void OpieApplication::showMainDocumentWidget( QWidget* widget, bool nomax) | ||
66 | { | ||
67 | showMainWidget(widget,nomax); | ||
68 | } | ||
69 | #endif | ||
70 | |||
diff --git a/libopie2/opiecore/opieapplication.h b/libopie2/opiecore/opieapplication.h index a864ee9..29e2e9d 100644 --- a/libopie2/opiecore/opieapplication.h +++ b/libopie2/opiecore/opieapplication.h | |||
@@ -4,55 +4,57 @@ | |||
4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> | 4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> |
5 | =. | 5 | =. |
6 | .=l. | 6 | .=l. |
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef OPIE_APPLICATION_H | 31 | #ifndef OPIE_APPLICATION_H |
32 | #define OPIE_APPLICATION_H | 32 | #define OPIE_APPLICATION_H |
33 | 33 | ||
34 | #ifdef QWS | 34 | #ifdef QWS |
35 | #include <qpe/qpeapplication.h> | 35 | #include <qpe/qpeapplication.h> |
36 | #else | 36 | #else |
37 | #include <qapplication.h> | 37 | #include <qapplication.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | class OpieApplication | 40 | class OpieApplication |
41 | #ifdef QWS | 41 | #ifdef QWS |
42 | : public QPEApplication | 42 | : public QPEApplication |
43 | #else | 43 | #else |
44 | : public QApplication | 44 | : public QApplication |
45 | #endif | 45 | #endif |
46 | { | 46 | { |
47 | public: | 47 | public: |
48 | OpieApplication( int& argc, char** argv ); | 48 | OpieApplication( int& argc, char** argv ); |
49 | 49 | ||
50 | #ifndef QWS | 50 | #ifndef QWS |
51 | void showMainWidget( QWidget* widget, bool nomax=false ); | 51 | void showMainWidget( QWidget* widget, bool nomax=false ); |
52 | void showMainDocumentWidget( QWidget* widget, bool nomax=false ); | ||
53 | static QString qpeDir(); | ||
52 | #endif | 54 | #endif |
53 | }; | 55 | }; |
54 | 56 | ||
55 | 57 | ||
56 | #endif | 58 | #endif |
57 | 59 | ||
58 | 60 | ||
diff --git a/libopie2/opiecore/opieconfig.h b/libopie2/opiecore/opieconfig.h index 011ac86..e3eaec0 100644 --- a/libopie2/opiecore/opieconfig.h +++ b/libopie2/opiecore/opieconfig.h | |||
@@ -10,70 +10,71 @@ | |||
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef OPIECONFIG_H | 30 | #ifndef OPIECONFIG_H |
31 | #define OPIECONFIG_H | 31 | #define OPIECONFIG_H |
32 | 32 | ||
33 | 33 | ||
34 | #ifdef QWS | 34 | #ifdef QWS |
35 | #include <qpe/config.h> | 35 | #include <qpe/config.h> |
36 | #else | 36 | #else |
37 | #include <qsettings.h> | 37 | #include <qsettings.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | 40 | ||
41 | class OpieConfig | 41 | class OpieConfig |
42 | #ifdef QWS | 42 | #ifdef QWS |
43 | : public Config | 43 | : public Config |
44 | #else | 44 | #else |
45 | : public QSettings | 45 | : public QSettings |
46 | #endif | 46 | #endif |
47 | { | 47 | { |
48 | 48 | ||
49 | public: | 49 | public: |
50 | #ifndef QWS | 50 | #ifndef QWS |
51 | enum Domain { File, User }; | 51 | enum Domain { File, User }; |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | OpieConfig( const QString&, Domain ); | 54 | OpieConfig( const QString&, Domain ); |
55 | 55 | ||
56 | #ifndef QWS | 56 | #ifndef QWS |
57 | void setGroup( const QString& key); | 57 | void setGroup( const QString& key); |
58 | bool hasKey ( const QString & key ) const; | 58 | bool hasKey ( const QString & key ) const; |
59 | void write() {}; // FIXME: did not find the docu... what shall I do here? | ||
59 | #endif | 60 | #endif |
60 | 61 | ||
61 | /** | 62 | /** |
62 | * @returns the name of the current group. | 63 | * @returns the name of the current group. |
63 | * The current group is used for searching keys and accessing entries. | 64 | * The current group is used for searching keys and accessing entries. |
64 | */ | 65 | */ |
65 | const QString& group() | 66 | const QString& group() |
66 | #ifdef QWS | 67 | #ifdef QWS |
67 | { return git.key(); }; | 68 | { return git.key(); }; |
68 | #else | 69 | #else |
69 | { return group(); }; | 70 | { return group(); }; |
70 | #endif | 71 | #endif |
71 | 72 | ||
72 | #ifndef QWS | 73 | #ifndef QWS |
73 | private: | 74 | private: |
74 | bool hasGroup; | 75 | bool hasGroup; |
75 | #endif | 76 | #endif |
76 | 77 | ||
77 | }; | 78 | }; |
78 | 79 | ||
79 | #endif // OPIECONFIG_H | 80 | #endif // OPIECONFIG_H |
diff --git a/libopie2/opieui/omenubar.cpp b/libopie2/opieui/omenubar.cpp new file mode 100644 index 0000000..bee2815 --- a/dev/null +++ b/libopie2/opieui/omenubar.cpp | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
31 | #include <omenubar.h> | ||
32 | |||
33 | OMenuBar::OMenuBar(QWidget* parent, const char* name) | ||
34 | :OpieMenuBar(parent, name) | ||
35 | { | ||
36 | } | ||
diff --git a/libopie2/opieui/omenubar.h b/libopie2/opieui/omenubar.h new file mode 100644 index 0000000..234885f --- a/dev/null +++ b/libopie2/opieui/omenubar.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
31 | #ifndef OMENUBAR_H | ||
32 | #define OMENUBAR_H | ||
33 | |||
34 | |||
35 | |||
36 | |||
37 | #include "opiemenubar.h" | ||
38 | |||
39 | |||
40 | |||
41 | class OMenuBar : public OpieMenuBar | ||
42 | { | ||
43 | Q_OBJECT | ||
44 | |||
45 | public: | ||
46 | OMenuBar(QWidget* parent = 0, const char* name = 0 ); | ||
47 | }; | ||
48 | |||
49 | #endif // OAPPLICATION_H | ||
diff --git a/libopie2/opieui/omessagebox.h b/libopie2/opieui/omessagebox.h new file mode 100644 index 0000000..1a0f554 --- a/dev/null +++ b/libopie2/opieui/omessagebox.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
31 | #ifndef OMESSAGEBOX_H | ||
32 | #define OMESSAGEBOX_H | ||
33 | |||
34 | |||
35 | |||
36 | #ifdef QWS | ||
37 | #include <qpe/qpemessagebox.h> | ||
38 | #else | ||
39 | #include <qmessagebox.h> | ||
40 | #endif | ||
41 | |||
42 | |||
43 | |||
44 | class OMessageBox | ||
45 | #ifdef QWS | ||
46 | : public QPEMessageBox | ||
47 | #else | ||
48 | : public QMessageBox | ||
49 | #endif | ||
50 | { | ||
51 | }; | ||
52 | |||
53 | #endif // OAPPLICATION_H | ||
diff --git a/libopie2/opieui/opiemenubar.cpp b/libopie2/opieui/opiemenubar.cpp new file mode 100644 index 0000000..98715d7 --- a/dev/null +++ b/libopie2/opieui/opiemenubar.cpp | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
31 | |||
32 | #include "opiemenubar.h" | ||
33 | |||
34 | OpieMenuBar::OpieMenuBar(QWidget* parent, const char* name ) | ||
35 | #ifdef QWS | ||
36 | : QPEMenuBar(parent,name) | ||
37 | #else | ||
38 | : QMenuBar(parent,name) | ||
39 | #endif | ||
40 | { | ||
41 | } | ||
42 | |||
43 | |||
diff --git a/libopie2/opieui/opiemenubar.h b/libopie2/opieui/opiemenubar.h new file mode 100644 index 0000000..ccd72cc --- a/dev/null +++ b/libopie2/opieui/opiemenubar.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
31 | #ifndef OPIE_MENUBAR_H | ||
32 | #define OPIE_MENUBAR_H | ||
33 | |||
34 | #ifdef QWS | ||
35 | #include <qpe/qpemenubar.h> | ||
36 | #else | ||
37 | #include <qmenubar.h> | ||
38 | #endif | ||
39 | |||
40 | class OpieMenuBar | ||
41 | #ifdef QWS | ||
42 | : public QPEMenuBar | ||
43 | #else | ||
44 | : public QMenuBar | ||
45 | #endif | ||
46 | { | ||
47 | public: | ||
48 | OpieMenuBar(QWidget* parent = 0, const char* name = 0); | ||
49 | }; | ||
50 | #endif | ||
51 | |||
52 | |||
diff --git a/libopie2/opieui/opieui.pro b/libopie2/opieui/opieui.pro index 1b6ecdf..68a5c5f 100644 --- a/libopie2/opieui/opieui.pro +++ b/libopie2/opieui/opieui.pro | |||
@@ -1,58 +1,67 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on debug | 2 | CONFIG += qt warn_on debug |
3 | DESTDIR = $(OPIEDIR)/lib | 3 | DESTDIR = $(OPIEDIR)/lib |
4 | HEADERS = ocompletionbox.h \ | 4 | HEADERS = ocompletionbox.h \ |
5 | ocombobox.h \ | 5 | ocombobox.h \ |
6 | oeditlistbox.h \ | 6 | oeditlistbox.h \ |
7 | olineedit.h \ | 7 | olineedit.h \ |
8 | olistview.h \ | 8 | olistview.h \ |
9 | oimageeffect.h \ | 9 | oimageeffect.h \ |
10 | opixmapeffect.h \ | 10 | opixmapeffect.h \ |
11 | opopupmenu.h \ | 11 | opopupmenu.h \ |
12 | opixmapprovider.h \ | 12 | opixmapprovider.h \ |
13 | oselector.h \ | 13 | oselector.h \ |
14 | oversatileview.h \ | 14 | oversatileview.h \ |
15 | oversatileviewitem.h \ | 15 | oversatileviewitem.h \ |
16 | #ojanuswidget.h \ | 16 | #ojanuswidget.h \ |
17 | odialog.h \ | 17 | odialog.h \ |
18 | omenubar.h \ | ||
19 | opiemenubar.h \ | ||
20 | omessagebox.h \ | ||
21 | oresource.h \ | ||
22 | otoolbar.h \ | ||
18 | oseparator.h | 23 | oseparator.h |
19 | # otaskbarapplet.h | 24 | # otaskbarapplet.h |
20 | 25 | ||
21 | SOURCES = ocompletionbox.cpp \ | 26 | SOURCES = ocompletionbox.cpp \ |
22 | ocombobox.cpp \ | 27 | ocombobox.cpp \ |
23 | oeditlistbox.cpp \ | 28 | oeditlistbox.cpp \ |
24 | olineedit.cpp \ | 29 | olineedit.cpp \ |
25 | olistview.cpp \ | 30 | olistview.cpp \ |
26 | oimageeffect.cpp \ | 31 | oimageeffect.cpp \ |
27 | opixmapeffect.cpp \ | 32 | opixmapeffect.cpp \ |
28 | opopupmenu.cpp \ | 33 | opopupmenu.cpp \ |
29 | opixmapprovider.cpp \ | 34 | opixmapprovider.cpp \ |
30 | oselector.cpp \ | 35 | oselector.cpp \ |
31 | oversatileview.cpp \ | 36 | oversatileview.cpp \ |
32 | oversatileviewitem.cpp \ | 37 | oversatileviewitem.cpp \ |
33 | #ojanuswidget.cpp \ | 38 | #ojanuswidget.cpp \ |
34 | odialog.cpp \ | 39 | odialog.cpp \ |
40 | omenubar.cpp \ | ||
41 | opiemenubar.cpp \ | ||
42 | oresource.cpp \ | ||
43 | otoolbar.cpp \ | ||
35 | oseparator.cpp #\ | 44 | oseparator.cpp #\ |
36 | # otaskbarapplet.cpp | 45 | # otaskbarapplet.cpp |
37 | 46 | ||
38 | INTERFACES = | 47 | INTERFACES = |
39 | TARGET = opieui2 | 48 | TARGET = opieui2 |
40 | VERSION = 1.8.1 | 49 | VERSION = 1.8.1 |
41 | INCLUDEPATH += $(OPIEDIR)/include | 50 | INCLUDEPATH += $(OPIEDIR)/include |
42 | DEPENDPATH += $(OPIEDIR)/include | 51 | DEPENDPATH += $(OPIEDIR)/include |
43 | LIBS += -lopiecore2 | 52 | LIBS += -lopiecore2 |
44 | MOC_DIR = moc | 53 | MOC_DIR = moc |
45 | OBJECTS_DIR = obj | 54 | OBJECTS_DIR = obj |
46 | 55 | ||
47 | 56 | ||
48 | !contains( platform, x11 ) { | 57 | !contains( platform, x11 ) { |
49 | include ( $(OPIEDIR)/include.pro ) | 58 | include ( $(OPIEDIR)/include.pro ) |
50 | HEADERS += otaskbarapplet.h | 59 | HEADERS += otaskbarapplet.h |
51 | SOURCES += otaskbarapplet.cpp | 60 | SOURCES += otaskbarapplet.cpp |
52 | } | 61 | } |
53 | 62 | ||
54 | contains( platform, x11 ) { | 63 | contains( platform, x11 ) { |
55 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | 64 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib |
56 | message( Warning: NO otaskbarapplet ATM ) | 65 | message( Warning: NO otaskbarapplet ATM ) |
57 | } | 66 | } |
58 | 67 | ||
diff --git a/libopie2/opieui/oresource.cpp b/libopie2/opieui/oresource.cpp new file mode 100644 index 0000000..d97307f --- a/dev/null +++ b/libopie2/opieui/oresource.cpp | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
31 | #include <opie2/oapplication.h> | ||
32 | #include <opie2/odebug.h> | ||
33 | |||
34 | #include "oresource.h" | ||
35 | |||
36 | |||
37 | #ifdef QWS | ||
38 | namespace Resource | ||
39 | { | ||
40 | |||
41 | QPixmap loadPixmap( const QString& pix ) | ||
42 | { | ||
43 | QString filename; | ||
44 | filename.sprintf( "%s/%s.png", (const char*) oApp->opieDir(), (const char*) pix ); | ||
45 | QPixmap pixmap( filename ); | ||
46 | if ( pixmap.isNull() ) | ||
47 | { | ||
48 | odebug << "libopie2 resource: can't find pixmap " << filename << oendl;; | ||
49 | } | ||
50 | return pixmap; | ||
51 | }; | ||
52 | |||
53 | }; | ||
54 | |||
55 | #endif | ||
56 | |||
57 | |||
58 | |||
diff --git a/libopie2/opieui/oresource.h b/libopie2/opieui/oresource.h new file mode 100644 index 0000000..499d255 --- a/dev/null +++ b/libopie2/opieui/oresource.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> | ||
6 | =. | ||
7 | .=l. | ||
8 | .>+-= | ||
9 | _;:, .> :=|. This program is free software; you can | ||
10 | .> <`_, > . <= redistribute it and/or modify it under | ||
11 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
12 | .="- .-=="i, .._ License as published by the Free Software | ||
13 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
14 | ._= =} : or (at your option) any later version. | ||
15 | .%`+i> _;_. | ||
16 | .i_,=:_. -<s. This program is distributed in the hope that | ||
17 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
18 | : .. .:, . . . without even the implied warranty of | ||
19 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
20 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
21 | ..}^=.= = ; Library General Public License for more | ||
22 | ++= -. .` .: details. | ||
23 | : = ...= . :.=- | ||
24 | -. .:....=;==+<; You should have received a copy of the GNU | ||
25 | -_. . . )=. = Library General Public License along with | ||
26 | -- :-=` this library; see the file COPYING.LIB. | ||
27 | If not, write to the Free Software Foundation, | ||
28 | Inc., 59 Temple Place - Suite 330, | ||
29 | Boston, MA 02111-1307, USA. | ||
30 | */ | ||
31 | |||
32 | #ifndef ORESOURCE_H | ||
33 | #define ORESOURCE_H | ||
34 | |||
35 | #ifdef QWS | ||
36 | #include <qpe/resource.h> | ||
37 | #else | ||
38 | #include <qpixmap.h> | ||
39 | |||
40 | namespace Resource | ||
41 | { | ||
42 | QPixmap loadPixmap( const QString& ); | ||
43 | } | ||
44 | |||
45 | #endif | ||
46 | |||
47 | #endif | ||
48 | |||
49 | |||
diff --git a/libopie2/opieui/otoolbar.cpp b/libopie2/opieui/otoolbar.cpp new file mode 100644 index 0000000..c7f2727 --- a/dev/null +++ b/libopie2/opieui/otoolbar.cpp | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
31 | #include "otoolbar.h" | ||
32 | |||
33 | OToolBar::OToolBar( QMainWindow *parent, const char* name) | ||
34 | #ifdef QWS | ||
35 | : QPEToolBar(parent, name) | ||
36 | #else | ||
37 | : QToolBar(parent, name) | ||
38 | #endif | ||
39 | { | ||
40 | |||
41 | } | ||
diff --git a/libopie2/opieui/otoolbar.h b/libopie2/opieui/otoolbar.h new file mode 100644 index 0000000..e16d8df --- a/dev/null +++ b/libopie2/opieui/otoolbar.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
31 | #ifndef OTOOLBAR_H | ||
32 | #define OTOOLBAR_H | ||
33 | |||
34 | |||
35 | |||
36 | #ifdef QWS | ||
37 | #include <qpe/qpetoolbar.h> | ||
38 | #else | ||
39 | #include <qtoolbar.h> | ||
40 | #endif | ||
41 | |||
42 | |||
43 | |||
44 | class OToolBar | ||
45 | #ifdef QWS | ||
46 | : public QPEToolBar | ||
47 | #else | ||
48 | : public QToolBar | ||
49 | #endif | ||
50 | { | ||
51 | public: | ||
52 | OToolBar( QMainWindow *parent=0, const char* name = 0); | ||
53 | }; | ||
54 | |||
55 | #endif // OAPPLICATION_H | ||