##// END OF EJS Templates
Q_SIGNALS and Q_SLOTS
sauimone -
r775:02f25710c73d
parent child
Show More
@@ -65,7 +65,7 public:
65 explicit ThemeWidget(QWidget *parent = 0);
65 explicit ThemeWidget(QWidget *parent = 0);
66 ~ThemeWidget();
66 ~ThemeWidget();
67
67
68 private slots:
68 private Q_SLOTS:
69 void updateUI();
69 void updateUI();
70
70
71 private:
71 private:
@@ -24,9 +24,9 public:
24 void setBarCategories(QStringList categories);
24 void setBarCategories(QStringList categories);
25 QStringList barCategories();
25 QStringList barCategories();
26
26
27 signals:
27 Q_SIGNALS:
28
28
29 public slots:
29 public Q_SLOTS:
30
30
31 public:
31 public:
32 QChart *m_chart;
32 QChart *m_chart;
@@ -19,13 +19,13 public:
19 explicit DeclarativePieSeries(QDeclarativeItem *parent = 0);
19 explicit DeclarativePieSeries(QDeclarativeItem *parent = 0);
20 QDeclarativeListProperty<QPieSlice> data();
20 QDeclarativeListProperty<QPieSlice> data();
21
21
22 signals:
22 Q_SIGNALS:
23
23
24 public slots:
24 public Q_SLOTS:
25 static void appendData(QDeclarativeListProperty<QPieSlice> *list,
25 static void appendData(QDeclarativeListProperty<QPieSlice> *list,
26 QPieSlice *element);
26 QPieSlice *element);
27
27
28 private slots:
28 private Q_SLOTS:
29 void setParentForSeries();
29 void setParentForSeries();
30
30
31 private:
31 private:
@@ -25,13 +25,13 public: // from QDeclarativeParserStatus
25 public:
25 public:
26 QDeclarativeListProperty<DeclarativeXyPoint> points();
26 QDeclarativeListProperty<DeclarativeXyPoint> points();
27
27
28 signals:
28 Q_SIGNALS:
29
29
30 public slots:
30 public Q_SLOTS:
31 static void appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
31 static void appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
32 DeclarativeXyPoint *element);
32 DeclarativeXyPoint *element);
33
33
34 private slots:
34 private Q_SLOTS:
35
35
36 public:
36 public:
37 QSeries::QSeriesType m_seriesType;
37 QSeries::QSeriesType m_seriesType;
@@ -30,10 +30,10 public:
30 protected:
30 protected:
31 void mousePressEvent(QGraphicsSceneMouseEvent *event);
31 void mousePressEvent(QGraphicsSceneMouseEvent *event);
32
32
33 signals:
33 Q_SIGNALS:
34 void clicked(const QPointF &point);
34 void clicked(const QPointF &point);
35
35
36 public slots:
36 public Q_SLOTS:
37 void handleUpdated();
37 void handleUpdated();
38 void handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY);
38 void handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY);
39 void handleGeometryChanged(const QRectF &size);
39 void handleGeometryChanged(const QRectF &size);
@@ -35,7 +35,7 public: // from QChartSeries
35 // void setModelMappingUpper(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical);
35 // void setModelMappingUpper(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical);
36 // void setModelMappingLower(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical);
36 // void setModelMappingLower(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical);
37
37
38 signals:
38 Q_SIGNALS:
39 void updated();
39 void updated();
40 void clicked(const QPointF &point);
40 void clicked(const QPointF &point);
41
41
@@ -48,7 +48,7 public:
48 inline QRectF geometry() const { return m_rect; }
48 inline QRectF geometry() const { return m_rect; }
49 inline QVector<qreal> layout() { return m_layoutVector; }
49 inline QVector<qreal> layout() { return m_layoutVector; }
50
50
51 public slots:
51 public Q_SLOTS:
52 void handleAxisUpdated();
52 void handleAxisUpdated();
53 void handleAxisCategoriesUpdated();
53 void handleAxisCategoriesUpdated();
54 void handleRangeChanged(qreal min , qreal max,int tickCount);
54 void handleRangeChanged(qreal min , qreal max,int tickCount);
@@ -69,7 +69,7 public:
69 void show();
69 void show();
70 void hide();
70 void hide();
71
71
72 signals:
72 Q_SIGNALS:
73 void minChanged(qreal min);
73 void minChanged(qreal min);
74 void maxChanged(qreal max);
74 void maxChanged(qreal max);
75 void rangeChanged(qreal min, qreal max);
75 void rangeChanged(qreal min, qreal max);
@@ -79,7 +79,7 signals:
79 void updated();
79 void updated();
80 void changed(qreal min, qreal max, int tickCount,bool niceNumbers);
80 void changed(qreal min, qreal max, int tickCount,bool niceNumbers);
81 //internal slot
81 //internal slot
82 public slots:
82 public Q_SLOTS:
83 void handleAxisRangeChanged(qreal min, qreal max,int count);
83 void handleAxisRangeChanged(qreal min, qreal max,int count);
84
84
85 private:
85 private:
@@ -23,7 +23,7 public:
23 int count();
23 int count();
24
24
25 //internal signal
25 //internal signal
26 signals:
26 Q_SIGNALS:
27 void updated();
27 void updated();
28
28
29 private:
29 private:
@@ -33,9 +33,7 public:
33
33
34 // TODO: Consider the domain for layoutChanged. May be use case, may not be. If it is, then the derived classes need to implement it
34 // TODO: Consider the domain for layoutChanged. May be use case, may not be. If it is, then the derived classes need to implement it
35 virtual void dataChanged(); // data of series has changed -> need to recalculate bar sizes
35 virtual void dataChanged(); // data of series has changed -> need to recalculate bar sizes
36 private slots:
37
36
38 public:
39 virtual QVector<QRectF> calculateLayout();
37 virtual QVector<QRectF> calculateLayout();
40 void applyLayout(const QVector<QRectF> &layout);
38 void applyLayout(const QVector<QRectF> &layout);
41 void setLayout(const QVector<QRectF> &layout);
39 void setLayout(const QVector<QRectF> &layout);
@@ -43,7 +41,7 public:
43
41
44 QRectF geometry() const { return m_rect;}
42 QRectF geometry() const { return m_rect;}
45
43
46 public slots:
44 public Q_SLOTS:
47 void handleModelChanged(int index);
45 void handleModelChanged(int index);
48 void handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY);
46 void handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY);
49 void handleGeometryChanged(const QRectF &size);
47 void handleGeometryChanged(const QRectF &size);
@@ -41,10 +41,10 public:
41
41
42 QString categoryName(int category);
42 QString categoryName(int category);
43
43
44 signals:
44 Q_SIGNALS:
45 void modelUpdated();
45 void modelUpdated();
46
46
47 public slots:
47 public Q_SLOTS:
48
48
49 private:
49 private:
50
50
@@ -51,7 +51,7 public:
51 BarChartModel& model();
51 BarChartModel& model();
52 // <--- TO PIMPL
52 // <--- TO PIMPL
53
53
54 signals:
54 Q_SIGNALS:
55 //void changed(int index);
55 //void changed(int index);
56 void clicked(QBarSet *barset, QString category); // Up to user of api, what to do with these signals
56 void clicked(QBarSet *barset, QString category); // Up to user of api, what to do with these signals
57 void rightClicked(QBarSet *barset, QString category);
57 void rightClicked(QBarSet *barset, QString category);
@@ -15,7 +15,7 class Chart: public QObject
15 public:
15 public:
16 explicit Chart(ChartPresenter *presenter);
16 explicit Chart(ChartPresenter *presenter);
17
17
18 public slots:
18 public Q_SLOTS:
19 virtual void handleGeometryChanged(const QRectF& rect);
19 virtual void handleGeometryChanged(const QRectF& rect);
20 virtual void handleDomainChanged(qreal minX,qreal maxX,qreal minY,qreal maxY);
20 virtual void handleDomainChanged(qreal minX,qreal maxX,qreal minY,qreal maxY);
21 virtual void rangeXChanged(qreal min, qreal max, int tickXCount);
21 virtual void rangeXChanged(qreal min, qreal max, int tickXCount);
@@ -58,14 +58,14 private:
58 void createConnections();
58 void createConnections();
59 void resetAllElements();
59 void resetAllElements();
60
60
61 public slots:
61 public Q_SLOTS:
62 void handleSeriesAdded(QSeries* series,Domain* domain);
62 void handleSeriesAdded(QSeries* series,Domain* domain);
63 void handleSeriesRemoved(QSeries* series);
63 void handleSeriesRemoved(QSeries* series);
64 void handleAxisAdded(QChartAxis* axis,Domain* domain);
64 void handleAxisAdded(QChartAxis* axis,Domain* domain);
65 void handleAxisRemoved(QChartAxis* axis);
65 void handleAxisRemoved(QChartAxis* axis);
66 void handleGeometryChanged();
66 void handleGeometryChanged();
67
67
68 signals:
68 Q_SIGNALS:
69 void geometryChanged(const QRectF& rect);
69 void geometryChanged(const QRectF& rect);
70
70
71 private:
71 private:
@@ -43,12 +43,12 public:
43 void zoomOut(const QRectF& rect, const QSizeF& size);
43 void zoomOut(const QRectF& rect, const QSizeF& size);
44 void move(int dx,int dy,const QSizeF& size);
44 void move(int dx,int dy,const QSizeF& size);
45
45
46 signals:
46 Q_SIGNALS:
47 void domainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY);
47 void domainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY);
48 void rangeXChanged(qreal min, qreal max, int tickXCount);
48 void rangeXChanged(qreal min, qreal max, int tickXCount);
49 void rangeYChanged(qreal min, qreal max, int tickYCount);
49 void rangeYChanged(qreal min, qreal max, int tickYCount);
50
50
51 public slots:
51 public Q_SLOTS:
52 void handleAxisXChanged(qreal min,qreal max,int tickXCount = 5,bool niceNumbers = false);
52 void handleAxisXChanged(qreal min,qreal max,int tickXCount = 5,bool niceNumbers = false);
53 void handleAxisYChanged(qreal min,qreal max,int tickYCount = 5,bool niceNumbers = false);
53 void handleAxisYChanged(qreal min,qreal max,int tickYCount = 5,bool niceNumbers = false);
54
54
@@ -23,10 +23,10 public:
23
23
24 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
24 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
25
25
26 signals:
26 Q_SIGNALS:
27 void clicked(QGraphicsSceneMouseEvent* event);
27 void clicked(QGraphicsSceneMouseEvent* event);
28
28
29 public slots:
29 public Q_SLOTS:
30
30
31 private:
31 private:
32
32
@@ -22,7 +22,7 public:
22 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
22 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
23 QPainterPath shape() const;
23 QPainterPath shape() const;
24
24
25 public slots:
25 public Q_SLOTS:
26 void handleUpdated();
26 void handleUpdated();
27
27
28 protected:
28 protected:
@@ -53,13 +53,13 public:
53 void setSize(const QSizeF size);
53 void setSize(const QSizeF size);
54 void setPos(const QPointF &pos);
54 void setPos(const QPointF &pos);
55
55
56 signals:
56 Q_SIGNALS:
57 // for interactions.
57 // for interactions.
58 void clicked(QSeries *series, Qt::MouseButton button);
58 void clicked(QSeries *series, Qt::MouseButton button);
59 void clicked(QBarSet *barset, Qt::MouseButton button);
59 void clicked(QBarSet *barset, Qt::MouseButton button);
60 void clicked(QPieSlice *slice, Qt::MouseButton button);
60 void clicked(QPieSlice *slice, Qt::MouseButton button);
61
61
62 public slots:
62 public Q_SLOTS:
63 // PIMPL --->
63 // PIMPL --->
64 void handleSeriesAdded(QSeries *series, Domain *domain);
64 void handleSeriesAdded(QSeries *series, Domain *domain);
65 void handleSeriesRemoved(QSeries *series);
65 void handleSeriesRemoved(QSeries *series);
@@ -27,7 +27,7 public:
27
27
28 void markerSelected(Marker *item);
28 void markerSelected(Marker *item);
29
29
30 public slots:
30 public Q_SLOTS:
31 void handleUpdated();
31 void handleUpdated();
32
32
33 private:
33 private:
@@ -34,7 +34,7 private:
34 void calculateControlPoints();
34 void calculateControlPoints();
35 QList<qreal> getFirstControlPoints(QList<qreal> rhs);
35 QList<qreal> getFirstControlPoints(QList<qreal> rhs);
36
36
37 private slots:
37 private Q_SLOTS:
38 void updateControlPoints();
38 void updateControlPoints();
39
39
40 private:
40 private:
@@ -17,7 +17,7 public:
17 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
17 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
18 QPainterPath shape() const;
18 QPainterPath shape() const;
19
19
20 public slots:
20 public Q_SLOTS:
21 void handleUpdated();
21 void handleUpdated();
22
22
23 protected:
23 protected:
@@ -45,14 +45,14 public:
45 virtual void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical);
45 virtual void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical);
46 virtual void setModelMappingShift(int first, int count = 0);
46 virtual void setModelMappingShift(int first, int count = 0);
47
47
48 private slots:
48 private Q_SLOTS:
49 void modelUpdated(QModelIndex topLeft, QModelIndex bottomRight);
49 void modelUpdated(QModelIndex topLeft, QModelIndex bottomRight);
50 void modelDataAboutToBeAdded(QModelIndex parent, int start, int end);
50 void modelDataAboutToBeAdded(QModelIndex parent, int start, int end);
51 void modelDataAdded(QModelIndex parent, int start, int end);
51 void modelDataAdded(QModelIndex parent, int start, int end);
52 void modelDataAboutToBeRemoved(QModelIndex parent, int start, int end);
52 void modelDataAboutToBeRemoved(QModelIndex parent, int start, int end);
53 void modelDataRemoved(QModelIndex parent, int start, int end);
53 void modelDataRemoved(QModelIndex parent, int start, int end);
54
54
55 signals:
55 Q_SIGNALS:
56 void clicked(const QPointF &point);
56 void clicked(const QPointF &point);
57 void updated();
57 void updated();
58 void pointReplaced(int index);
58 void pointReplaced(int index);
@@ -21,14 +21,14 public:
21 QRectF clipRect() const { return m_clipRect;}
21 QRectF clipRect() const { return m_clipRect;}
22
22
23
23
24 public slots:
24 public Q_SLOTS:
25 void handlePointAdded(int index);
25 void handlePointAdded(int index);
26 void handlePointRemoved(int index);
26 void handlePointRemoved(int index);
27 void handlePointReplaced(int index);
27 void handlePointReplaced(int index);
28 void handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY);
28 void handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY);
29 void handleGeometryChanged(const QRectF &size);
29 void handleGeometryChanged(const QRectF &size);
30
30
31 signals:
31 Q_SIGNALS:
32 void clicked(const QPointF& point);
32 void clicked(const QPointF& point);
33
33
34 protected:
34 protected:
General Comments 0
You need to be logged in to leave comments. Login now