author | František Kučera <franta-hg@frantovo.cz> |
Sun, 18 Nov 2018 00:38:49 +0100 | |
branch | v_0 |
changeset 28 | 04f1ac8a931b |
parent 23 | ff4a1c07a481 |
child 29 | 0f9f7d6564cd |
permissions | -rw-r--r-- |
6
5acb6b487caf
code clean-up, comments
František Kučera <franta-hg@frantovo.cz>
parents:
4
diff
changeset
|
1 |
#pragma once |
4
1622c087f3ea
add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
2 |
|
18
16784291982f
add QTableWidget with rows and collumns filled with attribute values
František Kučera <franta-hg@frantovo.cz>
parents:
13
diff
changeset
|
3 |
#include <QTableWidget> |
19
ac70c7af6a9b
code clean-up, exit code
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
4 |
#include <QLabel> |
28
04f1ac8a931b
Qt Charts: first working version
František Kučera <franta-hg@frantovo.cz>
parents:
23
diff
changeset
|
5 |
#include <QSplitter> |
18
16784291982f
add QTableWidget with rows and collumns filled with attribute values
František Kučera <franta-hg@frantovo.cz>
parents:
13
diff
changeset
|
6 |
|
4
1622c087f3ea
add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
7 |
#include "ui_RelpipeChartMainWindow.h" |
1622c087f3ea
add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
8 |
|
13
c84042d014c9
background thread for STDIN reading + proxy with signals/slots for passing data to the GUI thread
František Kučera <franta-hg@frantovo.cz>
parents:
6
diff
changeset
|
9 |
#include <relpipe/reader/typedefs.h> |
c84042d014c9
background thread for STDIN reading + proxy with signals/slots for passing data to the GUI thread
František Kučera <franta-hg@frantovo.cz>
parents:
6
diff
changeset
|
10 |
#include <relpipe/reader/TypeId.h> |
c84042d014c9
background thread for STDIN reading + proxy with signals/slots for passing data to the GUI thread
František Kučera <franta-hg@frantovo.cz>
parents:
6
diff
changeset
|
11 |
#include <relpipe/reader/handlers/RelationalReaderStringHandler.h> |
c84042d014c9
background thread for STDIN reading + proxy with signals/slots for passing data to the GUI thread
František Kučera <franta-hg@frantovo.cz>
parents:
6
diff
changeset
|
12 |
#include <relpipe/reader/handlers/AttributeMetadata.h> |
c84042d014c9
background thread for STDIN reading + proxy with signals/slots for passing data to the GUI thread
František Kučera <franta-hg@frantovo.cz>
parents:
6
diff
changeset
|
13 |
|
23
ff4a1c07a481
use our own QAbstractTableModel and a QTableView instead of the QTableWidget
František Kučera <franta-hg@frantovo.cz>
parents:
20
diff
changeset
|
14 |
#include "RelpipeTableModel.h" |
28
04f1ac8a931b
Qt Charts: first working version
František Kučera <franta-hg@frantovo.cz>
parents:
23
diff
changeset
|
15 |
#include "RelpipeChartWidget.h" |
23
ff4a1c07a481
use our own QAbstractTableModel and a QTableView instead of the QTableWidget
František Kučera <franta-hg@frantovo.cz>
parents:
20
diff
changeset
|
16 |
|
13
c84042d014c9
background thread for STDIN reading + proxy with signals/slots for passing data to the GUI thread
František Kučera <franta-hg@frantovo.cz>
parents:
6
diff
changeset
|
17 |
using namespace relpipe::reader; |
c84042d014c9
background thread for STDIN reading + proxy with signals/slots for passing data to the GUI thread
František Kučera <franta-hg@frantovo.cz>
parents:
6
diff
changeset
|
18 |
using namespace relpipe::reader::handlers; |
c84042d014c9
background thread for STDIN reading + proxy with signals/slots for passing data to the GUI thread
František Kučera <franta-hg@frantovo.cz>
parents:
6
diff
changeset
|
19 |
|
20
b13e7ed9eea3
better use of signal/slot mechanism, threads, Qt::ConnectionType::QueuedConnection
František Kučera <franta-hg@frantovo.cz>
parents:
19
diff
changeset
|
20 |
class RelpipeChartMainWindow : public QMainWindow { |
4
1622c087f3ea
add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
21 |
Q_OBJECT |
1622c087f3ea
add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
22 |
public: |
1622c087f3ea
add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
23 |
RelpipeChartMainWindow(); |
1622c087f3ea
add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
24 |
virtual ~RelpipeChartMainWindow(); |
19
ac70c7af6a9b
code clean-up, exit code
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
25 |
public slots: |
20
b13e7ed9eea3
better use of signal/slot mechanism, threads, Qt::ConnectionType::QueuedConnection
František Kučera <franta-hg@frantovo.cz>
parents:
19
diff
changeset
|
26 |
void startRelation(const string_t name, std::vector<AttributeMetadata> attributes); |
b13e7ed9eea3
better use of signal/slot mechanism, threads, Qt::ConnectionType::QueuedConnection
František Kučera <franta-hg@frantovo.cz>
parents:
19
diff
changeset
|
27 |
void attribute(const string_t value); |
b13e7ed9eea3
better use of signal/slot mechanism, threads, Qt::ConnectionType::QueuedConnection
František Kučera <franta-hg@frantovo.cz>
parents:
19
diff
changeset
|
28 |
void endOfPipe(); |
19
ac70c7af6a9b
code clean-up, exit code
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
29 |
void setStatusMessage(string_t message); |
4
1622c087f3ea
add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
30 |
private: |
1622c087f3ea
add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
31 |
Ui::RelpipeChartMainWindow widget; |
13
c84042d014c9
background thread for STDIN reading + proxy with signals/slots for passing data to the GUI thread
František Kučera <franta-hg@frantovo.cz>
parents:
6
diff
changeset
|
32 |
QTabWidget* tabs = new QTabWidget(this); |
28
04f1ac8a931b
Qt Charts: first working version
František Kučera <franta-hg@frantovo.cz>
parents:
23
diff
changeset
|
33 |
QSplitter* splitter = new QSplitter(Qt::Orientation::Vertical, tabs); |
23
ff4a1c07a481
use our own QAbstractTableModel and a QTableView instead of the QTableWidget
František Kučera <franta-hg@frantovo.cz>
parents:
20
diff
changeset
|
34 |
RelpipeTableModel* currentModel; |
28
04f1ac8a931b
Qt Charts: first working version
František Kučera <franta-hg@frantovo.cz>
parents:
23
diff
changeset
|
35 |
RelpipeChartWidget* currentChartWidget; |
19
ac70c7af6a9b
code clean-up, exit code
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
36 |
QLabel* status = new QLabel(); |
4
1622c087f3ea
add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
37 |
}; |