summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/opieapplication.cpp70
-rw-r--r--libopie2/opiecore/opieapplication.h60
-rw-r--r--libopie2/opiecore/opieconfig.cpp69
-rw-r--r--libopie2/opiecore/opieconfig.h80
4 files changed, 0 insertions, 279 deletions
diff --git a/libopie2/opiecore/opieapplication.cpp b/libopie2/opiecore/opieapplication.cpp
deleted file mode 100644
index ae27b25..0000000
--- a/libopie2/opiecore/opieapplication.cpp
+++ b/dev/null
@@ -1,70 +0,0 @@
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/odebug.h>
32
33#include "opieapplication.h"
34
35OpieApplication::OpieApplication( int& argc, char** argv)
36#ifdef QWS
37 : QPEApplication(argc,argv)
38#else
39 : QApplication(argc,argv)
40#endif
41{};
42
43#ifndef QWS
44void OpieApplication::showMainWidget( QWidget* widget, bool nomax )
45{
46 if (nomax) odebug << "ignoring nomax";
47 setMainWidget( widget );
48 widget->show();
49};
50#endif
51
52#ifndef QWS
53QString 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
65void 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
deleted file mode 100644
index 29e2e9d..0000000
--- a/libopie2/opiecore/opieapplication.h
+++ b/dev/null
@@ -1,60 +0,0 @@
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_APPLICATION_H
32#define OPIE_APPLICATION_H
33
34#ifdef QWS
35#include <qpe/qpeapplication.h>
36#else
37#include <qapplication.h>
38#endif
39
40class OpieApplication
41#ifdef QWS
42: public QPEApplication
43#else
44: public QApplication
45#endif
46{
47 public:
48 OpieApplication( int& argc, char** argv );
49
50#ifndef QWS
51 void showMainWidget( QWidget* widget, bool nomax=false );
52 void showMainDocumentWidget( QWidget* widget, bool nomax=false );
53 static QString qpeDir();
54#endif
55};
56
57
58#endif
59
60
diff --git a/libopie2/opiecore/opieconfig.cpp b/libopie2/opiecore/opieconfig.cpp
deleted file mode 100644
index ac65977..0000000
--- a/libopie2/opiecore/opieconfig.cpp
+++ b/dev/null
@@ -1,69 +0,0 @@
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 "opieconfig.h"
33
34OpieConfig::OpieConfig( const QString &name, Domain domain )
35#ifdef QWS
36 :Config( name, domain )
37{
38#else
39 :QSettings(Native), hasGroup(false)
40{
41 Scope s;
42 switch (domain) {
43 case File: s = QSettings::Global;
44 break;
45 case User: s = QSettings::User;
46 break;
47 }
48 setPath("libopie2", name, s );
49#endif
50}
51
52
53#ifndef QWS
54
55void OpieConfig::setGroup( const QString& key)
56{
57 if (hasGroup) endGroup();
58 hasGroup = true;
59 beginGroup( key );
60};
61
62bool OpieConfig::hasKey ( const QString & key ) const
63{
64 bool *ok;
65 readEntry( key, QString::null, ok );
66 return *ok;
67};
68#endif
69
diff --git a/libopie2/opiecore/opieconfig.h b/libopie2/opiecore/opieconfig.h
deleted file mode 100644
index e3eaec0..0000000
--- a/libopie2/opiecore/opieconfig.h
+++ b/dev/null
@@ -1,80 +0,0 @@
1/*
2                 This file is part of the Opie Project
3
4 (C) 2003 Patrick S. Vogt
5 .=l.
6           .>+-=
7 _;:,     .>    :=|. This program is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
10.="- .-=="i,     .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version.
13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This program is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.=       =       ; Library General Public License for more
20++=   -.     .`     .: details.
21 :     =  ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28*/
29
30#ifndef OPIECONFIG_H
31#define OPIECONFIG_H
32
33
34#ifdef QWS
35#include <qpe/config.h>
36#else
37#include <qsettings.h>
38#endif
39
40
41class OpieConfig
42#ifdef QWS
43 : public Config
44#else
45: public QSettings
46#endif
47{
48
49 public:
50#ifndef QWS
51 enum Domain { File, User };
52#endif
53
54 OpieConfig( const QString&, Domain );
55
56#ifndef QWS
57 void setGroup( const QString& key);
58 bool hasKey ( const QString & key ) const;
59 void write() {}; // FIXME: did not find the docu... what shall I do here?
60#endif
61
62 /**
63 * @returns the name of the current group.
64 * The current group is used for searching keys and accessing entries.
65 */
66 const QString& group()
67#ifdef QWS
68 { return git.key(); };
69#else
70 { return group(); };
71#endif
72
73#ifndef QWS
74 private:
75 bool hasGroup;
76#endif
77
78};
79
80#endif // OPIECONFIG_H