diff options
Diffstat (limited to 'src/kvilib/ext/kvi_config.h')
-rw-r--r-- | src/kvilib/ext/kvi_config.h | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/src/kvilib/ext/kvi_config.h b/src/kvilib/ext/kvi_config.h index 6eef4e05..46924418 100644 --- a/src/kvilib/ext/kvi_config.h +++ b/src/kvilib/ext/kvi_config.h @@ -31,35 +31,35 @@ #include "kvi_pointerhashtable.h" #include "kvi_valuelist.h" -#include <qcolor.h> -#include <qfont.h> -#include <qrect.h> -#include <qstringlist.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqrect.h> +#include <tqstringlist.h> #define KVI_CONFIG_DEFAULT_GROUP "KVIrc" class KviPixmap; class KviMsgType; -typedef KviPointerHashTable<QString,QString> KviConfigGroup; -typedef KviPointerHashTableIterator<QString,QString> KviConfigGroupIterator; -typedef KviPointerHashTableIterator<QString,KviConfigGroup> KviConfigIterator; +typedef KviPointerHashTable<TQString,TQString> KviConfigGroup; +typedef KviPointerHashTableIterator<TQString,TQString> KviConfigGroupIterator; +typedef KviPointerHashTableIterator<TQString,KviConfigGroup> KviConfigIterator; class KVILIB_API KviConfig : public KviHeapObject { public: enum FileMode { Read = 1 , Write = 2 , ReadWrite = 3 }; public: - KviConfig(const QString &filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); + KviConfig(const TQString &filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); KviConfig(const char *filename,FileMode f/* = ReadWrite*/,bool bLocal8Bit = false); ~KviConfig(); private: bool m_bLocal8Bit; - KviPointerHashTable<QString,KviConfigGroup> * m_pDict; - QString m_szFileName; + KviPointerHashTable<TQString,KviConfigGroup> * m_pDict; + TQString m_szFileName; bool m_bDirty; - QString m_szStrBuffer; - QString m_szGroup; + TQString m_szStrBuffer; + TQString m_szGroup; bool m_bPreserveEmptyGroups; bool m_bReadOnly; private: @@ -79,7 +79,7 @@ public: // as modified). // void preserveEmptyGroups(bool bPreserve){ m_bPreserveEmptyGroups = bPreserve; }; - const QString & fileName(){ return m_szFileName; }; + const TQString & fileName(){ return m_szFileName; }; bool readOnly(){ return m_bReadOnly; }; void setReadOnly(bool bReadOnly){ m_bReadOnly = bReadOnly; }; bool dirty(){ return m_bDirty; }; @@ -88,65 +88,65 @@ public: // In this way you can load a system-wide read-only config file // as default configuration, alter its settings and save it to the // user local configuration directory - void setSavePath(const QString & savePath){ m_szFileName = savePath; }; - KviPointerHashTable<QString,KviConfigGroup> *dict(){ return m_pDict; }; + void setSavePath(const TQString & savePath){ m_szFileName = savePath; }; + KviPointerHashTable<TQString,KviConfigGroup> *dict(){ return m_pDict; }; void clearDirtyFlag(){ m_bDirty = false; }; void clear(); - void clearGroup(const QString & szGroup); - void clearKey(const QString & szKey); + void clearGroup(const TQString & szGroup); + void clearKey(const TQString & szKey); unsigned int groupsCount(){ return m_pDict->count(); }; bool sync(){ return save(); }; - bool hasKey(const QString & szKey); - bool hasGroup(const QString & szGroup); - void setGroup(const QString & szGroup); + bool hasKey(const TQString & szKey); + bool hasGroup(const TQString & szGroup); + void setGroup(const TQString & szGroup); //void getContentsString(KviStr &buffer); - const QString & group(){ return m_szGroup; }; - void writeEntry(const QString & szKey,const QString & szValue); - void writeEntry(const QString & szKey,const char * szValue) - { writeEntry(szKey,QString::fromUtf8(szValue)); }; - QString readEntry(const QString & szKey,const QString & szDefault = QString::null); + const TQString & group(){ return m_szGroup; }; + void writeEntry(const TQString & szKey,const TQString & szValue); + void writeEntry(const TQString & szKey,const char * szValue) + { writeEntry(szKey,TQString::fromUtf8(szValue)); }; + TQString readEntry(const TQString & szKey,const TQString & szDefault = TQString()); // HACK for KviOptions.. (FIXME) - QString readKviStrEntry(const QString &szKey,const KviStr &szDefault) + TQString readKviStrEntry(const TQString &szKey,const KviStr &szDefault) { return readEntry(szKey,szDefault.ptr()); }; //void writeEntry(const char *szKey,KviStr &szValue); //const char * readEntry(const char *szKey,KviStr &szDefault); - void writeEntry(const QString & szKey,const KviPixmap &pixmap); - KviPixmap readPixmapEntry(const QString & szKey,const KviPixmap &pixDef); - void writeEntry(const QString & szKey,const KviMsgType &msg); - KviMsgType readMsgTypeEntry(const QString & szKey,const KviMsgType &msgDef); - void writeEntry(const QString & szKey,const QColor &clr); - QColor readColorEntry(const QString & szKey,const QColor &clr); - void writeEntry(const QString & szKey,QFont &fnt); - QFont readFontEntry(const QString & szKey,const QFont &fnt); - void writeEntry(const QString & szKey,bool bTrue); - bool readBoolEntry(const QString & szKey,bool bTrue); - QRect readRectEntry(const QString & szKey,const QRect &rct); - void writeEntry(const QString & szKey,const QRect &rct); - QStringList readStringListEntry(const QString & szKey,const QStringList &list); - void writeEntry(const QString & szKey,const QStringList &list); - KviValueList<int> readIntListEntry(const QString & ,const KviValueList<int> &list); - void writeEntry(const QString & szKey,const KviValueList<int> &list); - QString readQStringEntry(const QString & szKey,const QString &szDefault = QString::null) + void writeEntry(const TQString & szKey,const KviPixmap &pixmap); + KviPixmap readPixmapEntry(const TQString & szKey,const KviPixmap &pixDef); + void writeEntry(const TQString & szKey,const KviMsgType &msg); + KviMsgType readMsgTypeEntry(const TQString & szKey,const KviMsgType &msgDef); + void writeEntry(const TQString & szKey,const TQColor &clr); + TQColor readColorEntry(const TQString & szKey,const TQColor &clr); + void writeEntry(const TQString & szKey,TQFont &fnt); + TQFont readFontEntry(const TQString & szKey,const TQFont &fnt); + void writeEntry(const TQString & szKey,bool bTrue); + bool readBoolEntry(const TQString & szKey,bool bTrue); + TQRect readRectEntry(const TQString & szKey,const TQRect &rct); + void writeEntry(const TQString & szKey,const TQRect &rct); + TQStringList readStringListEntry(const TQString & szKey,const TQStringList &list); + void writeEntry(const TQString & szKey,const TQStringList &list); + KviValueList<int> readIntListEntry(const TQString & ,const KviValueList<int> &list); + void writeEntry(const TQString & szKey,const KviValueList<int> &list); + TQString readTQStringEntry(const TQString & szKey,const TQString &szDefault = TQString()) { return readEntry(szKey,szDefault); }; - //void writeEntry(const QString & szKey,const QString &szValue); + //void writeEntry(const TQString & szKey,const TQString &szValue); //void writeEntry(const char *szKey,unsigned long lValue); //unsigned long readULongEntry(const char *szKey,unsigned long lDefault); //void writeEntry(const char *szKey,long lValue); //long readLongEntry(const char *szKey,long lDefault); - void writeEntry(const QString & szKey,int iValue); - int readIntEntry(const QString & szKey,int iDefault); - void writeEntry(const QString & szKey,unsigned short int usValue); - unsigned short int readUShortEntry(const QString & szKey,unsigned short int usDefault); - void writeEntry(const QString & szKey,unsigned int iValue); - unsigned int readUIntEntry(const QString & szKey,unsigned int iDefault); - void writeEntry(const QString & szKey,char iValue); - char readCharEntry(const QString & szKey,char iDefault); - void writeEntry(const QString & szKey,unsigned char iValue); - unsigned char readUCharEntry(const QString & szKey,unsigned char iDefault); + void writeEntry(const TQString & szKey,int iValue); + int readIntEntry(const TQString & szKey,int iDefault); + void writeEntry(const TQString & szKey,unsigned short int usValue); + unsigned short int readUShortEntry(const TQString & szKey,unsigned short int usDefault); + void writeEntry(const TQString & szKey,unsigned int iValue); + unsigned int readUIntEntry(const TQString & szKey,unsigned int iDefault); + void writeEntry(const TQString & szKey,char iValue); + char readCharEntry(const TQString & szKey,char iDefault); + void writeEntry(const TQString & szKey,unsigned char iValue); + unsigned char readUCharEntry(const TQString & szKey,unsigned char iDefault); - static void getFontProperties(KviStr & buffer,QFont *fnt); - static void setFontProperties(KviStr & str,QFont *fnt); + static void getFontProperties(KviStr & buffer,TQFont *fnt); + static void setFontProperties(KviStr & str,TQFont *fnt); #ifdef COMPILE_ON_WINDOWS // On windows we need to override new and delete operators |