-rw-r--r-- | libopie2/opiecore/oapplication.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/oapplication.h | 6 | ||||
-rw-r--r-- | libopie2/opiecore/oglobal.h | 3 | ||||
-rw-r--r-- | libopie2/opiecore/oglobalsettings.h | 7 |
4 files changed, 14 insertions, 4 deletions
diff --git a/libopie2/opiecore/oapplication.cpp b/libopie2/opiecore/oapplication.cpp index d3e04ba..ce26420 100644 --- a/libopie2/opiecore/oapplication.cpp +++ b/libopie2/opiecore/oapplication.cpp | |||
@@ -106,17 +106,17 @@ void OApplication::showMainWidget( QWidget* widget, bool nomax ) | |||
106 | #else | 106 | #else |
107 | QApplication::setMainWidget( widget ); | 107 | QApplication::setMainWidget( widget ); |
108 | widget->show(); | 108 | widget->show(); |
109 | #endif | 109 | #endif |
110 | widget->setCaption( _appname ); | 110 | widget->setCaption( _appname ); |
111 | } | 111 | } |
112 | 112 | ||
113 | 113 | ||
114 | void OApplication::setTitle( QString title ) const | 114 | void OApplication::setTitle( const QString& title ) const |
115 | { | 115 | { |
116 | if ( mainWidget() ) | 116 | if ( mainWidget() ) |
117 | { | 117 | { |
118 | if ( !title.isNull() ) | 118 | if ( !title.isNull() ) |
119 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); | 119 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); |
120 | else | 120 | else |
121 | mainWidget()->setCaption( _appname ); | 121 | mainWidget()->setCaption( _appname ); |
122 | } | 122 | } |
diff --git a/libopie2/opiecore/oapplication.h b/libopie2/opiecore/oapplication.h index 4d25202..8326847 100644 --- a/libopie2/opiecore/oapplication.h +++ b/libopie2/opiecore/oapplication.h | |||
@@ -28,29 +28,33 @@ | |||
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef OAPPLICATION_H | 31 | #ifndef OAPPLICATION_H |
32 | #define OAPPLICATION_H | 32 | #define OAPPLICATION_H |
33 | 33 | ||
34 | #define oApp OApplication::oApplication() | 34 | #define oApp OApplication::oApplication() |
35 | 35 | ||
36 | // the below stuff will fail with moc because moc does not pre process headers | ||
37 | // This will make usage of signal and slots hard inside QPEApplication -zecke | ||
38 | |||
36 | #ifdef QWS | 39 | #ifdef QWS |
37 | #include <qpe/qpeapplication.h> | 40 | #include <qpe/qpeapplication.h> |
38 | #define OApplicationBaseClass QPEApplication | 41 | #define OApplicationBaseClass QPEApplication |
39 | #else | 42 | #else |
40 | #include <qapplication.h> | 43 | #include <qapplication.h> |
41 | #define OApplicationBaseClass QApplication | 44 | #define OApplicationBaseClass QApplication |
42 | #endif | 45 | #endif |
43 | 46 | ||
44 | class OApplicationPrivate; | 47 | class OApplicationPrivate; |
45 | class OConfig; | 48 | class OConfig; |
46 | 49 | ||
47 | class OApplication: public OApplicationBaseClass | 50 | class OApplication: public OApplicationBaseClass |
48 | { | 51 | { |
52 | // Q_OBJECT would fail -zecke | ||
49 | public: | 53 | public: |
50 | 54 | ||
51 | /** | 55 | /** |
52 | * Constructor. Parses command-line arguments and sets the window caption. | 56 | * Constructor. Parses command-line arguments and sets the window caption. |
53 | * | 57 | * |
54 | * @param rAppName application name. Will be used for finding the | 58 | * @param rAppName application name. Will be used for finding the |
55 | * associated message, icon and configuration files | 59 | * associated message, icon and configuration files |
56 | * | 60 | * |
@@ -109,17 +113,17 @@ class OApplication: public OApplicationBaseClass | |||
109 | virtual void showMainWidget( QWidget* widget, bool nomax = false ); | 113 | virtual void showMainWidget( QWidget* widget, bool nomax = false ); |
110 | 114 | ||
111 | /** | 115 | /** |
112 | * Set the application title. The application title will be concatenated | 116 | * Set the application title. The application title will be concatenated |
113 | * to the application name given in the constructor. | 117 | * to the application name given in the constructor. |
114 | * | 118 | * |
115 | * @param title the title. If not given, resets caption to appname | 119 | * @param title the title. If not given, resets caption to appname |
116 | */ | 120 | */ |
117 | virtual void setTitle( QString title = QString::null ) const; | 121 | virtual void setTitle( const QString& title = QString::null ) const; |
118 | //virtual void setTitle() const; | 122 | //virtual void setTitle() const; |
119 | 123 | ||
120 | protected: | 124 | protected: |
121 | void init(); | 125 | void init(); |
122 | 126 | ||
123 | private: | 127 | private: |
124 | const QCString _appname; | 128 | const QCString _appname; |
125 | static OApplication* _instance; | 129 | static OApplication* _instance; |
diff --git a/libopie2/opiecore/oglobal.h b/libopie2/opiecore/oglobal.h index 8345c6a..34f211e 100644 --- a/libopie2/opiecore/oglobal.h +++ b/libopie2/opiecore/oglobal.h | |||
@@ -32,17 +32,18 @@ | |||
32 | #define OGLOBAL_H | 32 | #define OGLOBAL_H |
33 | 33 | ||
34 | #include <qpe/global.h> | 34 | #include <qpe/global.h> |
35 | #include <opie2/oconfig.h> | 35 | #include <opie2/oconfig.h> |
36 | 36 | ||
37 | static OConfig globalconfig = OConfig( "global" ); | 37 | static OConfig globalconfig = OConfig( "global" ); |
38 | 38 | ||
39 | //FIXME: Is it wise or even necessary to inherit OGlobal from Global? | 39 | //FIXME: Is it wise or even necessary to inherit OGlobal from Global? |
40 | // once we totally skip libqpe it should ideally swallow Global -zecke | ||
40 | 41 | ||
41 | class OGlobal : public Global | 42 | class OGlobal : public Global |
42 | { | 43 | { |
43 | public: | 44 | public: |
44 | 45 | // do we want to put that into OApplication as in KApplication -zecke | |
45 | static OConfig* config(); | 46 | static OConfig* config(); |
46 | }; | 47 | }; |
47 | 48 | ||
48 | #endif // OGLOBAL_H | 49 | #endif // OGLOBAL_H |
diff --git a/libopie2/opiecore/oglobalsettings.h b/libopie2/opiecore/oglobalsettings.h index 6481251..d3f357e 100644 --- a/libopie2/opiecore/oglobalsettings.h +++ b/libopie2/opiecore/oglobalsettings.h | |||
@@ -42,16 +42,17 @@ | |||
42 | #define OPIE_DEFAULT_CHANGECURSOR true | 42 | #define OPIE_DEFAULT_CHANGECURSOR true |
43 | #define OPIE_DEFAULT_LARGE_CURSOR false | 43 | #define OPIE_DEFAULT_LARGE_CURSOR false |
44 | #define OPIE_DEFAULT_VISUAL_ACTIVATE true | 44 | #define OPIE_DEFAULT_VISUAL_ACTIVATE true |
45 | #define OPIE_DEFAULT_VISUAL_ACTIVATE_SPEED 50 | 45 | #define OPIE_DEFAULT_VISUAL_ACTIVATE_SPEED 50 |
46 | 46 | ||
47 | //FIXME: There's still a whole lot of stuff in here which has to be revised | 47 | //FIXME: There's still a whole lot of stuff in here which has to be revised |
48 | //FIXME: before public usage... lack of time to do it at once - so it will | 48 | //FIXME: before public usage... lack of time to do it at once - so it will |
49 | //FIXME: happen step-by-step. ML. | 49 | //FIXME: happen step-by-step. ML. |
50 | // we should not habe too much configure options!!!!!! -zecke | ||
50 | 51 | ||
51 | /** | 52 | /** |
52 | * Access the OPIE global configuration settings. | 53 | * Access the OPIE global configuration settings. |
53 | * | 54 | * |
54 | */ | 55 | */ |
55 | class OGlobalSettings | 56 | class OGlobalSettings |
56 | { | 57 | { |
57 | public: | 58 | public: |
@@ -94,31 +95,33 @@ class OGlobalSettings | |||
94 | * d->dragCopy(); | 95 | * d->dragCopy(); |
95 | * } | 96 | * } |
96 | * } | 97 | * } |
97 | * } | 98 | * } |
98 | * </pre> | 99 | * </pre> |
99 | * | 100 | * |
100 | */ | 101 | */ |
101 | 102 | ||
103 | // we do not support DND at the momemt -zecke | ||
102 | static int dndEventDelay(); | 104 | static int dndEventDelay(); |
103 | 105 | ||
104 | /** | 106 | /** |
105 | * Returns whether OPIE runs in single (default) or double click | 107 | * Returns whether OPIE runs in single (default) or double click |
106 | * mode. | 108 | * mode. |
107 | * | 109 | * |
108 | * @return @p true if single click mode, or @p false if double click mode. | 110 | * @return @p true if single click mode, or @p false if double click mode. |
109 | * | 111 | * |
110 | * see @ref http://opie.handhelds.org/documentation/standards/opie/style/mouse/index.html | 112 | * see @ref http://opie.handhelds.org/documentation/standards/opie/style/mouse/index.html |
111 | **/ | 113 | **/ |
112 | static bool singleClick(); | 114 | static bool singleClick(); |
113 | 115 | ||
114 | /** | 116 | /** |
115 | * Returns whether tear-off handles are inserted in OPopupMenus. | 117 | * Returns whether tear-off handles are inserted in OPopupMenus. |
116 | **/ | 118 | **/ |
119 | // would clutter the small screen -zecke | ||
117 | static bool insertTearOffHandle(); | 120 | static bool insertTearOffHandle(); |
118 | 121 | ||
119 | /** | 122 | /** |
120 | * @return the OPIE setting for "change cursor over icon" | 123 | * @return the OPIE setting for "change cursor over icon" |
121 | */ | 124 | */ |
122 | static bool changeCursorOverIcon(); | 125 | static bool changeCursorOverIcon(); |
123 | 126 | ||
124 | /** | 127 | /** |
@@ -246,26 +249,28 @@ class OGlobalSettings | |||
246 | /** | 249 | /** |
247 | * This returns the current mouse settings. | 250 | * This returns the current mouse settings. |
248 | */ | 251 | */ |
249 | static OMouseSettings & mouseSettings(); | 252 | static OMouseSettings & mouseSettings(); |
250 | 253 | ||
251 | /** | 254 | /** |
252 | * The path to the desktop directory of the current user. | 255 | * The path to the desktop directory of the current user. |
253 | */ | 256 | */ |
257 | // below handled by Global stuff and QPEApplication | ||
254 | static QString desktopPath() { initStatic(); return *s_desktopPath; } | 258 | static QString desktopPath() { initStatic(); return *s_desktopPath; } |
255 | 259 | ||
256 | /** | 260 | /** |
257 | * The path to the autostart directory of the current user. | 261 | * The path to the autostart directory of the current user. |
258 | */ | 262 | */ |
259 | static QString autostartPath() { initStatic(); return *s_autostartPath; } | 263 | static QString autostartPath() { initStatic(); return *s_autostartPath; } |
260 | 264 | ||
261 | /** | 265 | /** |
262 | * The path to the trash directory of the current user. | 266 | * The path to the trash directory of the current user. |
263 | */ | 267 | */ |
268 | // we do not have that concept -zecke | ||
264 | static QString trashPath() { initStatic(); return *s_trashPath; } | 269 | static QString trashPath() { initStatic(); return *s_trashPath; } |
265 | 270 | ||
266 | /** | 271 | /** |
267 | * The path where documents are stored of the current user. | 272 | * The path where documents are stored of the current user. |
268 | */ | 273 | */ |
269 | static QString documentPath() { initStatic(); return *s_documentPath; } | 274 | static QString documentPath() { initStatic(); return *s_documentPath; } |
270 | 275 | ||
271 | 276 | ||