![]() |
QElectroTech 0.200.1-dev
|
The WrapNum class A counter that wraps back to 0 (borrowing from initialvalue on the way down) every modulus values, instead of counting up forever like UnitNum/TenNum/HundredNum. Its own next()/previous() only computes its own wrapped value; carrying into (or borrowing from) the preceding numeric part is handled by NumerotationContextCommands::next()/ previous(), since only the composition loop can see adjacent parts. More...
#include <numerotationcontextcommands.h>


Public Member Functions | |
| WrapNum (Diagram *) | |
| QString | toRepresentedString (const QString) const override |
| WrapNum::toRepresentedString. | |
| NumerotationContext | next (const NumerotationContext &, const int) const override |
| WrapNum::next Wraps this part's own value back to 0 every modulus values (carrying into the adjacent part is handled by NumerotationContextCommands::next(), which has visibility into the other parts). | |
| NumerotationContext | previous (const NumerotationContext &, const int) const override |
| WrapNum::previous. | |
| Public Member Functions inherited from NumStrategy | |
| NumStrategy (Diagram *=nullptr) | |
| virtual | ~NumStrategy () |
Additional Inherited Members | |
| Protected Member Functions inherited from NumStrategy | |
| NumerotationContext | nextString (const NumerotationContext &, const int) const |
| NumStrategy::nextString. | |
| NumerotationContext | nextNumber (const NumerotationContext &, const int) const |
| NumStrategy::nextNumber. | |
| NumerotationContext | previousNumber (const NumerotationContext &, const int) const |
| NumStrategy::previousNumber. | |
| Protected Attributes inherited from NumStrategy | |
| Diagram * | diagram_ |
The WrapNum class A counter that wraps back to 0 (borrowing from initialvalue on the way down) every modulus values, instead of counting up forever like UnitNum/TenNum/HundredNum. Its own next()/previous() only computes its own wrapped value; carrying into (or borrowing from) the preceding numeric part is handled by NumerotationContextCommands::next()/ previous(), since only the composition loop can see adjacent parts.
| WrapNum::WrapNum | ( | Diagram * | d | ) |
Constructor

|
overridevirtual |
WrapNum::next Wraps this part's own value back to 0 every modulus values (carrying into the adjacent part is handled by NumerotationContextCommands::next(), which has visibility into the other parts).
Implements NumStrategy.

|
overridevirtual |
Implements NumStrategy.

|
overridevirtual |