LibEngsas
echartmarkers.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17  MA 02110-1301 USA.
18 */
19 
20 #ifndef ECHARTMARKERS_H
21 #define ECHARTMARKERS_H
22 
23 #include "echarts.h"
24 
26 
27 #include <QPoint>
28 #include <QColor>
29 #include <QPointer>
30 
31 class QPainter;
32 
42 {
43  public:
44  EChartMarkers();
48  static EChartMarkersConfig *config();
49 
50  static void circle(QPainter *painter, QPoint point);
51  static void rhomb(QPainter *painter, QPoint point);
52  static void square(QPainter *painter, QPoint point);
53  static void triangleUp(QPainter *painter, QPoint point);
54  static void triangleLeft(QPainter *painter, QPoint point);
55  static void triangleBottom(QPainter *painter, QPoint point);
56  static void triangleRight(QPainter *painter, QPoint point);
57 
58  private:
59  uint size() const;
60  int halfSize() const;
61  void triangle(QPainter *painter, QPoint point, int angle);
69  static QPointer<EChartMarkersConfig> markersConfig;
70 };
71 
72 
73 
74 #endif // ECHARTMARKERS_H