QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
numerotationcontext.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 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 &,
37 const QVariant & = QVariant(1),
38 const int = 1,
39 const int = 0);
40 QString operator[] (const int &) const;
42 int size() const;
43 bool isEmpty() const;
44 QStringList itemAt(const int) const;
45 QString validRegExpNum () const;
46 QString validRegExpNumber() const;
47 bool keyIsAcceptable (const QString &) const;
48 bool keyIsNumber(const QString &) const;
49 QDomElement toXml(QDomDocument &, const QString&);
50 void fromXml(QDomElement &);
51 void replaceValue(int, QString);
52
53 private:
54 QStringList content_;
55};
56
57#endif // NUMEROTATIONCONTEXT_H
Definition numerotationcontext.h:31
void fromXml(QDomElement &)
NumerotationContext::fromXml load numerotation context from e.
Definition numerotationcontext.cpp:184
QDomElement toXml(QDomDocument &, const QString &)
NumerotationContext::toXml Save the numerotation context in a QDomElement under the element name str.
Definition numerotationcontext.cpp:162
QString operator[](const int &) const
NumerotationContext::operator [].
Definition numerotationcontext.cpp:82
QString validRegExpNumber() const
NumerotationContext::validRegExpNumber.
Definition numerotationcontext.cpp:135
void replaceValue(int, QString)
NumerotationContext::replaceValue This class replaces the current NC field value with content.
Definition numerotationcontext.cpp:195
bool isEmpty() const
NumerotationContext::isEmpty.
Definition numerotationcontext.cpp:107
QString validRegExpNum() const
validRegExpNum
Definition numerotationcontext.cpp:126
QStringList content_
Definition numerotationcontext.h:54
bool keyIsNumber(const QString &) const
NumerotationContext::keyIsNumber.
Definition numerotationcontext.cpp:153
QStringList itemAt(const int) const
NumerotationContext::itemAt.
Definition numerotationcontext.cpp:117
NumerotationContext()
Definition numerotationcontext.cpp:28
bool addValue(const QString &, const QVariant &=QVariant(1), const int=1, const int=0)
NumerotationContext::addValue add a new value on the contexte.
Definition numerotationcontext.cpp:56
bool keyIsAcceptable(const QString &) const
NumerotationContext::keyIsAcceptable.
Definition numerotationcontext.cpp:144
void operator<<(const NumerotationContext &)
NumerotationContext::operator << , append other.
Definition numerotationcontext.cpp:90
int size() const
NumerotationContext::size.
Definition numerotationcontext.cpp:98
void clear()
NumerotationContext::clear, clear the content.
Definition numerotationcontext.cpp:42