author | tille <tille> | 2003-09-03 15:49:02 (UTC) |
---|---|---|
committer | tille <tille> | 2003-09-03 15:49:02 (UTC) |
commit | 9bcca67b731d0cf3c10092ec31234d5d03cef5cd (patch) (side-by-side diff) | |
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 * to the application name given in the constructor. * * @param title the title. If not given, resets caption to appname */ virtual void setTitle( const QString& title = QString::null ) const; + /** + * see qpeDir() + */ + static QString opieDir() {return qpeDir();}; + protected: void init(); private: const QCString _appname; 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 @@ -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <opie2/odebug.h> #include "opieapplication.h" OpieApplication::OpieApplication( int& argc, char** argv) #ifdef QWS : QPEApplication(argc,argv) @@ -39,10 +40,31 @@ OpieApplication::OpieApplication( int& argc, char** argv) #endif {}; #ifndef QWS void OpieApplication::showMainWidget( QWidget* widget, bool nomax ) { + if (nomax) odebug << "ignoring nomax"; setMainWidget( widget ); widget->show(); }; #endif + +#ifndef QWS +QString OpieApplication::qpeDir() +{ + const char * base = getenv( "OPIEDIR" ); + if ( base ) + return QString( base ) + "/"; + + return QString( "../" ); +} +#endif + + +#ifndef QWS +void OpieApplication::showMainDocumentWidget( QWidget* widget, bool nomax) +{ + showMainWidget(widget,nomax); +} +#endif + 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 { public: OpieApplication( int& argc, char** argv ); #ifndef QWS void showMainWidget( QWidget* widget, bool nomax=false ); + void showMainDocumentWidget( QWidget* widget, bool nomax=false ); + static QString qpeDir(); #endif }; #endif 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 #endif OpieConfig( const QString&, Domain ); #ifndef QWS void setGroup( const QString& key); - bool hasKey ( const QString & key ) const; + bool hasKey ( const QString & key ) const; + void write() {}; // FIXME: did not find the docu... what shall I do here? #endif /** * @returns the name of the current group. * The current group is used for searching keys and accessing entries. */ |