author | tille <tille> | 2003-09-03 15:49:02 (UTC) |
---|---|---|
committer | tille <tille> | 2003-09-03 15:49:02 (UTC) |
commit | 9bcca67b731d0cf3c10092ec31234d5d03cef5cd (patch) (unidiff) | |
tree | 5f19d096cf0def032215201f725594f46436a850 /libopie2/opiecore | |
parent | fa6baf2326a520cde75f1178bab51c9fc3f6cec3 (diff) | |
download | opie-9bcca67b731d0cf3c10092ec31234d5d03cef5cd.zip opie-9bcca67b731d0cf3c10092ec31234d5d03cef5cd.tar.gz opie-9bcca67b731d0cf3c10092ec31234d5d03cef5cd.tar.bz2 |
more compatibility stuff
-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 |
4 files changed, 31 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 | |||
@@ -89,12 +89,17 @@ class OApplication : public OpieApplication | |||
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; |
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 | |||
@@ -25,12 +25,13 @@ | |||
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) |
@@ -39,10 +40,31 @@ OpieApplication::OpieApplication( int& argc, char** 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 | |||
@@ -46,12 +46,14 @@ class OpieApplication | |||
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 | ||
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 | |||
@@ -52,13 +52,14 @@ class OpieConfig | |||
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 | */ |