Engauge Digitizer 2
Loading...
Searching...
No Matches
CentipedeState.cpp File Reference
#include "CentipedeState.h"
#include <QHash>
Include dependency graph for CentipedeState.cpp:

Go to the source code of this file.

Typedefs

typedef QHash< CentipedeState, QString > CentipedeStateHash

Functions

QString centipedeStateAsString (CentipedeState state)

Typedef Documentation

◆ CentipedeStateHash

typedef QHash<CentipedeState, QString> CentipedeStateHash

Definition at line 10 of file CentipedeState.cpp.

Function Documentation

◆ centipedeStateAsString()

QString centipedeStateAsString ( CentipedeState state)

Definition at line 14 of file CentipedeState.cpp.

15{
16 if (centipedeStateHash.size () == 0) {
17
18 // First time through we load the hash
19 centipedeStateHash [CENTIPEDE_STATE_BUILD_CARTESIAN] = "CentipedeStateBuildCartesian";
20 centipedeStateHash [CENTIPEDE_STATE_BUILD_POLAR] = "CentipedeStateBuildPolar";
21 centipedeStateHash [CENTIPEDE_STATE_PREBUILD] = "CentipedeStatePrebuild";
22 }
23
24 if (centipedeStateHash.contains (state)) {
25 return centipedeStateHash [state];
26 } else {
27 return "?";
28 }
29}
@ CENTIPEDE_STATE_BUILD_CARTESIAN
@ CENTIPEDE_STATE_PREBUILD
@ CENTIPEDE_STATE_BUILD_POLAR