QElectroTech
0.70
|
#include <numerotationcontext.h>
Public Member Functions | |
NumerotationContext () | |
NumerotationContext (QDomElement &) | |
void | clear () |
NumerotationContext::clear, clear the content. More... | |
bool | addValue (const QString &, const QVariant &=QVariant(1), const int=1, const int=0) |
NumerotationContext::addValue, add a new value on the contexte. More... | |
QString | operator[] (const int &) const |
NumerotationContext::operator []. More... | |
void | operator<< (const NumerotationContext &) |
NumerotationContext::operator << , append other. More... | |
int | size () const |
NumerotationContext::size. More... | |
bool | isEmpty () const |
NumerotationContext::isEmpty. More... | |
QStringList | itemAt (const int) const |
NumerotationContext::itemAt. More... | |
QString | validRegExpNum () const |
validRegExpNum More... | |
QString | validRegExpNumber () const |
NumerotationContext::validRegExpNumber. More... | |
bool | keyIsAcceptable (const QString &) const |
NumerotationContext::keyIsAcceptable. More... | |
bool | keyIsNumber (const QString &) const |
NumerotationContext::keyIsNumber. More... | |
QDomElement | toXml (QDomDocument &, const QString &) |
NumerotationContext::toXml Save the numerotation context in a QDomElement under the element name . More... | |
void | fromXml (QDomElement &) |
NumerotationContext::fromXml load numerotation context from . More... | |
void | replaceValue (int, QString) |
NumerotationContext::replaceValue This class replaces the current NC field value with content. More... | |
Private Attributes | |
QStringList | content_ |
This class represents a numerotation context, i.e. the data (type, value, increase) of a numerotation at a given time. It is notably used by conductor to store the informations they need to do their autonumerotation.
Definition at line 30 of file numerotationcontext.h.
NumerotationContext::NumerotationContext | ( | ) |
Constructor
Definition at line 26 of file numerotationcontext.cpp.
NumerotationContext::NumerotationContext | ( | QDomElement & | e | ) |
bool NumerotationContext::addValue | ( | const QString & | type, |
const QVariant & | value = QVariant(1) , |
||
const int | increase = 1 , |
||
const int | initialvalue = 0 |
||
) |
NumerotationContext::addValue, add a new value on the contexte.
type | the type of value |
value | the value itself |
increase | the increase number of value |
Definition at line 50 of file numerotationcontext.cpp.
References content_, keyIsAcceptable(), and keyIsNumber().
Referenced by fromXml(), NumStrategy::nextNumber(), NumStrategy::nextString(), NumStrategy::previousNumber(), and NumPartEditorW::toNumContext().
void NumerotationContext::clear | ( | ) |
NumerotationContext::clear, clear the content.
Definition at line 39 of file numerotationcontext.cpp.
References content_.
Referenced by fromXml().
void NumerotationContext::fromXml | ( | QDomElement & | e | ) |
NumerotationContext::fromXml load numerotation context from .
Definition at line 157 of file numerotationcontext.cpp.
References addValue(), clear(), and QET::findInDomElement().
Referenced by NumerotationContext(), and QETProject::readDefaultPropertiesXml().
bool NumerotationContext::isEmpty | ( | ) | const |
Definition at line 87 of file numerotationcontext.cpp.
References content_.
Referenced by ConductorAutoNumerotation::newProperties(), ConductorAutoNumerotation::numerateNewConductor(), and autonum::setSequential().
QStringList NumerotationContext::itemAt | ( | const int | i | ) | const |
Definition at line 95 of file numerotationcontext.cpp.
References content_.
Referenced by Diagram::insertFolioSeqHash(), Diagram::loadFolioSeqHash(), NumerotationContextCommands::next(), NumStrategy::nextNumber(), NumStrategy::nextString(), autonum::numerotationContextToFormula(), NumPartEditorW::NumPartEditorW(), NumerotationContextCommands::previous(), NumStrategy::previousNumber(), autonum::setSequentialToList(), NumerotationContextCommands::toRepresentedString(), and toXml().
bool NumerotationContext::keyIsAcceptable | ( | const QString & | type | ) | const |
NumerotationContext::keyIsAcceptable.
Definition at line 119 of file numerotationcontext.cpp.
References validRegExpNum().
Referenced by addValue().
bool NumerotationContext::keyIsNumber | ( | const QString & | type | ) | const |
NumerotationContext::keyIsNumber.
Definition at line 127 of file numerotationcontext.cpp.
References validRegExpNumber().
Referenced by addValue().
void NumerotationContext::operator<< | ( | const NumerotationContext & | other | ) |
NumerotationContext::operator << , append other.
Definition at line 71 of file numerotationcontext.cpp.
QString NumerotationContext::operator[] | ( | const int & | i | ) | const |
NumerotationContext::operator [].
Definition at line 64 of file numerotationcontext.cpp.
References content_.
void NumerotationContext::replaceValue | ( | int | index, |
QString | content | ||
) |
NumerotationContext::replaceValue This class replaces the current NC field value with content.
index | of NC Item |
QString | content to replace current value |
Definition at line 168 of file numerotationcontext.cpp.
References content_.
Referenced by Diagram::insertFolioSeqHash(), and Diagram::loadFolioSeqHash().
int NumerotationContext::size | ( | ) | const |
Definition at line 79 of file numerotationcontext.cpp.
References content_.
Referenced by Diagram::insertFolioSeqHash(), Diagram::loadFolioSeqHash(), NumerotationContextCommands::next(), autonum::numerotationContextToFormula(), NumPartEditorW::NumPartEditorW(), operator<<(), NumerotationContextCommands::previous(), SelectAutonumW::setContext(), autonum::setSequentialToList(), and NumerotationContextCommands::toRepresentedString().
QDomElement NumerotationContext::toXml | ( | QDomDocument & | d, |
const QString & | str | ||
) |
NumerotationContext::toXml Save the numerotation context in a QDomElement under the element name .
Definition at line 135 of file numerotationcontext.cpp.
QString NumerotationContext::validRegExpNum | ( | ) | const |
validRegExpNum
Definition at line 103 of file numerotationcontext.cpp.
Referenced by keyIsAcceptable().
QString NumerotationContext::validRegExpNumber | ( | ) | const |
NumerotationContext::validRegExpNumber.
Definition at line 111 of file numerotationcontext.cpp.
Referenced by keyIsNumber().
|
private |
Definition at line 51 of file numerotationcontext.h.
Referenced by addValue(), clear(), isEmpty(), itemAt(), operator<<(), operator[](), replaceValue(), size(), and toXml().