1 #ifndef _KVI_CONFIG_H_INCLUDED_
2 #define _KVI_CONFIG_H_INCLUDED_
37 #include <QStringList>
39 #define KVI_CONFIG_DEFAULT_GROUP "KVIrc"
91 const QString &
fileName() {
return m_szFileName; };
93 void setReadOnly(
bool bReadOnly) { m_bReadOnly = bReadOnly; };
94 bool dirty() {
return m_bDirty; };
95 bool ensureWritable();
101 void setSavePath(
const QString & savePath) { m_szFileName = savePath; };
106 void clearGroup(
const QString & szGroup);
107 void clearKey(
const QString & szKey);
110 bool hasKey(
const QString & szKey);
111 bool hasGroup(
const QString & szGroup);
112 void setGroup(
const QString & szGroup);
114 const QString &
group() {
return m_szGroup; };
115 void writeEntry(
const QString & szKey,
const QString & szValue);
118 writeEntry(szKey, QString::fromUtf8(szValue));
120 QString readEntry(
const QString & szKey,
const QString & szDefault = QString());
124 return readEntry(szKey, szDefault.
ptr());
128 void writeEntry(
const QString & szKey,
const KviPixmap & pixmap);
132 void writeEntry(
const QString & szKey,
const QColor & clr);
133 QColor readColorEntry(
const QString & szKey,
const QColor & clr);
134 void writeEntry(
const QString & szKey, QFont & fnt);
135 QFont readFontEntry(
const QString & szKey,
const QFont & fnt);
136 void writeEntry(
const QString & szKey,
bool bTrue);
137 bool readBoolEntry(
const QString & szKey,
bool bTrue);
138 QRect readRectEntry(
const QString & szKey,
const QRect & rct);
139 void writeEntry(
const QString & szKey,
const QRect & rct);
140 QStringList readStringListEntry(
const QString & szKey,
const QStringList & list = QStringList());
141 void writeEntry(
const QString & szKey,
const QStringList & list);
142 QList<int> readIntListEntry(
const QString &,
const QList<int> & list);
143 void writeEntry(
const QString & szKey,
const QList<int> & list);
148 void writeEntry(
const QString & szKey,
int iValue);
149 int readIntEntry(
const QString & szKey,
int iDefault);
150 void writeEntry(
const QString & szKey,
unsigned short int usValue);
151 unsigned short int readUShortEntry(
const QString & szKey,
unsigned short int usDefault);
152 void writeEntry(
const QString & szKey,
unsigned int iValue);
153 unsigned int readUIntEntry(
const QString & szKey,
unsigned int iDefault);
154 void writeEntry(
const QString & szKey,
char iValue);
155 char readCharEntry(
const QString & szKey,
char iDefault);
156 void writeEntry(
const QString & szKey,
unsigned char iValue);
157 unsigned char readUCharEntry(
const QString & szKey,
unsigned char iDefault);
159 static void getFontProperties(
KviCString & buffer, QFont * fnt);
160 static void setFontProperties(
KviCString & str, QFont * fnt);
162 #ifdef COMPILE_ON_WINDOWS
168 void *
operator new(
size_t tSize);
169 void operator delete(
void *
p);
Definition: KviHeapObject.h:124
Definition: KviCString.h:105
QString m_szStrBuffer
Definition: KviConfigurationFile.h:68
bool readOnly()
Definition: KviConfigurationFile.h:92
#define f
Definition: detector.cpp:70
Definition: KviConfigurationFile.h:48
void setSavePath(const QString &savePath)
Definition: KviConfigurationFile.h:101
A fast pointer hash table iterator implementation.
Definition: KviPointerHashTable.h:393
KviPointerHashTable< QString, QString > KviConfigurationFileGroup
Definition: KviConfigurationFile.h:42
Definition: KviPixmap.h:33
void preserveEmptyGroups(bool bPreserve)
Definition: KviConfigurationFile.h:90
Definition: KviMessageTypeSettings.h:47
void setReadOnly(bool bReadOnly)
Definition: KviConfigurationFile.h:93
bool save(KviThemeInfo &options, bool bSaveIcons)
Definition: KviOptions.cpp:986
KviPointerHashTableIterator< QString, QString > KviConfigurationFileGroupIterator
Definition: KviConfigurationFile.h:45
KviPointerHashTable< QString, KviConfigurationFileGroup > * dict()
Definition: KviConfigurationFile.h:102
bool m_bLocal8Bit
Definition: KviConfigurationFile.h:64
QString m_szFileName
Definition: KviConfigurationFile.h:66
const QString & fileName()
Definition: KviConfigurationFile.h:91
KviPointerHashTableIterator< QString, KviConfigurationFileGroup > KviConfigurationFileIterator
Definition: KviConfigurationFile.h:46
bool sync()
Definition: KviConfigurationFile.h:109
bool dirty()
Definition: KviConfigurationFile.h:94
const QString & group()
Definition: KviConfigurationFile.h:114
KviPointerHashTable< QString, KviConfigurationFileGroup > * m_pDict
Definition: KviConfigurationFile.h:65
bool m_bPreserveEmptyGroups
Definition: KviConfigurationFile.h:70
unsigned int groupsCount()
Definition: KviConfigurationFile.h:108
bool m_bReadOnly
Definition: KviConfigurationFile.h:71
void writeEntry(const QString &szKey, const char *szValue)
Definition: KviConfigurationFile.h:116
FileMode
Definition: KviConfigurationFile.h:51
This file contains compile time settings.
QString readKviCStringEntry(const QString &szKey, const KviCString &szDefault)
Definition: KviConfigurationFile.h:122
char * ptr() const
Definition: KviCString.h:172
#define p
Definition: detector.cpp:80
#define KVILIB_API
Definition: kvi_settings.h:125
QString m_szGroup
Definition: KviConfigurationFile.h:69
bool m_bDirty
Definition: KviConfigurationFile.h:67
void clearDirtyFlag()
Definition: KviConfigurationFile.h:104