-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 | |||
@@ -93,4 +93,9 @@ class OApplication : public OpieApplication | |||
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(); |
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 | |||
@@ -29,4 +29,5 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <opie2/odebug.h> | ||
31 | 32 | ||
32 | #include "opieapplication.h" | 33 | #include "opieapplication.h" |
@@ -43,6 +44,27 @@ OpieApplication::OpieApplication( int& argc, char** argv) | |||
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 | |||
@@ -50,4 +50,6 @@ class OpieApplication | |||
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 | }; |
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 | |||
@@ -56,5 +56,6 @@ class OpieConfig | |||
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 | ||