@@ -0,0 +1,83 | |||||
|
1 | #include "qlopdatabase.h" | |||
|
2 | ||||
|
3 | QList<QLopData*>* QLopDataBase::m_dataBase=NULL; | |||
|
4 | QLopDataBase* QLopDataBase::_self=NULL; | |||
|
5 | ||||
|
6 | #define INIT() \ | |||
|
7 | if(Q_UNLIKELY(_self==NULL))\ | |||
|
8 | {\ | |||
|
9 | init();\ | |||
|
10 | } | |||
|
11 | ||||
|
12 | QLopDataBase::QLopDataBase(QObject *parent) : QObject(parent) | |||
|
13 | { | |||
|
14 | this->m_dataBase = new QList<QLopData*>(); | |||
|
15 | } | |||
|
16 | ||||
|
17 | QLopDataBase::~QLopDataBase() | |||
|
18 | { | |||
|
19 | ||||
|
20 | } | |||
|
21 | ||||
|
22 | void QLopDataBase::init() | |||
|
23 | { | |||
|
24 | _self=new QLopDataBase(); | |||
|
25 | } | |||
|
26 | ||||
|
27 | int QLopDataBase::addData(QLopData *data) | |||
|
28 | { | |||
|
29 | INIT(); | |||
|
30 | if(!m_dataBase->contains(data)) | |||
|
31 | { | |||
|
32 | m_dataBase->append(data); | |||
|
33 | return 1; | |||
|
34 | } | |||
|
35 | return 0; | |||
|
36 | } | |||
|
37 | ||||
|
38 | int QLopDataBase::addData(const QLopDataList& data) | |||
|
39 | { | |||
|
40 | INIT(); | |||
|
41 | int addedData=0; | |||
|
42 | for (int i = 0; i < data.count(); i++) | |||
|
43 | { | |||
|
44 | addedData += addData(data.at(i)); | |||
|
45 | } | |||
|
46 | return addedData; | |||
|
47 | } | |||
|
48 | ||||
|
49 | QLopDataBase *QLopDataBase::self() | |||
|
50 | { | |||
|
51 | INIT(); | |||
|
52 | return _self; | |||
|
53 | } | |||
|
54 | ||||
|
55 | int QLopDataBase::count() | |||
|
56 | { | |||
|
57 | return m_dataBase->count(); | |||
|
58 | } | |||
|
59 | ||||
|
60 | QLopData *QLopDataBase::getData(const QString &name) | |||
|
61 | { | |||
|
62 | for (int i = 0; i < m_dataBase->count(); i++) | |||
|
63 | { | |||
|
64 | if(Q_UNLIKELY(m_dataBase->at(i)->name==name)) | |||
|
65 | { | |||
|
66 | return m_dataBase->at(i); | |||
|
67 | } | |||
|
68 | } | |||
|
69 | return NULL; | |||
|
70 | } | |||
|
71 | ||||
|
72 | QLopData *QLopDataBase::getData(int ID) | |||
|
73 | { | |||
|
74 | for (int i = 0; i < m_dataBase->count(); i++) | |||
|
75 | { | |||
|
76 | if(Q_UNLIKELY(m_dataBase->at(i)->ID==ID)) | |||
|
77 | { | |||
|
78 | return m_dataBase->at(i); | |||
|
79 | } | |||
|
80 | } | |||
|
81 | return NULL; | |||
|
82 | } | |||
|
83 |
@@ -0,0 +1,29 | |||||
|
1 | #ifndef QLOPDATABASE_H | |||
|
2 | #define QLOPDATABASE_H | |||
|
3 | ||||
|
4 | #include <QObject> | |||
|
5 | #include <qlopdata.h> | |||
|
6 | #include <QList> | |||
|
7 | ||||
|
8 | class QLopDataBase : public QObject | |||
|
9 | { | |||
|
10 | Q_OBJECT | |||
|
11 | explicit QLopDataBase(QObject *parent = 0); | |||
|
12 | ~QLopDataBase(); | |||
|
13 | static QLopDataBase* _self; | |||
|
14 | public: | |||
|
15 | static void init(); | |||
|
16 | static int addData(QLopData* data); | |||
|
17 | static int addData(const QLopDataList &data); | |||
|
18 | static QLopDataBase* self(); | |||
|
19 | static int count(); | |||
|
20 | static QLopData* getData(const QString& name); | |||
|
21 | static QLopData* getData(int ID); | |||
|
22 | signals: | |||
|
23 | ||||
|
24 | public slots: | |||
|
25 | private: | |||
|
26 | static QList<QLopData*>* m_dataBase; | |||
|
27 | }; | |||
|
28 | ||||
|
29 | #endif // QLOPDATABASE_H |
@@ -53,7 +53,8 SOURCES += src/main.cpp\ | |||||
53 | src/QCustomPlot/qcpdocumentobject.cpp \ |
|
53 | src/QCustomPlot/qcpdocumentobject.cpp \ | |
54 | src/Core/Widgets/filebrowser.cpp \ |
|
54 | src/Core/Widgets/filebrowser.cpp \ | |
55 | src/Core/Widgets/filesystemmodel.cpp \ |
|
55 | src/Core/Widgets/filesystemmodel.cpp \ | |
56 | src/Core/Widgets/qcustomplotvect.cpp |
|
56 | src/Core/Widgets/qcustomplotvect.cpp \ | |
|
57 | src/Core/qlopdatabase.cpp | |||
57 |
|
58 | |||
58 | HEADERS += src/mainwindow.h \ |
|
59 | HEADERS += src/mainwindow.h \ | |
59 | src/SocExplorerPlot.h \ |
|
60 | src/SocExplorerPlot.h \ | |
@@ -81,7 +82,8 HEADERS += src/mainwindow.h \ | |||||
81 | src/QCustomPlot/qcpdocumentobject.h \ |
|
82 | src/QCustomPlot/qcpdocumentobject.h \ | |
82 | src/Core/Widgets/filebrowser.h \ |
|
83 | src/Core/Widgets/filebrowser.h \ | |
83 | src/Core/Widgets/filesystemmodel.h \ |
|
84 | src/Core/Widgets/filesystemmodel.h \ | |
84 | src/Core/Widgets/qcustomplotvect.h |
|
85 | src/Core/Widgets/qcustomplotvect.h \ | |
|
86 | src/Core/qlopdatabase.h | |||
85 |
|
87 | |||
86 | FORMS += src/mainwindow.ui \ |
|
88 | FORMS += src/mainwindow.ui \ | |
87 | src/Core/Widgets/downloadhistory.ui \ |
|
89 | src/Core/Widgets/downloadhistory.ui \ |
@@ -203,9 +203,9 void CassiniDataFile::readFile() | |||||
203 | QVector<QCPData> *ch2=new QVector<QCPData>(lineCnt); |
|
203 | QVector<QCPData> *ch2=new QVector<QCPData>(lineCnt); | |
204 | QVector<QCPData> *ch3=new QVector<QCPData>(lineCnt); |
|
204 | QVector<QCPData> *ch3=new QVector<QCPData>(lineCnt); | |
205 | QLopDataList data; |
|
205 | QLopDataList data; | |
206 | QLopData* ch1V=new QLopData(); |
|
206 | QLopDataVector* ch1V=new QLopDataVector(); | |
207 | QLopData* ch2V=new QLopData(); |
|
207 | QLopDataVector* ch2V=new QLopDataVector(); | |
208 | QLopData* ch3V=new QLopData(); |
|
208 | QLopDataVector* ch3V=new QLopDataVector(); | |
209 | ch1V->data=ch1; |
|
209 | ch1V->data=ch1; | |
210 | ch2V->data=ch2; |
|
210 | ch2V->data=ch2; | |
211 | ch3V->data=ch3; |
|
211 | ch3V->data=ch3; | |
@@ -281,9 +281,9 void CassiniDataFile::writeFile() | |||||
281 | { |
|
281 | { | |
282 | if(m_data.count()==3) |
|
282 | if(m_data.count()==3) | |
283 | { |
|
283 | { | |
284 | QLopData* ch1V=m_data.at(0); |
|
284 | QLopDataVector* ch1V=(QLopDataVector*)m_data.at(0); | |
285 | QLopData* ch2V=m_data.at(1); |
|
285 | QLopDataVector* ch2V=(QLopDataVector*)m_data.at(1); | |
286 | QLopData* ch3V=m_data.at(2); |
|
286 | QLopDataVector* ch3V=(QLopDataVector*)m_data.at(2); | |
287 | if(ch1V->data->count()==ch2V->data->count() && ch1V->data->count()==ch3V->data->count()) |
|
287 | if(ch1V->data->count()==ch2V->data->count() && ch1V->data->count()==ch3V->data->count()) | |
288 | { |
|
288 | { | |
289 | for(int i=0;i<ch1V->data->count();i++) |
|
289 | for(int i=0;i<ch1V->data->count();i++) |
@@ -154,7 +154,7 void CassiniTools::export_view(int PID) | |||||
154 | QLopDataList vectors; |
|
154 | QLopDataList vectors; | |
155 | for(int i=0;i<plot->graphCount();i++) |
|
155 | for(int i=0;i<plot->graphCount();i++) | |
156 | { |
|
156 | { | |
157 | QLopData* vect = new QLopData(); |
|
157 | QLopDataVector* vect = new QLopDataVector(); | |
158 | vect->data = plot->getVisibleData(i); |
|
158 | vect->data = plot->getVisibleData(i); | |
159 | vectors.append(vect); |
|
159 | vectors.append(vect); | |
160 | } |
|
160 | } | |
@@ -175,7 +175,7 void CassiniTools::export_view_Predefine | |||||
175 | QLopDataList vectors; |
|
175 | QLopDataList vectors; | |
176 | for(int i=0;i<plot->graphCount();i++) |
|
176 | for(int i=0;i<plot->graphCount();i++) | |
177 | { |
|
177 | { | |
178 | QLopData* vect = new QLopData(); |
|
178 | QLopDataVector* vect = new QLopDataVector(); | |
179 | vect->data = plot->getVisibleData(i); |
|
179 | vect->data = plot->getVisibleData(i); | |
180 | vectors.append(vect); |
|
180 | vectors.append(vect); | |
181 | } |
|
181 | } | |
@@ -196,16 +196,16 void CassiniTools::compute_fft_on_view(i | |||||
196 | QLopDataList vectors; |
|
196 | QLopDataList vectors; | |
197 | for(int i=0;i<plot->graphCount();i++) |
|
197 | for(int i=0;i<plot->graphCount();i++) | |
198 | { |
|
198 | { | |
199 | QLopData* vect = new QLopData(); |
|
199 | QLopDataVector* vect = new QLopDataVector(); | |
200 | vect->data = plot->getVisibleData(i); |
|
200 | vect->data = plot->getVisibleData(i); | |
201 | vectors.append(vect); |
|
201 | vectors.append(vect); | |
202 | } |
|
202 | } | |
203 | if(vectors.count()==3) |
|
203 | if(vectors.count()==3) | |
204 | { |
|
204 | { | |
205 | QLopData* ch1V=vectors.at(0); |
|
205 | QLopDataVector* ch1V=(QLopDataVector*)vectors.at(0); | |
206 | QLopData* ch2V=vectors.at(1); |
|
206 | QLopDataVector* ch2V=(QLopDataVector*)vectors.at(1); | |
207 | QLopData* ch3V=vectors.at(2); |
|
207 | QLopDataVector* ch3V=(QLopDataVector*)vectors.at(2); | |
208 | QLopData* FFTout=new QLopData(); |
|
208 | QLopDataVector* FFTout=new QLopDataVector(); | |
209 | if(ch1V->data->count()==ch2V->data->count() && ch1V->data->count()==ch3V->data->count()) |
|
209 | if(ch1V->data->count()==ch2V->data->count() && ch1V->data->count()==ch3V->data->count()) | |
210 | { |
|
210 | { | |
211 |
|
211 | |||
@@ -297,7 +297,7 void CassiniTools::dataReady(QLopDataLis | |||||
297 | pen.setColor(QLopColours[i%QLopColoursCount]); |
|
297 | pen.setColor(QLopColours[i%QLopColoursCount]); | |
298 | plot->setGraphPen(i,pen); |
|
298 | plot->setGraphPen(i,pen); | |
299 | plot->setGraphName(i,data.at(i)->name+"("+data.at(i)->unit+")"); |
|
299 | plot->setGraphName(i,data.at(i)->name+"("+data.at(i)->unit+")"); | |
300 | plot->setGraphData(i,data.at(i)->data,false); |
|
300 | plot->setGraphData(i,((QLopDataVector*)data.at(i))->data,false); | |
301 | } |
|
301 | } | |
302 | plot->rescaleAxis(); |
|
302 | plot->rescaleAxis(); | |
303 | plot->replot(); |
|
303 | plot->replot(); |
@@ -46,6 +46,11 | |||||
46 | <layout class="QGridLayout" name="gridLayout_4"> |
|
46 | <layout class="QGridLayout" name="gridLayout_4"> | |
47 | <item row="0" column="1"> |
|
47 | <item row="0" column="1"> | |
48 | <widget class="QPushButton" name="addFolderViewQpb"> |
|
48 | <widget class="QPushButton" name="addFolderViewQpb"> | |
|
49 | <property name="font"> | |||
|
50 | <font> | |||
|
51 | <pointsize>7</pointsize> | |||
|
52 | </font> | |||
|
53 | </property> | |||
49 | <property name="text"> |
|
54 | <property name="text"> | |
50 | <string/> |
|
55 | <string/> | |
51 | </property> |
|
56 | </property> | |
@@ -53,6 +58,12 | |||||
53 | <iconset resource="../../resources/qlop.qrc"> |
|
58 | <iconset resource="../../resources/qlop.qrc"> | |
54 | <normaloff>:/img/Gnome-list-add.svg</normaloff>:/img/Gnome-list-add.svg</iconset> |
|
59 | <normaloff>:/img/Gnome-list-add.svg</normaloff>:/img/Gnome-list-add.svg</iconset> | |
55 | </property> |
|
60 | </property> | |
|
61 | <property name="iconSize"> | |||
|
62 | <size> | |||
|
63 | <width>16</width> | |||
|
64 | <height>16</height> | |||
|
65 | </size> | |||
|
66 | </property> | |||
56 | <property name="flat"> |
|
67 | <property name="flat"> | |
57 | <bool>false</bool> |
|
68 | <bool>false</bool> | |
58 | </property> |
|
69 | </property> | |
@@ -66,7 +77,7 | |||||
66 | <property name="sizeHint" stdset="0"> |
|
77 | <property name="sizeHint" stdset="0"> | |
67 | <size> |
|
78 | <size> | |
68 | <width>40</width> |
|
79 | <width>40</width> | |
69 |
<height> |
|
80 | <height>8</height> | |
70 | </size> |
|
81 | </size> | |
71 | </property> |
|
82 | </property> | |
72 | </spacer> |
|
83 | </spacer> |
@@ -29,6 +29,7 FileBrowser::FileBrowser(QWidget *parent | |||||
29 | QDockWidget(parent), |
|
29 | QDockWidget(parent), | |
30 | ui(new Ui::FileBrowser) |
|
30 | ui(new Ui::FileBrowser) | |
31 | { |
|
31 | { | |
|
32 | this->doubleClickEater = new DoubleClickEater(); | |||
32 | ui->setupUi(this); |
|
33 | ui->setupUi(this); | |
33 | this->model = new FileSystemModel(this); |
|
34 | this->model = new FileSystemModel(this); | |
34 | this->model->setRootPath(QDir::currentPath()); |
|
35 | this->model->setRootPath(QDir::currentPath()); | |
@@ -38,6 +39,7 FileBrowser::FileBrowser(QWidget *parent | |||||
38 | this->cd(model->rootPath()); |
|
39 | this->cd(model->rootPath()); | |
39 | connect(this->view,SIGNAL(clicked(QModelIndex)),this,SLOT(clicked(QModelIndex))); |
|
40 | connect(this->view,SIGNAL(clicked(QModelIndex)),this,SLOT(clicked(QModelIndex))); | |
40 | connect(this->view,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClicked(QModelIndex))); |
|
41 | connect(this->view,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(doubleClicked(QModelIndex))); | |
|
42 | connect(this->view,SIGNAL(activated(QModelIndex)),this,SLOT(activated(QModelIndex))); | |||
41 | connect(this->ui->ListViewQpb,SIGNAL(clicked()),this,SLOT(changeToListView())); |
|
43 | connect(this->ui->ListViewQpb,SIGNAL(clicked()),this,SLOT(changeToListView())); | |
42 | connect(this->ui->TreeViewQpb,SIGNAL(clicked()),this,SLOT(changeToTreeView())); |
|
44 | connect(this->ui->TreeViewQpb,SIGNAL(clicked()),this,SLOT(changeToTreeView())); | |
43 | connect(this->ui->parentDirQpb,SIGNAL(clicked()),this,SLOT(parentDir())); |
|
45 | connect(this->ui->parentDirQpb,SIGNAL(clicked()),this,SLOT(parentDir())); | |
@@ -49,6 +51,9 FileBrowser::FileBrowser(QWidget *parent | |||||
49 | this->pathCompleter = new QCompleter(this->model,this); |
|
51 | this->pathCompleter = new QCompleter(this->model,this); | |
50 | this->ui->pathLineEdit->setCompleter(pathCompleter); |
|
52 | this->ui->pathLineEdit->setCompleter(pathCompleter); | |
51 | this->pathLineEditEnterEditMode(false); |
|
53 | this->pathLineEditEnterEditMode(false); | |
|
54 | this->setFocusPolicy(Qt::StrongFocus); | |||
|
55 | this->ui->pathLineEdit->installEventFilter(this->doubleClickEater); | |||
|
56 | connect(this->doubleClickEater,SIGNAL(doubleClicked()),this,SLOT(pathLineEditDblClicked())); | |||
52 | } |
|
57 | } | |
53 |
|
58 | |||
54 | FileBrowser::~FileBrowser() |
|
59 | FileBrowser::~FileBrowser() | |
@@ -115,6 +120,11 void FileBrowser::doubleClicked(QModelIn | |||||
115 | } |
|
120 | } | |
116 | } |
|
121 | } | |
117 |
|
122 | |||
|
123 | void FileBrowser::activated(const QModelIndex &index) | |||
|
124 | { | |||
|
125 | doubleClicked(index); | |||
|
126 | } | |||
|
127 | ||||
118 | void FileBrowser::parentDir() |
|
128 | void FileBrowser::parentDir() | |
119 | { |
|
129 | { | |
120 | this->cd(model->rootPath()+"/.."); |
|
130 | this->cd(model->rootPath()+"/.."); | |
@@ -127,6 +137,12 void FileBrowser::cd(const QString &newP | |||||
127 | this->ui->pathLineEdit->setText(model->rootPath()); |
|
137 | this->ui->pathLineEdit->setText(model->rootPath()); | |
128 | } |
|
138 | } | |
129 |
|
139 | |||
|
140 | void FileBrowser::pathLineEditDblClicked() | |||
|
141 | { | |||
|
142 | if(this->ui->pathLineEdit->isReadOnly()) | |||
|
143 | pathLineEditEnterEditMode(true); | |||
|
144 | } | |||
|
145 | ||||
130 |
|
146 | |||
131 | void FileBrowser::changeEvent(QEvent *e) |
|
147 | void FileBrowser::changeEvent(QEvent *e) | |
132 | { |
|
148 | { | |
@@ -152,11 +168,20 void FileBrowser::keyPressEvent(QKeyEven | |||||
152 | } |
|
168 | } | |
153 | break; |
|
169 | break; | |
154 | case Qt::Key_Return: |
|
170 | case Qt::Key_Return: | |
155 | pathLineEditEnterEditMode(false); |
|
171 | if(!this->view->hasFocus()) | |
156 | if(QFile::exists(this->ui->pathLineEdit->text())) |
|
|||
157 | { |
|
172 | { | |
158 |
|
|
173 | if(QFile::exists(this->ui->pathLineEdit->text())) | |
159 |
|
|
174 | { | |
|
175 | this->cd(this->ui->pathLineEdit->text()); | |||
|
176 | e->accept(); | |||
|
177 | } | |||
|
178 | pathLineEditEnterEditMode(false); | |||
|
179 | } | |||
|
180 | break; | |||
|
181 | case Qt::Key_Backspace: | |||
|
182 | if(this->view->hasFocus()) | |||
|
183 | { | |||
|
184 | parentDir(); | |||
160 | } |
|
185 | } | |
161 | break; |
|
186 | break; | |
162 | default: |
|
187 | default: | |
@@ -173,3 +198,17 void FileBrowser::pathLineEditEnterEditM | |||||
173 | if(enter) |
|
198 | if(enter) | |
174 | this->ui->pathLineEdit->setFocus(); |
|
199 | this->ui->pathLineEdit->setFocus(); | |
175 | } |
|
200 | } | |
|
201 | ||||
|
202 | ||||
|
203 | bool DoubleClickEater::eventFilter(QObject *obj, QEvent *event) | |||
|
204 | { | |||
|
205 | if (event->type() == QEvent::MouseButtonDblClick) | |||
|
206 | { | |||
|
207 | emit doubleClicked(); | |||
|
208 | return true; | |||
|
209 | } else | |||
|
210 | { | |||
|
211 | // standard event processing | |||
|
212 | return QObject::eventFilter(obj, event); | |||
|
213 | } | |||
|
214 | } |
@@ -34,6 +34,21 namespace Ui { | |||||
34 | class FileBrowser; |
|
34 | class FileBrowser; | |
35 | } |
|
35 | } | |
36 |
|
36 | |||
|
37 | class DoubleClickEater : public QObject | |||
|
38 | { | |||
|
39 | Q_OBJECT | |||
|
40 | public: | |||
|
41 | DoubleClickEater(){} | |||
|
42 | ~DoubleClickEater(){} | |||
|
43 | signals: | |||
|
44 | void doubleClicked(); | |||
|
45 | protected: | |||
|
46 | bool eventFilter(QObject *obj, QEvent *event); | |||
|
47 | }; | |||
|
48 | ||||
|
49 | ||||
|
50 | ||||
|
51 | ||||
37 | class FileBrowser : public QDockWidget |
|
52 | class FileBrowser : public QDockWidget | |
38 | { |
|
53 | { | |
39 | Q_OBJECT |
|
54 | Q_OBJECT | |
@@ -50,8 +65,10 private slots: | |||||
50 | void changeToListView(); |
|
65 | void changeToListView(); | |
51 | void clicked(QModelIndex index); |
|
66 | void clicked(QModelIndex index); | |
52 | void doubleClicked(QModelIndex index); |
|
67 | void doubleClicked(QModelIndex index); | |
|
68 | void activated(const QModelIndex & index); | |||
53 | void parentDir(); |
|
69 | void parentDir(); | |
54 | void cd(const QString& newPath); |
|
70 | void cd(const QString& newPath); | |
|
71 | void pathLineEditDblClicked(); | |||
55 | protected: |
|
72 | protected: | |
56 | void changeEvent(QEvent *e); |
|
73 | void changeEvent(QEvent *e); | |
57 | void keyPressEvent(QKeyEvent *e); |
|
74 | void keyPressEvent(QKeyEvent *e); | |
@@ -61,6 +78,7 private: | |||||
61 | FileSystemModel* model; |
|
78 | FileSystemModel* model; | |
62 | QAbstractItemView* view; |
|
79 | QAbstractItemView* view; | |
63 | QCompleter* pathCompleter; |
|
80 | QCompleter* pathCompleter; | |
|
81 | DoubleClickEater* doubleClickEater; | |||
64 | }; |
|
82 | }; | |
65 |
|
83 | |||
66 | #endif // FILEBROWSER_H |
|
84 | #endif // FILEBROWSER_H |
@@ -24,11 +24,24 | |||||
24 |
|
24 | |||
25 | QLopData::QLopData(QObject *parent) : QObject(parent) |
|
25 | QLopData::QLopData(QObject *parent) : QObject(parent) | |
26 | { |
|
26 | { | |
27 |
|
27 | this->unit = ""; | ||
|
28 | this->source = "Not set"; | |||
|
29 | this->type = QLopData::None; | |||
28 | } |
|
30 | } | |
29 |
|
31 | |||
30 | QLopData::~QLopData() |
|
32 | QLopData::~QLopData() | |
31 | { |
|
33 | { | |
|
34 | // delete data; | |||
|
35 | } | |||
|
36 | ||||
|
37 | ||||
|
38 | ||||
|
39 | QLopDataVector::QLopDataVector(QObject *parent) | |||
|
40 | { | |||
|
41 | this->type = QLopData::Vector; | |||
|
42 | } | |||
|
43 | ||||
|
44 | QLopDataVector::~QLopDataVector() | |||
|
45 | { | |||
32 | delete data; |
|
46 | delete data; | |
33 | } |
|
47 | } | |
34 |
|
@@ -41,13 +41,35 class QLopData : public QObject | |||||
41 | { |
|
41 | { | |
42 | Q_OBJECT |
|
42 | Q_OBJECT | |
43 | public: |
|
43 | public: | |
|
44 | typedef enum QLopDataType | |||
|
45 | { | |||
|
46 | Scalar=0, | |||
|
47 | Vector=1, | |||
|
48 | Matrix=2, | |||
|
49 | None=-1, | |||
|
50 | } | |||
|
51 | QLopDataType; | |||
44 | explicit QLopData(QObject *parent = 0); |
|
52 | explicit QLopData(QObject *parent = 0); | |
45 | ~QLopData(); |
|
53 | ~QLopData(); | |
46 | QString name; |
|
54 | QString name; | |
|
55 | QString source; | |||
47 | QString unit; |
|
56 | QString unit; | |
|
57 | QLopDataType type; | |||
|
58 | int ID; | |||
|
59 | signals: | |||
|
60 | void dataChanged(); | |||
|
61 | public slots: | |||
|
62 | private: | |||
|
63 | }; | |||
|
64 | ||||
|
65 | class QLopDataVector : public QLopData | |||
|
66 | { | |||
|
67 | Q_OBJECT | |||
|
68 | public: | |||
|
69 | explicit QLopDataVector(QObject *parent = 0); | |||
|
70 | ~QLopDataVector(); | |||
48 | QVector<QCPData>* data; |
|
71 | QVector<QCPData>* data; | |
49 | signals: |
|
72 | signals: | |
50 | void dataChanged(); |
|
|||
51 | public slots: |
|
73 | public slots: | |
52 | private: |
|
74 | private: | |
53 | }; |
|
75 | }; |
General Comments 0
You need to be logged in to leave comments.
Login now