Qt 4.8
Public Functions | Public Variables | List of all members
QSettingsGroup Class Reference

#include <qsettings_p.h>

Public Functions

int arraySizeGuess () const
 
bool isArray () const
 
QString name () const
 
 QSettingsGroup ()
 
 QSettingsGroup (const QString &s)
 
 QSettingsGroup (const QString &s, bool guessArraySize)
 
void setArrayIndex (int i)
 
QString toString () const
 

Public Variables

int maxNum
 
int num
 
QString str
 

Detailed Description

Definition at line 117 of file qsettings_p.h.

Constructors and Destructors

◆ QSettingsGroup() [1/3]

QSettingsGroup::QSettingsGroup ( )
inline

Definition at line 120 of file qsettings_p.h.

121  : num(-1), maxNum(-1) {}

◆ QSettingsGroup() [2/3]

QSettingsGroup::QSettingsGroup ( const QString s)
inline

Definition at line 122 of file qsettings_p.h.

123  : str(s), num(-1), maxNum(-1) {}

◆ QSettingsGroup() [3/3]

QSettingsGroup::QSettingsGroup ( const QString s,
bool  guessArraySize 
)
inline

Definition at line 124 of file qsettings_p.h.

125  : str(s), num(0), maxNum(guessArraySize ? 0 : -1) {}

Functions

◆ arraySizeGuess()

int QSettingsGroup::arraySizeGuess ( ) const
inline

Definition at line 130 of file qsettings_p.h.

Referenced by QSettings::endArray().

130 { return maxNum; }

◆ isArray()

bool QSettingsGroup::isArray ( ) const
inline

Definition at line 129 of file qsettings_p.h.

Referenced by QSettings::endArray(), and QSettings::endGroup().

129 { return num != -1; }

◆ name()

QString QSettingsGroup::name ( ) const
inline

Definition at line 127 of file qsettings_p.h.

Referenced by QSettingsPrivate::beginGroupOrArray(), and QSettings::endArray().

127 { return str; }

◆ setArrayIndex()

void QSettingsGroup::setArrayIndex ( int  i)
inline

Definition at line 131 of file qsettings_p.h.

Referenced by QSettings::setArrayIndex().

132  { num = i + 1; if (maxNum != -1 && num > maxNum) maxNum = num; }

◆ toString()

QString QSettingsGroup::toString ( ) const
inline

Definition at line 139 of file qsettings_p.h.

Referenced by QSettings::endArray(), QSettings::endGroup(), and QSettings::setArrayIndex().

140 {
141  QString result;
142  result = str;
143  if (num > 0) {
144  result += QLatin1Char('/');
145  result += QString::number(num);
146  }
147  return result;
148 }
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qstring.cpp:6448
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55

Properties

◆ maxNum

int QSettingsGroup::maxNum

Definition at line 136 of file qsettings_p.h.

◆ num

int QSettingsGroup::num

Definition at line 135 of file qsettings_p.h.

◆ str

QString QSettingsGroup::str

Definition at line 134 of file qsettings_p.h.


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