#include <kptwbsdefinition.h>
Public Member Functions | |
WBSDefinition () | |
~WBSDefinition () | |
void | clear () |
QString | wbs (uint index, int level) |
Return wbs string. | |
QString | code (uint index, int level) |
Return wbs code. | |
QString | separator (int level) |
Return wbs separator. | |
CodeDef & | defaultDef () |
void | setDefaultDef (CodeDef def) |
bool | isLevelsDefEnabled () const |
bool | level0Enabled () |
void | setLevelsDefEnabled (bool on) |
void | clearLevelsDef () |
const QMap< int, CodeDef > & | levelsDef () const |
void | setLevelsDef (QMap< int, CodeDef > def) |
CodeDef | levelsDef (int level) const |
void | setLevelsDef (int level, CodeDef def) |
void | setLevelsDef (int level, QString c, QString s) |
QStringList | codeList () |
int | defaultCodeIndex () const |
bool | setDefaultCode (uint index) |
QString | defaultSeparator () const |
void | setDefaultSeparator (QString s) |
Protected Member Functions | |
QString | code (CodeDef &def, uint index) |
QString | toRoman (int n, bool upper=false) |
Private Attributes | |
CodeDef | m_defaultDef |
bool | m_levelsEnabled |
QMap< int, CodeDef > | m_levelsDef |
QList< QPair< QString, QString > > | m_codeLists |
Classes | |
class | CodeDef |
Definition at line 35 of file kptwbsdefinition.h.
KPlato::WBSDefinition::WBSDefinition | ( | ) |
Definition at line 35 of file kptwbsdefinition.cc.
References KPlato::WBSDefinition::CodeDef::code, m_codeLists, m_defaultDef, m_levelsEnabled, and KPlato::WBSDefinition::CodeDef::separator.
KPlato::WBSDefinition::~WBSDefinition | ( | ) |
Definition at line 48 of file kptwbsdefinition.cc.
void KPlato::WBSDefinition::clear | ( | ) |
Definition at line 51 of file kptwbsdefinition.cc.
References KPlato::WBSDefinition::CodeDef::clear(), m_defaultDef, and m_levelsDef.
QString KPlato::WBSDefinition::wbs | ( | uint | index, | |
int | level | |||
) |
Return wbs string.
Definition at line 56 of file kptwbsdefinition.cc.
References code(), KPlato::WBSDefinition::CodeDef::isEmpty(), isLevelsDefEnabled(), levelsDef(), m_defaultDef, and KPlato::WBSDefinition::CodeDef::separator.
Referenced by KPlato::Node::generateWBS().
QString KPlato::WBSDefinition::code | ( | uint | index, | |
int | level | |||
) |
Return wbs code.
Definition at line 67 of file kptwbsdefinition.cc.
References KPlato::WBSDefinition::CodeDef::isEmpty(), isLevelsDefEnabled(), levelsDef(), and m_defaultDef.
Referenced by KPlato::Node::generateWBS(), and wbs().
QString KPlato::WBSDefinition::separator | ( | int | level | ) |
Return wbs separator.
Definition at line 77 of file kptwbsdefinition.cc.
References KPlato::WBSDefinition::CodeDef::isEmpty(), isLevelsDefEnabled(), levelsDef(), m_defaultDef, and KPlato::WBSDefinition::CodeDef::separator.
CodeDef& KPlato::WBSDefinition::defaultDef | ( | ) | [inline] |
void KPlato::WBSDefinition::setDefaultDef | ( | CodeDef | def | ) | [inline] |
bool KPlato::WBSDefinition::isLevelsDefEnabled | ( | ) | const [inline] |
Definition at line 64 of file kptwbsdefinition.h.
References m_levelsEnabled.
Referenced by code(), separator(), wbs(), and KPlato::WBSDefinitionPanel::WBSDefinitionPanel().
bool KPlato::WBSDefinition::level0Enabled | ( | ) |
Definition at line 104 of file kptwbsdefinition.cc.
References levelsDef(), and m_levelsEnabled.
Referenced by KPlato::Project::generateWBS().
void KPlato::WBSDefinition::setLevelsDefEnabled | ( | bool | on | ) | [inline] |
Definition at line 66 of file kptwbsdefinition.h.
References m_levelsEnabled.
Referenced by KPlato::WBSDefinitionPanel::ok().
void KPlato::WBSDefinition::clearLevelsDef | ( | ) | [inline] |
Definition at line 67 of file kptwbsdefinition.h.
References m_levelsDef.
Referenced by KPlato::WBSDefinitionPanel::ok().
const QMap<int, CodeDef>& KPlato::WBSDefinition::levelsDef | ( | ) | const [inline] |
Definition at line 68 of file kptwbsdefinition.h.
References m_levelsDef.
Referenced by code(), level0Enabled(), separator(), wbs(), and KPlato::WBSDefinitionPanel::WBSDefinitionPanel().
void KPlato::WBSDefinition::setLevelsDef | ( | QMap< int, CodeDef > | def | ) |
Definition at line 87 of file kptwbsdefinition.cc.
References m_levelsDef.
Referenced by KPlato::WBSDefinitionPanel::ok().
WBSDefinition::CodeDef KPlato::WBSDefinition::levelsDef | ( | int | level | ) | const |
void KPlato::WBSDefinition::setLevelsDef | ( | int | level, | |
CodeDef | def | |||
) |
void KPlato::WBSDefinition::setLevelsDef | ( | int | level, | |
QString | c, | |||
QString | s | |||
) |
QStringList KPlato::WBSDefinition::codeList | ( | ) |
Definition at line 156 of file kptwbsdefinition.cc.
References m_codeLists.
Referenced by KPlato::WBSDefinitionPanel::slotAddBtnClicked(), and KPlato::WBSDefinitionPanel::WBSDefinitionPanel().
int KPlato::WBSDefinition::defaultCodeIndex | ( | ) | const |
Definition at line 165 of file kptwbsdefinition.cc.
References KPlato::WBSDefinition::CodeDef::code, m_codeLists, and m_defaultDef.
Referenced by KPlato::WBSDefinitionPanel::slotAddBtnClicked(), and KPlato::WBSDefinitionPanel::WBSDefinitionPanel().
bool KPlato::WBSDefinition::setDefaultCode | ( | uint | index | ) |
Definition at line 176 of file kptwbsdefinition.cc.
References KPlato::WBSDefinition::CodeDef::code, m_codeLists, and m_defaultDef.
Referenced by KPlato::WBSDefinitionPanel::ok().
QString KPlato::WBSDefinition::defaultSeparator | ( | ) | const [inline] |
Definition at line 77 of file kptwbsdefinition.h.
References m_defaultDef, and KPlato::WBSDefinition::CodeDef::separator.
Referenced by KPlato::WBSDefinitionPanel::slotAddBtnClicked(), and KPlato::WBSDefinitionPanel::WBSDefinitionPanel().
void KPlato::WBSDefinition::setDefaultSeparator | ( | QString | s | ) |
Definition at line 184 of file kptwbsdefinition.cc.
References m_defaultDef, and KPlato::WBSDefinition::CodeDef::separator.
Referenced by KPlato::WBSDefinitionPanel::ok().
QString KPlato::WBSDefinition::code | ( | CodeDef & | def, | |
uint | index | |||
) | [protected] |
Definition at line 110 of file kptwbsdefinition.cc.
References KPlato::WBSDefinition::CodeDef::code, KPlato::Letters, and toRoman().
QString KPlato::WBSDefinition::toRoman | ( | int | n, | |
bool | upper = false | |||
) | [protected] |
Definition at line 141 of file kptwbsdefinition.cc.
References KPlato::RNHundreds, KPlato::RNTens, KPlato::RNThousands, and KPlato::RNUnits.
Referenced by code().
CodeDef KPlato::WBSDefinition::m_defaultDef [private] |
Definition at line 85 of file kptwbsdefinition.h.
Referenced by clear(), code(), defaultCodeIndex(), defaultDef(), defaultSeparator(), separator(), setDefaultCode(), setDefaultDef(), setDefaultSeparator(), wbs(), and WBSDefinition().
bool KPlato::WBSDefinition::m_levelsEnabled [private] |
Definition at line 87 of file kptwbsdefinition.h.
Referenced by isLevelsDefEnabled(), level0Enabled(), setLevelsDefEnabled(), and WBSDefinition().
QMap<int, CodeDef> KPlato::WBSDefinition::m_levelsDef [private] |
Definition at line 88 of file kptwbsdefinition.h.
Referenced by clear(), clearLevelsDef(), levelsDef(), and setLevelsDef().
QList<QPair<QString, QString> > KPlato::WBSDefinition::m_codeLists [private] |
Definition at line 90 of file kptwbsdefinition.h.
Referenced by codeList(), defaultCodeIndex(), setDefaultCode(), and WBSDefinition().