00001 #ifndef STACKEDGRAPHWIDGET_H
00002 #define STACKEDGRAPHWIDGET_H
00003
00004 #include <QWidget>
00005 #include <QtGui>
00006 #include <QTimer>
00007 #include "ColorPushButton.h"
00008 #include "StackedGraph.h"
00009 #include "DataItem.h"
00010
00014 class StackedGraphWidget : public QWidget
00015 {
00016 Q_OBJECT
00017
00018 public:
00027 StackedGraphWidget(const QVector<DataItem>* dataPtr, const QString* unitSymbolPtr, const bool* unitAfterNumberPtr, const QVector<QString>* unitSizeNamesPtr, QWidget* parent);
00028 ~StackedGraphWidget();
00029
00030 StackedGraphWidget& operator=(const StackedGraphWidget& other);
00031
00032 StackedGraph* getStackedGraph() {return stackedGraph;}
00033
00034 public slots:
00035 void updateStackedGraph();
00036
00037 private slots:
00038 void makeImageSizeBoxText();
00039 void saveImage();
00040 void setColor1();
00041 void setColor2();
00042 void setColorScheme();
00043 void resetColorSchemeBox() {colorSchemeBox->setCurrentIndex(0);}
00044 void startXRangeSlider() {xRangeSliderTimer->start(50);}
00045 void stopXRangeSlider() {xRangeSliderTimer->stop(); xRangeSliderAction();}
00046 void xRangeSliderActionTest();
00047 void xRangeSliderAction();
00048
00049 private:
00050 StackedGraph* stackedGraph;
00051 ColorPushButton* colorpicker1;
00052 ColorPushButton* colorpicker2;
00053 QCheckBox* imageAlphaBox;
00054 QComboBox* imageSizeBox;
00055 QComboBox* baselineAlgoBox;
00056 QComboBox* sortAlgoBox;
00057 QComboBox* colorAlgoBox;
00058 QComboBox* colorSchemeBox;
00059 QSlider* xRangeSlider;
00060 QTimer* xRangeSliderTimer;
00061 };
00062
00063 #endif