Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

oglobal.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the Opie Project
00003                              Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de>
00004               =.             Copyright (C) 2004 Holger 'zecke' Freyther <zecke@handhelds.org>
00005             .=l.
00006            .>+-=
00007  _;:,     .>    :=|.         This program is free software; you can
00008 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00009 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00010 .="- .-=="i,     .._         License as published by the Free Software
00011  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00012      ._= =}       :          or (at your option) any later version.
00013     .%`+i>       _;_.
00014     .i_,=:_.      -<s.       This program is distributed in the hope that
00015      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00016     : ..    .:,     . . .    without even the implied warranty of
00017     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00018   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00019 ..}^=.=       =       ;      Library General Public License for more
00020 ++=   -.     .`     .:       details.
00021  :     =  ...= . :.=-
00022  -.   .:....=;==+<;          You should have received a copy of the GNU
00023   -_. . .   )=.  =           Library General Public License along with
00024     --        :-=`           this library; see the file COPYING.LIB.
00025                              If not, write to the Free Software Foundation,
00026                              Inc., 59 Temple Place - Suite 330,
00027                              Boston, MA 02111-1307, USA.
00028 */
00029 
00030 #ifndef OGLOBAL_H
00031 #define OGLOBAL_H
00032 
00033 
00034 #include <opie2/oconfig.h>
00035 
00036 #ifndef private
00037 #define HACK_DEFINED
00038 #define private protected
00039 #endif
00040 #include <qpe/global.h>
00041 #ifdef HACK_DEFINED
00042 #undef private
00043 #endif
00044 
00045 #include <sys/types.h>
00046 
00047 //FIXME Is it wise or even necessary to inherit OGlobal from Global?
00048 //      once we totally skip libqpe it should ideally swallow Global -zecke
00049 //      You're right. I deleted global as the base class. -mickeyl
00050 
00051 
00052 class QFile;
00053 class QString;
00054 class DateFormat;
00055 
00056 
00057 
00058 namespace Opie {
00059 namespace Core {
00072 class OGlobal : public Global
00073 {
00074 public:
00075 
00076     //  how do they relate to our Document Idea
00081     static bool isAppLnkFileName( const QString& str );
00082     static bool isDocumentFileName( const QString& file );
00084 
00094     static QString tempDirPath();
00100     static QString homeDirPath();
00101     static QString tempFileName( const QString& );
00102     static bool renameFile( const QString& from, const QString& to );
00103     static bool truncateFile( QFile &f, off_t size );
00105 
00106 
00107     static QString generateUuid();
00108 
00113     static QByteArray encodeBase64(const QByteArray&, bool insertLF = false );
00114     static QByteArray decodeBase64(const QByteArray& );
00116 
00117     //FIXME Do we want to put that into OApplication as in KApplication? -zecke
00118     //      We already have a per-application config in OApplication
00119     //      ( accessed through oApp->config() ), but this one is the global one! -mickeyl
00124     static OConfig* config();
00125     static OConfig* qpe_config();
00126     static QString ownerName();
00127     static bool weekStartsOnMonday();
00128     static bool useAMPM();
00129 #ifdef ODP
00130 #error "Fix dateFormat"
00131 
00137 #endif
00138     static DateFormat dateFormat();
00139     static void setDateFormat( const DateFormat& );
00140 
00141 
00142     static void setWeekStartsOnMonday( bool );
00143     static void setUseAMPM( bool );
00145 
00147     static Global::Command* builtinCommands();
00148     static QGuardedPtr<QWidget>* builtinRunning();
00150 
00151 private:
00152     static void clean_up();
00153     static OConfig* _config;
00154     static OConfig* _qpe_config;
00155     class Private;
00156     Private *d;
00157 };
00158 }
00159 }
00160 #endif // OGLOBAL_H

Generated on Sat Nov 5 16:16:08 2005 for OPIE by  doxygen 1.4.2