##// END OF EJS Templates
Fixed regression in declarative impl
Fixed regression in declarative impl

File last commit:

r167:023d2c8150a8
r168:23b5a494bf5a
Show More
bargroupbase.h
62 lines | 1.9 KiB | text/x-c | CLexer
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 #ifndef BARGROUPBASE_H
#define BARGROUPBASE_H
#include "chartitem_p.h"
#include "barchartseriesbase.h"
sauimone
model prototyping for bar chart
r159 #include "barchartmodel_p.h"
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 #include <QGraphicsItem>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
// Base Class for bar groups. Common implemantation of different groups. Not to be instantiated.
Michal Klocek
Refactored for MVP...
r139 class BarGroupBase : 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:
BarGroupBase(BarChartSeriesBase& series, QGraphicsItem *parent = 0);
void setSeparatorsVisible(bool visible = true);
public: // From ChartItem
sauimone
added labels to series, intergrated with test app. minor hack to test app
r167 // void setSize(const QSizeF &size){};
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 );
int addColor( QColor color );
void resetColors();
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
added labels to series, intergrated with test app. minor hack to test app
r167 //int mMin; // Min and max values of data. (updated when data is changed, used when drawing)
//int mMax;
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;
QList<QColor> mColors; // List of colors for series for now
bool mSeparatorsVisible;
sauimone
model delegate for bar series. updated examples
r161 BarChartModel& mModel;
sauimone
added labels to series, intergrated with test app. minor hack to test app
r167 BarChartSeriesBase& mSeries;
sauimone
model prototyping for bar chart
r159
sauimone
refactored barcharts. layout to derived classess other funtionality to base class
r126 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BARGROUPBASE_H