Log4Qt::Properties Class Reference

The class Properties implements a JAVA property hash. More...

#include <properties.h>

List of all members.

Public Member Functions

 Properties (Properties *pDefaultProperties=0)
PropertiesdefaultProperties () 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)


Detailed Description

The class Properties implements a JAVA property hash.

Constructor & Destructor Documentation

Log4Qt::Properties::Properties ( Properties pDefaultProperties = 0  )  [inline]


Member Function Documentation

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


Friends And Related Function Documentation

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")) )

See also:
QDebug


The documentation for this class was generated from the following file:

Generated on Sun Mar 1 16:40:46 2009 for Log4Qt by  doxygen 1.5.6