Engauge Digitizer  2
CurveNameListEntry.h
1 /******************************************************************************************************
2  * (C) 2014 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 
7 #ifndef CURVE_NAME_LIST_ENTRY_H
8 #define CURVE_NAME_LIST_ENTRY_H
9 
10 #include <QString>
11 
12 class QXmlStreamWriter;
13 
20 {
21  public:
24 
26  CurveNameListEntry (const QString &curveNameCurrent,
27  const QString &curveNameOriginal,
28  int numPoints);
29 
31  CurveNameListEntry (const QString &fromText);
32 
34  static int COL_CURVE_NAME_CURRENT () { return 0; }
35 
37  static int COL_CURVE_NAME_ORIGINAL () { return 1; }
38 
40  static int COL_NUM_POINTS () { return 2; }
41 
43  QString curveNameCurrent () const;
44 
46  QString curveNameOriginal () const;
47 
49  bool entryHasNotBeenPopulated () const;
50 
52  int numPoints () const;
53 
55  void setCurveNameCurrent (const QString &curveNameCurrent);
56 
58  void setCurveNameOriginal (const QString &curveNameOriginal);
59 
61  void setNumPoints (int numPoints);
62 
64  QString toString () const;
65 
66 private:
67 
68  QString m_curveNameCurrent;
69  QString m_curveNameOriginal;
70  int m_numPoints;
71 };
72 
73 #endif // CURVE_NAME_LIST_ENTRY_H
QString toString() const
QString for creating QVariant.
QString curveNameOriginal() const
Original curve name in document. Empty if there was no original curve.
Utility class for converting the QVariant in CurveNameList to/from the curve names as QStrings...
static int COL_CURVE_NAME_CURRENT()
Get method for current curve name constant.
void setCurveNameCurrent(const QString &curveNameCurrent)
Set method for current curve name.
CurveNameListEntry()
Constructor for empty entry.
static int COL_NUM_POINTS()
Get method for number of points constant.
void setCurveNameOriginal(const QString &curveNameOriginal)
Set method for original curve name.
QString curveNameCurrent() const
Curve name displayed in DlgSettingsCurveAddRemove.
static int COL_CURVE_NAME_ORIGINAL()
Get method for original curve name constant.
int numPoints() const
Number of points in curve.
bool entryHasNotBeenPopulated() const
Return true if entry is unpopulated. This is true between insertRows (where added to model) and setDa...
void setNumPoints(int numPoints)
Set method for point count.