#include <properties.h>
Public Member Functions | |
Properties (Properties *pDefaultProperties=0) | |
Properties * | defaultProperties () const |
QString | property (const QString &rKey) const |
QString | property (const QString &rKey, const QString &rDefaultValue) const |
void | setDefaultProperties (Properties *pDefault) |
void | setProperty (const QString &rKey, const QString &rValue) |
void | load (QIODevice *pDevice) |
void | load (const QSettings &rSettings) |
QStringList | propertyNames () const |
Related Functions | |
(Note that these are not member functions.) | |
QDebug | operator<< (QDebug debug, const Properties &rProperties) |
Log4Qt::Properties::Properties | ( | Properties * | pDefaultProperties = 0 |
) | [inline] |
Properties * Log4Qt::Properties::defaultProperties | ( | ) | const [inline] |
QString Log4Qt::Properties::property | ( | const QString & | rKey | ) | const |
QString Log4Qt::Properties::property | ( | const QString & | rKey, | |
const QString & | rDefaultValue | |||
) | const |
void Log4Qt::Properties::setDefaultProperties | ( | Properties * | pDefault | ) | [inline] |
void Log4Qt::Properties::setProperty | ( | const QString & | rKey, | |
const QString & | rValue | |||
) | [inline] |
void Log4Qt::Properties::load | ( | QIODevice * | pDevice | ) |
void Log4Qt::Properties::load | ( | const QSettings & | rSettings | ) |
Reads all child keys from the QSettings object rSettings and inserts them into this object. The value is created using QVariant::toString(). Types that do not support toString() are resulting in an empty string.
QSettings settings; settings.setValue("Package", "Full"); settings.setValue("Background", Qt::white); settings.setValue("Support", true); settings.setValue("Help/Language", "en_UK"); Properties properties properties.load(&settings) // properties (("Package", "Full"), ("Background", ""), ("Support", "true"))
QStringList Log4Qt::Properties::propertyNames | ( | ) | const |
QDebug operator<< | ( | QDebug | debug, | |
const Properties & | rProperties | |||
) | [related] |
Writes all object member variables to the given debug stream rDebug and returns the stream.
Properties(default:0x0 properties:QHash(("log4j.appender.testAppender.layout", "org.apache.log4j.PatternLayout ") ("log4j.appender.testAppender.layout.ConversionPattern", "[%t] %-5p %l: %m%n") ("log4j.appender.testAppender.Append", "false ") ("log4j.appender.testAppender.File", "output/temp ") ("log4j.rootCategory", "TRACE, testAppender") ("log4j.appender.testAppender", "org.apache.log4j.FileAppender")) )