QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
numerotationcontextcommands.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 NUMEROTATIONCONTEXTCOMMANDS_H
19#define NUMEROTATIONCONTEXTCOMMANDS_H
20
21#include "numerotationcontext.h"
22
23class NumStrategy;
24class Diagram;
25
46
48{
49 public:
50 NumStrategy (Diagram * = nullptr);
51 virtual ~NumStrategy ();
52 virtual QString toRepresentedString (const QString) const = 0;
53 virtual NumerotationContext next (const NumerotationContext &, const int) const = 0;
54 virtual NumerotationContext previous (const NumerotationContext &, const int) const = 0;
55
56 protected:
57 NumerotationContext nextString (const NumerotationContext &, const int) const;
58 NumerotationContext nextNumber (const NumerotationContext &, const int) const;
60
62};
63
64class UnitNum: public NumStrategy
65{
66 public:
67 UnitNum (Diagram *);
68 QString toRepresentedString(const QString) const override;
69 NumerotationContext next (const NumerotationContext &, const int) const override;
70 NumerotationContext previous (const NumerotationContext &, const int) const override;
71};
72
73class UnitFNum: public NumStrategy
74{
75 public:
76 UnitFNum (Diagram *);
77 QString toRepresentedString(const QString) const override;
78 NumerotationContext next (const NumerotationContext &, const int) const override;
79 NumerotationContext previous (const NumerotationContext &, const int) const override;
80};
81
82class TenNum: public NumStrategy
83{
84 public:
85 TenNum (Diagram *);
86 QString toRepresentedString(const QString) const override;
87 NumerotationContext next (const NumerotationContext &, const int) const override;
88 NumerotationContext previous (const NumerotationContext &, const int) const override;
89};
90
91class TenFNum: public NumStrategy
92{
93 public:
94 TenFNum (Diagram *);
95 QString toRepresentedString(const QString) const override;
96 NumerotationContext next (const NumerotationContext &, const int) const override;
97 NumerotationContext previous (const NumerotationContext &, const int) const override;
98};
99
101{
102 public:
104 QString toRepresentedString(const QString) const override;
105 NumerotationContext next (const NumerotationContext &, const int) const override;
106 NumerotationContext previous (const NumerotationContext &, const int) const override;
107};
108
110{
111 public:
113 QString toRepresentedString(const QString) const override;
114 NumerotationContext next (const NumerotationContext &, const int) const override;
115 NumerotationContext previous (const NumerotationContext &, const int) const override;
116};
117
119{
120 public:
121 StringNum (Diagram *);
122 QString toRepresentedString(const QString) const override;
123 NumerotationContext next (const NumerotationContext &, const int) const override;
124 NumerotationContext previous (const NumerotationContext &, const int) const override;
125};
126
128{
129 public:
131 QString toRepresentedString(const QString) const override;
132 NumerotationContext next (const NumerotationContext &, const int) const override;
133 NumerotationContext previous (const NumerotationContext &, const int) const override;
134};
135
137{
138 public:
139 FolioNum (Diagram *);
140 QString toRepresentedString(const QString) const override;
141 NumerotationContext next (const NumerotationContext &, const int) const override;
142 NumerotationContext previous (const NumerotationContext &, const int) const override;
143};
144
146{
147 public:
148 PlantNum (Diagram *);
149 QString toRepresentedString(const QString) const override;
150 NumerotationContext next (const NumerotationContext &, const int) const override;
151 NumerotationContext previous (const NumerotationContext &, const int) const override;
152};
153
155{
156 public:
158 QString toRepresentedString(const QString) const override;
159 NumerotationContext next (const NumerotationContext &, const int) const override;
160 NumerotationContext previous (const NumerotationContext &, const int) const override;
161};
162
163
165{
166 public:
168 QString toRepresentedString(const QString) const override;
169 NumerotationContext next (const NumerotationContext &, const int) const override;
170 NumerotationContext previous (const NumerotationContext &, const int) const override;
171};
172
174{
175 public:
177 QString toRepresentedString(const QString) const override;
178 NumerotationContext next (const NumerotationContext &, const int) const override;
179 NumerotationContext previous (const NumerotationContext &, const int) const override;
180};
181
183{
184 public:
186 QString toRepresentedString(const QString) const override;
187 NumerotationContext next (const NumerotationContext &, const int) const override;
188 NumerotationContext previous (const NumerotationContext &, const int) const override;
189};
190
191
192#endif // NUMEROTATIONCONTEXTCOMMANDS_H
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition diagram.h:56
Definition numerotationcontextcommands.h:174
NumerotationContext next(const NumerotationContext &, const int) const override
ElementColumnNum::next.
Definition numerotationcontextcommands.cpp:666
QString toRepresentedString(const QString) const override
ElementColumnNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:656
NumerotationContext previous(const NumerotationContext &, const int) const override
ElementColumnNum::previous.
Definition numerotationcontextcommands.cpp:675
Definition numerotationcontextcommands.h:165
NumerotationContext previous(const NumerotationContext &, const int) const override
ElementLineNum::previous.
Definition numerotationcontextcommands.cpp:640
QString toRepresentedString(const QString) const override
ElementLineNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:621
NumerotationContext next(const NumerotationContext &, const int) const override
ElementLineNum::next.
Definition numerotationcontextcommands.cpp:631
Definition numerotationcontextcommands.h:183
NumerotationContext next(const NumerotationContext &, const int) const override
ElementPrefixNum::next.
Definition numerotationcontextcommands.cpp:701
NumerotationContext previous(const NumerotationContext &, const int) const override
ElementPrefixNum::previous.
Definition numerotationcontextcommands.cpp:710
QString toRepresentedString(const QString) const override
ElementPrefixNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:691
Definition numerotationcontextcommands.h:137
NumerotationContext previous(const NumerotationContext &, const int) const override
FolioNum::previous.
Definition numerotationcontextcommands.cpp:533
NumerotationContext next(const NumerotationContext &, const int) const override
FolioNum::next.
Definition numerotationcontextcommands.cpp:524
QString toRepresentedString(const QString) const override
FolioNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:514
Definition numerotationcontextcommands.h:110
NumerotationContext next(const NumerotationContext &, const int) const override
HundredFNum::next.
Definition numerotationcontextcommands.cpp:420
NumerotationContext previous(const NumerotationContext &, const int) const override
HundredFNum::previous.
Definition numerotationcontextcommands.cpp:429
QString toRepresentedString(const QString) const override
HundredFNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:403
Definition numerotationcontextcommands.h:101
NumerotationContext next(const NumerotationContext &, const int) const override
HundredNum::next.
Definition numerotationcontextcommands.cpp:378
QString toRepresentedString(const QString) const override
HundredNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:361
NumerotationContext previous(const NumerotationContext &, const int) const override
HundredNum::previous.
Definition numerotationcontextcommands.cpp:387
Definition numerotationcontextcommands.h:128
NumerotationContext previous(const NumerotationContext &, const int) const override
IdFolioNum::previous.
Definition numerotationcontextcommands.cpp:498
NumerotationContext next(const NumerotationContext &, const int) const override
IdFolioNum::next.
Definition numerotationcontextcommands.cpp:489
QString toRepresentedString(const QString) const override
IdFolioNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:479
Definition numerotationcontextcommands.h:155
NumerotationContext next(const NumerotationContext &, const int) const override
LocmachNum::next.
Definition numerotationcontextcommands.cpp:595
QString toRepresentedString(const QString) const override
LocmachNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:585
NumerotationContext previous(const NumerotationContext &, const int) const override
LocmachNum::previous.
Definition numerotationcontextcommands.cpp:604
Definition numerotationcontextcommands.h:48
virtual ~NumStrategy()
Definition numerotationcontextcommands.cpp:163
virtual NumerotationContext next(const NumerotationContext &, const int) const =0
NumerotationContext previousNumber(const NumerotationContext &, const int) const
NumStrategy::previousNumber.
Definition numerotationcontextcommands.cpp:197
virtual QString toRepresentedString(const QString) const =0
Diagram * diagram_
Definition numerotationcontextcommands.h:61
NumerotationContext nextString(const NumerotationContext &, const int) const
NumStrategy::nextString.
Definition numerotationcontextcommands.cpp:170
virtual NumerotationContext previous(const NumerotationContext &, const int) const =0
NumerotationContext nextNumber(const NumerotationContext &, const int) const
NumStrategy::nextNumber.
Definition numerotationcontextcommands.cpp:183
The NumerotationContextCommands class this class provide methods to handle content of NumerotationCon...
Definition numerotationcontextcommands.h:31
NumStrategy * strategy_
Definition numerotationcontextcommands.h:44
~NumerotationContextCommands()
Destructor.
Definition numerotationcontextcommands.cpp:34
QString toRepresentedString()
NumerotationContextCommands::toFinalString.
Definition numerotationcontextcommands.cpp:75
NumerotationContext previous()
NumerotationContextCommands::previous.
Definition numerotationcontextcommands.cpp:59
void setNumStrategy(const QString &)
NumerotationContextCommands::setNumStrategy apply the good strategy relative to str.
Definition numerotationcontextcommands.cpp:94
Diagram * diagram_
Definition numerotationcontextcommands.h:42
NumerotationContext context_
Definition numerotationcontextcommands.h:43
NumerotationContext next()
NumerotationContextCommands::next.
Definition numerotationcontextcommands.cpp:43
Definition numerotationcontext.h:31
Definition numerotationcontextcommands.h:146
NumerotationContext next(const NumerotationContext &, const int) const override
PlantNum::next.
Definition numerotationcontextcommands.cpp:559
QString toRepresentedString(const QString) const override
PlantNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:549
NumerotationContext previous(const NumerotationContext &, const int) const override
PlantNum::previous.
Definition numerotationcontextcommands.cpp:568
Definition numerotationcontextcommands.h:119
NumerotationContext next(const NumerotationContext &, const int) const override
StringNum::next.
Definition numerotationcontextcommands.cpp:454
NumerotationContext previous(const NumerotationContext &, const int) const override
StringNum::previous.
Definition numerotationcontextcommands.cpp:463
QString toRepresentedString(const QString) const override
StringNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:445
Definition numerotationcontextcommands.h:92
NumerotationContext previous(const NumerotationContext &, const int) const override
TenFNum::previous.
Definition numerotationcontextcommands.cpp:344
NumerotationContext next(const NumerotationContext &, const int) const override
TenFNum::next.
Definition numerotationcontextcommands.cpp:335
QString toRepresentedString(const QString) const override
TenFNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:323
Definition numerotationcontextcommands.h:83
QString toRepresentedString(const QString) const override
TenNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:286
NumerotationContext previous(const NumerotationContext &, const int) const override
TenNum::previous.
Definition numerotationcontextcommands.cpp:307
NumerotationContext next(const NumerotationContext &, const int) const override
TenNum::next.
Definition numerotationcontextcommands.cpp:298
Definition numerotationcontextcommands.h:74
QString toRepresentedString(const QString) const override
UnitFNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:252
NumerotationContext next(const NumerotationContext &, const int) const override
UnitFNum::next.
Definition numerotationcontextcommands.cpp:261
NumerotationContext previous(const NumerotationContext &, const int) const override
UnitFNum::previous.
Definition numerotationcontextcommands.cpp:270
Definition numerotationcontextcommands.h:65
NumerotationContext previous(const NumerotationContext &, const int) const override
UnitNum::previous.
Definition numerotationcontextcommands.cpp:236
QString toRepresentedString(const QString) const override
UnitNum::toRepresentedString.
Definition numerotationcontextcommands.cpp:218
NumerotationContext next(const NumerotationContext &, const int) const override
UnitNum::next.
Definition numerotationcontextcommands.cpp:227