Engauge Digitizer  2
GraphicsItemsExtractor.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 GRAPHICS_ITEMS_EXTRACTOR_H
8 #define GRAPHICS_ITEMS_EXTRACTOR_H
9 
10 #include <QStringList>
11 
12 class QGraphicsItem;
13 
14 enum AxisOrGraph {
15  AXIS_POINTS,
16  GRAPH_POINTS
17 };
18 
21 {
22 public:
26 
28  bool allSelectedItemsAreEitherAxisOrGraph (const QList<QGraphicsItem*> &items,
29  AxisOrGraph axisOrGraph) const;
30 
32  QStringList selectedPointIdentifiers (const QList<QGraphicsItem*> &items) const;
33 
34 };
35 
36 #endif // GRAPHICS_ITEMS_EXTRACTOR_H
QStringList selectedPointIdentifiers(const QList< QGraphicsItem * > &items) const
Return list of selected point identifiers.
bool allSelectedItemsAreEitherAxisOrGraph(const QList< QGraphicsItem * > &items, AxisOrGraph axisOrGraph) const
Return true if all selected points are of the specified axis or graph type.
This class consolidates utility routines that deal with graphics items that are getting extracted fro...
GraphicsItemsExtractor()
Single constructor.