QElectroTech  0.70
numerotationcontext.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef NUMEROTATIONCONTEXT_H
19 #define NUMEROTATIONCONTEXT_H
20 
21 #include <QStringList>
22 #include <QVariant>
23 #include <QDomElement>
24 
31 {
32  public:
34  NumerotationContext (QDomElement &);
35  void clear();
36  bool addValue(const QString &, const QVariant & = QVariant(1), const int = 1, const int = 0);
37  QString operator[] (const int &) const;
38  void operator << (const NumerotationContext &);
39  int size() const;
40  bool isEmpty() const;
41  QStringList itemAt(const int) const;
42  QString validRegExpNum () const;
43  QString validRegExpNumber() const;
44  bool keyIsAcceptable (const QString &) const;
45  bool keyIsNumber(const QString &) const;
46  QDomElement toXml(QDomDocument &, const QString&);
47  void fromXml(QDomElement &);
48  void replaceValue(int, QString);
49 
50  private:
51  QStringList content_;
52 };
53 
54 #endif // NUMEROTATIONCONTEXT_H
QStringList itemAt(const int) const
NumerotationContext::itemAt.
void clear()
NumerotationContext::clear, clear the content.
void fromXml(QDomElement &)
NumerotationContext::fromXml load numerotation context from .
bool keyIsNumber(const QString &) const
NumerotationContext::keyIsNumber.
QString operator[](const int &) const
NumerotationContext::operator [].
QString validRegExpNum() const
validRegExpNum
QDomElement toXml(QDomDocument &, const QString &)
NumerotationContext::toXml Save the numerotation context in a QDomElement under the element name ...
QString validRegExpNumber() const
NumerotationContext::validRegExpNumber.
void operator<<(const NumerotationContext &)
NumerotationContext::operator << , append other.
int size() const
NumerotationContext::size.
void replaceValue(int, QString)
NumerotationContext::replaceValue This class replaces the current NC field value with content...
bool keyIsAcceptable(const QString &) const
NumerotationContext::keyIsAcceptable.
bool isEmpty() const
NumerotationContext::isEmpty.
bool addValue(const QString &, const QVariant &=QVariant(1), const int=1, const int=0)
NumerotationContext::addValue, add a new value on the contexte.