Engauge Digitizer  2
GeometryModel.h
1 /******************************************************************************************************
2  * (C) 2016 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 GEOMETRY_MODEL_H
8 #define GEOMETRY_MODEL_H
9 
10 #include <QString>
11 #include "WindowModelBase.h"
12 
15 {
16 public:
18  GeometryModel ();
19  virtual ~GeometryModel ();
20 
22  virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
23 
25  void setCurrentPointIdentifier (const QString &pointIdentifier);
26 
27 private:
28 
29  int rowToBeHighlighted () const;
30 
31  int m_rowToBeHighlighted;
32  QString m_pointIdentifier; // Point to be higlighted. Empty if none
33 };
34 
35 #endif // GEOMETRY_MODEL_H
void setCurrentPointIdentifier(const QString &pointIdentifier)
Set the point identifier to be highlighted. Value is empty for no highlighting.
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Override for special processing.
GeometryModel()
Single constructor.
Model that adds row highlighting according to the currently select point identifier.
Definition: GeometryModel.h:14
Model for WindowTable.