Engauge Digitizer 2
Loading...
Searching...
No Matches
GuidelineViewState.cpp
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2020 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
8#include <QHash>
9
10typedef QHash<GuidelineViewState, QString> GuidelineViewStateHash;
11
12static GuidelineViewStateHash guidelineViewStateHash;
13
15{
16 if (guidelineViewStateHash.size () == 0) {
17
18 // First time through we load the hash
19 guidelineViewStateHash [GUIDELINE_VIEW_STATE_HIDE] = "Hide";
20 guidelineViewStateHash [GUIDELINE_VIEW_STATE_EDIT] = "Edit";
21 guidelineViewStateHash [GUIDELINE_VIEW_STATE_LOCK] = "Lock";
22 }
23
24 if (guidelineViewStateHash.contains (state)) {
25 return guidelineViewStateHash [state];
26 } else {
27 return "?";
28 }
29}
QString guidelineViewStateAsString(GuidelineViewState state)
QHash< GuidelineViewState, QString > GuidelineViewStateHash
GuidelineViewState
Set of possible Guideline view states.
@ GUIDELINE_VIEW_STATE_HIDE
@ GUIDELINE_VIEW_STATE_EDIT
@ GUIDELINE_VIEW_STATE_LOCK