##// END OF EJS Templates
Removed extra visibleChanged signal from QBarSeries
Tero Ahola -
r1381:eab8b897e6b5
parent child
Show More
@@ -1,82 +1,81
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2012 Digia Plc
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
8 **
9 ** $QT_BEGIN_LICENSE$
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
13 ** a written agreement between you and Digia.
14 **
14 **
15 ** If you have questions regarding the use of this file, please use
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
17 ** $QT_END_LICENSE$
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #ifndef BARSERIES_H
21 #ifndef BARSERIES_H
22 #define BARSERIES_H
22 #define BARSERIES_H
23
23
24 #include <qabstractseries.h>
24 #include <qabstractseries.h>
25 #include <QStringList>
25 #include <QStringList>
26
26
27 QTCOMMERCIALCHART_BEGIN_NAMESPACE
27 QTCOMMERCIALCHART_BEGIN_NAMESPACE
28
28
29 class QBarSet;
29 class QBarSet;
30 class QBarSeriesPrivate;
30 class QBarSeriesPrivate;
31
31
32 // Container for series
32 // Container for series
33 class QTCOMMERCIALCHART_EXPORT QBarSeries : public QAbstractSeries
33 class QTCOMMERCIALCHART_EXPORT QBarSeries : public QAbstractSeries
34 {
34 {
35 Q_OBJECT
35 Q_OBJECT
36 Q_PROPERTY(qreal barMargin READ barMargin WRITE setBarMargin)
36 Q_PROPERTY(qreal barMargin READ barMargin WRITE setBarMargin)
37 Q_PROPERTY(int count READ barsetCount)
37 Q_PROPERTY(int count READ barsetCount)
38 Q_PROPERTY(bool labelsVisible READ isLabelsVisible WRITE setLabelsVisible)
38 Q_PROPERTY(bool labelsVisible READ isLabelsVisible WRITE setLabelsVisible)
39
39
40 public:
40 public:
41 explicit QBarSeries(QObject *parent = 0);
41 explicit QBarSeries(QObject *parent = 0);
42 virtual ~QBarSeries();
42 virtual ~QBarSeries();
43
43
44 QAbstractSeries::SeriesType type() const;
44 QAbstractSeries::SeriesType type() const;
45
45
46 void setBarMargin(qreal margin);
46 void setBarMargin(qreal margin);
47 qreal barMargin() const;
47 qreal barMargin() const;
48
48
49 bool append(QBarSet *set);
49 bool append(QBarSet *set);
50 bool remove(QBarSet *set);
50 bool remove(QBarSet *set);
51 bool append(QList<QBarSet* > sets);
51 bool append(QList<QBarSet* > sets);
52 bool insert(int index, QBarSet *set);
52 bool insert(int index, QBarSet *set);
53 int barsetCount() const;
53 int barsetCount() const;
54 QList<QBarSet*> barSets() const;
54 QList<QBarSet*> barSets() const;
55 void clear();
55 void clear();
56
56
57 void setLabelsVisible(bool visible = true);
57 void setLabelsVisible(bool visible = true);
58 bool isLabelsVisible() const;
58 bool isLabelsVisible() const;
59
59
60 protected:
60 protected:
61 explicit QBarSeries(QBarSeriesPrivate &d,QObject *parent = 0);
61 explicit QBarSeries(QBarSeriesPrivate &d,QObject *parent = 0);
62
62
63 Q_SIGNALS:
63 Q_SIGNALS:
64 void clicked(QBarSet *barset, int index);
64 void clicked(QBarSet *barset, int index);
65 void hovered(QBarSet* barset, bool status);
65 void hovered(QBarSet* barset, bool status);
66 void visibleChanged();
67 void labelsVisibleChanged();
66 void labelsVisibleChanged();
68
67
69 void barsetsAdded(QList<QBarSet*> sets);
68 void barsetsAdded(QList<QBarSet*> sets);
70 void barsetsRemoved(QList<QBarSet*> sets);
69 void barsetsRemoved(QList<QBarSet*> sets);
71
70
72 protected:
71 protected:
73 Q_DECLARE_PRIVATE(QBarSeries)
72 Q_DECLARE_PRIVATE(QBarSeries)
74 friend class BarChartItem;
73 friend class BarChartItem;
75 friend class PercentBarChartItem;
74 friend class PercentBarChartItem;
76 friend class StackedBarChartItem;
75 friend class StackedBarChartItem;
77 friend class GroupedBarChartItem;
76 friend class GroupedBarChartItem;
78 };
77 };
79
78
80 QTCOMMERCIALCHART_END_NAMESPACE
79 QTCOMMERCIALCHART_END_NAMESPACE
81
80
82 #endif // BARSERIES_H
81 #endif // BARSERIES_H
General Comments 0
You need to be logged in to leave comments. Login now