##// END OF EJS Templates
minor. add TODO comments
Michal Klocek -
r872:60ebc42c950c
parent child
Show More
@@ -122,6 +122,7 void QChart::removeAllSeries()
122 */
122 */
123 void QChart::setBackgroundBrush(const QBrush& brush)
123 void QChart::setBackgroundBrush(const QBrush& brush)
124 {
124 {
125 //TODO: refactor me
125 d_ptr->m_presenter->createChartBackgroundItem();
126 d_ptr->m_presenter->createChartBackgroundItem();
126 d_ptr->m_presenter->m_backgroundItem->setBrush(brush);
127 d_ptr->m_presenter->m_backgroundItem->setBrush(brush);
127 d_ptr->m_presenter->m_backgroundItem->update();
128 d_ptr->m_presenter->m_backgroundItem->update();
@@ -129,6 +130,7 void QChart::setBackgroundBrush(const QBrush& brush)
129
130
130 QBrush QChart::backgroundBrush() const
131 QBrush QChart::backgroundBrush() const
131 {
132 {
133 //TODO: refactor me
132 if (!d_ptr->m_presenter->m_backgroundItem) return QBrush();
134 if (!d_ptr->m_presenter->m_backgroundItem) return QBrush();
133 return (d_ptr->m_presenter->m_backgroundItem)->brush();
135 return (d_ptr->m_presenter->m_backgroundItem)->brush();
134 }
136 }
@@ -138,6 +140,7 QBrush QChart::backgroundBrush() const
138 */
140 */
139 void QChart::setBackgroundPen(const QPen& pen)
141 void QChart::setBackgroundPen(const QPen& pen)
140 {
142 {
143 //TODO: refactor me
141 d_ptr->m_presenter->createChartBackgroundItem();
144 d_ptr->m_presenter->createChartBackgroundItem();
142 d_ptr->m_presenter->m_backgroundItem->setPen(pen);
145 d_ptr->m_presenter->m_backgroundItem->setPen(pen);
143 d_ptr->m_presenter->m_backgroundItem->update();
146 d_ptr->m_presenter->m_backgroundItem->update();
@@ -145,6 +148,7 void QChart::setBackgroundPen(const QPen& pen)
145
148
146 QPen QChart::backgroundPen() const
149 QPen QChart::backgroundPen() const
147 {
150 {
151 //TODO: refactor me
148 if (!d_ptr->m_presenter->m_backgroundItem) return QPen();
152 if (!d_ptr->m_presenter->m_backgroundItem) return QPen();
149 return d_ptr->m_presenter->m_backgroundItem->pen();
153 return d_ptr->m_presenter->m_backgroundItem->pen();
150 }
154 }
@@ -154,6 +158,7 QPen QChart::backgroundPen() const
154 */
158 */
155 void QChart::setTitle(const QString& title)
159 void QChart::setTitle(const QString& title)
156 {
160 {
161 //TODO: refactor me
157 d_ptr->m_presenter->createChartTitleItem();
162 d_ptr->m_presenter->createChartTitleItem();
158 d_ptr->m_presenter->m_titleItem->setText(title);
163 d_ptr->m_presenter->m_titleItem->setText(title);
159 d_ptr->m_presenter->updateLayout();
164 d_ptr->m_presenter->updateLayout();
@@ -164,6 +169,7 void QChart::setTitle(const QString& title)
164 */
169 */
165 QString QChart::title() const
170 QString QChart::title() const
166 {
171 {
172 //TODO: refactor me
167 if (d_ptr->m_presenter->m_titleItem)
173 if (d_ptr->m_presenter->m_titleItem)
168 return d_ptr->m_presenter->m_titleItem->text();
174 return d_ptr->m_presenter->m_titleItem->text();
169 else
175 else
@@ -175,6 +181,7 QString QChart::title() const
175 */
181 */
176 void QChart::setTitleFont(const QFont& font)
182 void QChart::setTitleFont(const QFont& font)
177 {
183 {
184 //TODO: refactor me
178 d_ptr->m_presenter->createChartTitleItem();
185 d_ptr->m_presenter->createChartTitleItem();
179 d_ptr->m_presenter->m_titleItem->setFont(font);
186 d_ptr->m_presenter->m_titleItem->setFont(font);
180 d_ptr->m_presenter->updateLayout();
187 d_ptr->m_presenter->updateLayout();
@@ -185,6 +192,7 void QChart::setTitleFont(const QFont& font)
185 */
192 */
186 void QChart::setTitleBrush(const QBrush &brush)
193 void QChart::setTitleBrush(const QBrush &brush)
187 {
194 {
195 //TODO: refactor me
188 d_ptr->m_presenter->createChartTitleItem();
196 d_ptr->m_presenter->createChartTitleItem();
189 d_ptr->m_presenter->m_titleItem->setBrush(brush);
197 d_ptr->m_presenter->m_titleItem->setBrush(brush);
190 d_ptr->m_presenter->updateLayout();
198 d_ptr->m_presenter->updateLayout();
@@ -195,6 +203,7 void QChart::setTitleBrush(const QBrush &brush)
195 */
203 */
196 QBrush QChart::titleBrush() const
204 QBrush QChart::titleBrush() const
197 {
205 {
206 //TODO: refactor me
198 if (!d_ptr->m_presenter->m_titleItem) return QBrush();
207 if (!d_ptr->m_presenter->m_titleItem) return QBrush();
199 return d_ptr->m_presenter->m_titleItem->brush();
208 return d_ptr->m_presenter->m_titleItem->brush();
200 }
209 }
@@ -320,12 +329,14 void QChart::scrollDown()
320
329
321 void QChart::setBackgroundVisible(bool visible)
330 void QChart::setBackgroundVisible(bool visible)
322 {
331 {
332 //TODO: refactor me
323 d_ptr->m_presenter->createChartBackgroundItem();
333 d_ptr->m_presenter->createChartBackgroundItem();
324 d_ptr->m_presenter->m_backgroundItem->setVisible(visible);
334 d_ptr->m_presenter->m_backgroundItem->setVisible(visible);
325 }
335 }
326
336
327 bool QChart::isBackgroundVisible() const
337 bool QChart::isBackgroundVisible() const
328 {
338 {
339 //TODO: refactor me
329 if (!d_ptr->m_presenter->m_backgroundItem) return false;
340 if (!d_ptr->m_presenter->m_backgroundItem) return false;
330 return d_ptr->m_presenter->m_backgroundItem->isVisible();
341 return d_ptr->m_presenter->m_backgroundItem->isVisible();
331 }
342 }
General Comments 0
You need to be logged in to leave comments. Login now