Go to the documentation of this file.00001
00002
00003
00004
00005
00008
00009 #ifndef lgrDataViewComponent_H_
00010 #define lgrDataViewComponent_H_
00011
00012 #include "lgrGui.h"
00013 #include "lgrGuiComponent.h"
00014 #include "lgrDataViewSet.h"
00015
00016 #include <lgrEditorInterface.h>
00017
00018 class DtMutex;
00019
00020 namespace MAKLogger
00021 {
00022 class DtLgrGuiModel;
00023 class DtProgressiveLineGraph;
00024
00025 class DT_DLL_LGRGUI DtLgrDataViewComponent : public DtLgrGuiComponent
00026 {
00027 Q_OBJECT
00028 public:
00029
00031 DtLgrDataViewComponent(DtLgrGuiModel& model);
00032
00034 virtual ~DtLgrDataViewComponent();
00035
00037 virtual void update();
00038
00043 virtual double updateTime();
00044
00046 virtual QWidget* initialize(QWidget* parent);
00047
00049 virtual void activate();
00050
00052 virtual void deactivate();
00053
00057 virtual DtLgrZoomableWidget* zoomComponent();
00058
00060 virtual void updateExportData(DtLgrDataViewSetSP set);
00061
00063 virtual void addRunningData(const DtLgrDataViewSet& set);
00064
00066 virtual DtLgrDataViewSetSP getExportData();
00067
00070 virtual bool getRunningData(DtLgrDataViewSet& outputSet);
00071
00072 public slots:
00073 virtual void reloadFile();
00074
00075 virtual void reloadFile(const DtLgrEditorInterface::FileDataOperations& fileOp );
00076
00077 virtual void syncData();
00078 virtual void syncRunningData(DtLgrGuiModel&);
00079
00080 protected:
00081
00083 void toggleRunningData(const bool& running);
00084
00087 void updateCurrentSet(const DtString& exportType);
00088
00090 virtual double updateGraph( const DtLgrDataViewSet& aSet,double firstVisibleTime,
00091 double lastVisibleTime);
00092
00094 void cancelUpdateCurrentSet(const DtString& exportType);
00095
00096
00098 void playbackFileChangedCallback(const DtString& filename);
00099
00100 DtLgrGuiModel* myModel;
00101
00102 DtProgressiveLineGraph* myGraph;
00103 QWidget* myMainWidget;
00104 DtMutex* myDataMutex;
00105 DtMutex* myRunningMutex;
00106
00107 bool myDataOutOfSyncFlag;
00108 bool myWaitingForDataFlag;
00109 bool myActivatedFlag;
00110
00111 static const int Graph_Updates = 0;
00112 static const int Graph_Interactions = 1;
00113 static const int Graph_Checkpoints = 2;
00114
00115
00116 DtAbsoluteTime myLastGraphTime;
00117
00118 protected:
00119
00120
00121 DtLgrDataViewSetSP myExportedDataSet;
00122 DtLgrDataViewSet* myRunningDataSet;
00123 DtLgrDataViewSet* myCompleteDataSet;
00124 };
00125
00126 }
00127
00128 #endif
00129