##// END OF EJS Templates
A few more warnings removed from examples
Tero Ahola -
r613:36ecec1e9bf9
parent child
Show More
@@ -86,7 +86,7 Widget::Widget(QWidget *parent)
86 }
86 }
87
87
88 // hide axis X labels
88 // hide axis X labels
89 QChartAxis* axis = chartArea->axisX();
89 //QChartAxis* axis = chartArea->axisX();
90 // axis->
90 // axis->
91 // axis->setLabelsVisible(false);
91 // axis->setLabelsVisible(false);
92 // newAxis.setLabelsOrientation(QChartAxis::LabelsOrientationSlide);
92 // newAxis.setLabelsOrientation(QChartAxis::LabelsOrientationSlide);
@@ -55,6 +55,7 public:
55 public Q_SLOTS:
55 public Q_SLOTS:
56 void handleRightClick(QBarSet *barset, QString category)
56 void handleRightClick(QBarSet *barset, QString category)
57 {
57 {
58 Q_UNUSED(barset)
58 DrilldownBarSeries* series = static_cast<DrilldownBarSeries*> (sender());
59 DrilldownBarSeries* series = static_cast<DrilldownBarSeries*> (sender());
59 changeSeries(series->drilldownSeries(category));
60 changeSeries(series->drilldownSeries(category));
60 }
61 }
@@ -19,11 +19,13 CustomTableModel::CustomTableModel(QObject *parent) :
19
19
20 int CustomTableModel::rowCount(const QModelIndex & parent) const
20 int CustomTableModel::rowCount(const QModelIndex & parent) const
21 {
21 {
22 Q_UNUSED(parent)
22 return m_points.count();
23 return m_points.count();
23 }
24 }
24
25
25 int CustomTableModel::columnCount(const QModelIndex & parent) const
26 int CustomTableModel::columnCount(const QModelIndex & parent) const
26 {
27 {
28 Q_UNUSED(parent)
27 return 3;
29 return 3;
28 }
30 }
29
31
@@ -63,7 +65,7 QVariant CustomTableModel::data(const QModelIndex & index, int role) const
63 case 2:
65 case 2:
64 return m_labels[index.row()];
66 return m_labels[index.row()];
65 default:
67 default:
66 return QVariant();
68 break;
67 }
69 }
68 }
70 }
69 else if (role == Qt::EditRole)
71 else if (role == Qt::EditRole)
@@ -77,9 +79,10 QVariant CustomTableModel::data(const QModelIndex & index, int role) const
77 case 2:
79 case 2:
78 return m_labels[index.row()];
80 return m_labels[index.row()];
79 default:
81 default:
80 return QVariant();
82 break;
81 }
83 }
82 }
84 }
85 return QVariant();
83 }
86 }
84
87
85 bool CustomTableModel::setData ( const QModelIndex & index, const QVariant & value, int role)
88 bool CustomTableModel::setData ( const QModelIndex & index, const QVariant & value, int role)
@@ -115,6 +118,8 Qt::ItemFlags CustomTableModel::flags ( const QModelIndex & index ) const
115
118
116 bool CustomTableModel::insertRows ( int row, int count, const QModelIndex & parent)
119 bool CustomTableModel::insertRows ( int row, int count, const QModelIndex & parent)
117 {
120 {
121 Q_UNUSED(parent)
122
118 if (row < 0)
123 if (row < 0)
119 row = 0;
124 row = 0;
120 beginInsertRows(QModelIndex(), row /*dataTable.count()*/, row + count - 1);
125 beginInsertRows(QModelIndex(), row /*dataTable.count()*/, row + count - 1);
General Comments 0
You need to be logged in to leave comments. Login now