00001 #ifndef CENTRALWIDGET_H
00002 #define CENTRALWIDGET_H
00003
00004 #include <QWidget>
00005 #include <string>
00006 #include "StackedGraphWidget.h"
00007 #include "DataItem.h"
00008
00012 class CentralWidget : public QWidget
00013 {
00014 Q_OBJECT
00015
00016 public:
00017 CentralWidget(QWidget* parent);
00018 ~CentralWidget();
00019 void loadData(const QString& filePath);
00020 bool hasGLAA() {return stackedGraphWidget->getStackedGraph()->getView()->hasGLAA();}
00021
00022 public slots:
00027 void setGLViewport(bool openGL);
00032 void setAutoGLViewport(bool autoGL);
00037 void setDetailedInformation(bool detailInfo);
00042 void toggleCompareGraph(bool compareGraph);
00043
00044 private:
00050 void cleanString(std::string& text, const char charToDelete);
00057 DataItemPart stringToDataItemPart(std::string text, const char dataDelimiter);
00062 void linearInterpolate(QVector<DataItemPart>& items);
00063
00064 QVector<DataItem> data;
00065 QString unitSymbol;
00066 bool unitAfterNumber;
00067 QVector<QString> unitSizeNames;
00068 StackedGraphWidget* stackedGraphWidget;
00069 StackedGraphWidget* stackedGraphWidgetCompare;
00070 };
00071
00072 #endif