##// END OF EJS Templates
Warnings are errors, fixed one in barvalue.cpp
Warnings are errors, fixed one in barvalue.cpp

File last commit:

r816:75470b1f1776
r816:75470b1f1776
Show More
barvalue.cpp
89 lines | 2.0 KiB | text/x-c | CppLexer
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
** Copyright (C) 2012 Digia Plc
** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
** This file is part of the Qt Commercial Charts Add-on.
**
** $QT_BEGIN_LICENSE$
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** contact form at http://qt.digia.com
** $QT_END_LICENSE$
**
****************************************************************************/
sauimone
Floating values to bar charts
r263 #include "barvalue_p.h"
#include <QPainter>
#include <QPen>
sauimone
simple text item for barvalue
r811 #include <QGraphicsSimpleTextItem>
sauimone
Floating values to bar charts
r263
QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
simple text item for barvalue
r811 BarValue::BarValue(QBarSet &set, QGraphicsItem *parent) : QGraphicsObject(parent),
sauimone
minor code review fixes, part n
r763 m_barSet(set),
sauimone
simple text item for barvalue
r811 m_textItem(new QGraphicsSimpleTextItem(this))
sauimone
Floating values to bar charts
r263 {
sauimone
values visibility handling changed in barchart
r813 // connect(&set,SIGNAL(valuesVisibleChanged(bool)),value,SLOT(valuesVisibleChanged(bool)));
sauimone
floating values working now. bounding rect bug fixed
r273 setVisible(false);
sauimone
Floating values to bar charts
r263 }
sauimone
const to getters, renamed addBarset to appendBarset
r776 void BarValue::setText(QString str)
sauimone
Floating values to bar charts
r263 {
sauimone
simple text item for barvalue
r811 m_textItem->setText(str);
sauimone
Floating values to bar charts
r263 }
sauimone
const to getters, renamed addBarset to appendBarset
r776 QString BarValue::text() const
sauimone
Floating values to bar charts
r263 {
sauimone
simple text item for barvalue
r811 return m_textItem->text();
sauimone
Floating values to bar charts
r263 }
sauimone
const to getters, renamed addBarset to appendBarset
r776 void BarValue::setPen(const QPen &pen)
sauimone
Floating values to bar charts
r263 {
sauimone
simple text item for barvalue
r811 m_textItem->setPen(pen);
sauimone
Floating values to bar charts
r263 }
sauimone
Fixed layout for barcharts
r473 QPen BarValue::pen() const
sauimone
Floating values to bar charts
r263 {
sauimone
simple text item for barvalue
r811 return m_textItem->pen();
sauimone
Floating values to bar charts
r263 }
sauimone
simple text item for barvalue
r811 void BarValue::setFont(const QFont &font)
sauimone
Floating values to bar charts
r263 {
sauimone
simple text item for barvalue
r811 m_textItem->setFont(font);
}
QFont BarValue::font() const
{
return m_textItem->font();
sauimone
Floating values to bar charts
r263 }
void BarValue::setPos(qreal x, qreal y)
{
sauimone
simple text item for barvalue
r811 m_textItem->setPos(x,y);
sauimone
Floating values to bar charts
r263 }
void BarValue::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Tero Ahola
Warnings are errors, fixed one in barvalue.cpp
r816 Q_UNUSED(painter)
Tero Ahola
Squashed bunch of warnings
r611 Q_UNUSED(option)
Q_UNUSED(widget)
sauimone
Floating values to bar charts
r263 }
QRectF BarValue::boundingRect() const
{
sauimone
simple text item for barvalue
r811 return m_textItem->boundingRect();
sauimone
Floating values to bar charts
r263 }
sauimone
values visibility handling changed in barchart
r813 void BarValue::valuesVisibleChanged(bool visible)
sauimone
floating values working now. bounding rect bug fixed
r273 {
sauimone
values visibility handling changed in barchart
r813 setVisible(visible);
sauimone
floating values working now. bounding rect bug fixed
r273 }
sauimone
Floating values to bar charts
r263
sauimone
floating values working now. bounding rect bug fixed
r273 #include "moc_barvalue_p.cpp"
sauimone
Floating values to bar charts
r263 QTCOMMERCIALCHART_END_NAMESPACE