##// END OF EJS Templates
Restored bar series in chartwidgettest
Restored bar series in chartwidgettest

File last commit:

r273:108ca5a00d74
r279:22961f3dbd96
Show More
barpresenterbase.h
73 lines | 1.8 KiB | text/x-c | CLexer
/ src / barchart / barpresenterbase.h
sauimone
moved presenter to private headers. code cleanup
r217 #ifndef BARPRESENTERBASE_H
#define BARPRESENTERBASE_H
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
#include "chartitem_p.h"
sauimone
model prototyping for bar chart
r159 #include "barchartmodel_p.h"
sauimone
brush support for bargroups
r183 #include <QPen>
#include <QBrush>
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 #include <QGraphicsItem>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256 class Bar;
class BarLabel;
class Separator;
sauimone
Floating values to bar charts
r263 class BarValue;
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256
// Common implemantation of different presenters. Not to be instantiated.
sauimone
Common naming convention for barcharts
r216 class BarPresenterBase : public QObject, public ChartItem
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 {
Michal Klocek
Refactored for MVP...
r139 Q_OBJECT
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 public:
sauimone
Common naming convention for barcharts
r216 BarPresenterBase(BarChartModel& model, QGraphicsItem *parent = 0);
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 void setSeparatorsVisible(bool visible = true);
sauimone
minor cleaning of unused code
r175 public:
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126
// From QGraphicsItem
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QRectF boundingRect() const;
// TODO: these may change with layout awarness.
void setBarWidth( int w );
sauimone
brush support for bargroups
r183
void setPen(QPen pen);
QPen pen();
void setBrush(QBrush brush);
QBrush brush();
sauimone
added labels to series, intergrated with test app. minor hack to test app
r167 // TODO: Consider the domain for layoutChanged. May be use case, may not be. If it is, then the derived classes need to implement it
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 virtual void dataChanged(); // data of series has changed -> need to recalculate bar sizes
virtual void layoutChanged() = 0; // layout has changed -> need to recalculate bar sizes
Michal Klocek
Refactored for MVP...
r139 protected slots:
void handleModelChanged(int index);
void handleDomainChanged(const Domain& domain);
void handleGeometryChanged(const QRectF& size);
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 protected:
sauimone
model prototyping for bar chart
r159 // TODO: consider these.
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 int mHeight; // Layout spesific
int mWidth;
int mBarDefaultWidth;
bool mLayoutSet; // True, if component has been laid out.
bool mLayoutDirty;
bool mSeparatorsVisible;
sauimone
model delegate for bar series. updated examples
r161 BarChartModel& mModel;
sauimone
model prototyping for bar chart
r159
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256 // Not owned.
QList<Bar*> mBars;
QList<BarLabel*> mLabels;
QList<Separator*> mSeparators;
sauimone
Floating values to bar charts
r263 QList<BarValue*> mFloatingValues;
sauimone
Bug fix for bar presenters. It appears that order of childItems may change. Relying on order caused crash
r256
sauimone
brush support for bargroups
r183 QPen mPen;
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 };
QTCOMMERCIALCHART_END_NAMESPACE
sauimone
moved presenter to private headers. code cleanup
r217 #endif // BARPRESENTERBASE_H