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

opie.cpp

Go to the documentation of this file.
00001 #include <stdlib.h>
00002 
00003 #include <qdir.h>
00004 
00005 #include "opie.h"
00006 
00007 OPIE* OPIE::m_self = 0;
00008 
00009 
00010 OPIE::OPIE() {
00011 }
00012 OPIE::~OPIE() {
00013 }
00014 OPIE* OPIE::self() {
00015     if (!m_self ) m_self = new OPIE;
00016     return m_self;
00017 }
00018 QStringList OPIE::languageList( const QString& _opieDir )const {
00019 #if 0
00020     return QStringList::split(':',QString(::getenv("OPIE_CREATE_LANGS")));
00021 #else
00022     QString opieDi = opieDir( _opieDir );
00023     QStringList langs;
00024     QDir dir( opieDi + "/i18n/");
00025     if (!dir.exists() ) return langs;
00026     langs = dir.entryList( QDir::Dirs );
00027 
00028     langs.remove("CVS"); // hey this no language
00029     langs.remove("unmaintained"); // remove this one too
00030     langs.remove(".");
00031     langs.remove("..");
00032 
00033 
00034 
00035     return langs;
00036 #endif    
00037 }
00038 QString OPIE::opieDir( const QString& _opieDir ) const{
00039     if (!_opieDir.isEmpty() ) return _opieDir;
00040     char* dir = ::getenv("OPIEDIR");
00041     if (!dir ) return QString::null;
00042     return QString::fromLatin1(dir);
00043 }

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