equal
deleted
inserted
replaced
10 using namespace relpipe::reader::handlers; |
10 using namespace relpipe::reader::handlers; |
11 |
11 |
12 RelpipeChartMainWindow::RelpipeChartMainWindow() { |
12 RelpipeChartMainWindow::RelpipeChartMainWindow() { |
13 widget.setupUi(this); |
13 widget.setupUi(this); |
14 |
14 |
15 tabs->addTab(new QPushButton("here will be options", tabs), "Options"); |
15 int optionsIndex = tabs->addTab(new QPushButton("here will be options", tabs), "Options"); |
|
16 tabs->setTabIcon(optionsIndex, QIcon::fromTheme("configure")); |
16 |
17 |
17 statusBar()->addWidget(new QLabel("Loading relations...", widget.statusbar)); |
18 statusBar()->addWidget(new QLabel("Loading relations...", widget.statusbar)); |
18 |
19 |
19 |
20 |
20 // TODO: remove; just demo |
21 // TODO: remove; just demo |
41 void RelpipeChartMainWindow::startRelation(string_t name, std::vector<AttributeMetadata> attributes) { |
42 void RelpipeChartMainWindow::startRelation(string_t name, std::vector<AttributeMetadata> attributes) { |
42 // TODO: chart and table |
43 // TODO: chart and table |
43 QSplitter* splitter = new QSplitter(Qt::Orientation::Vertical, tabs); |
44 QSplitter* splitter = new QSplitter(Qt::Orientation::Vertical, tabs); |
44 splitter->addWidget(new QPushButton("here will be the chart", splitter)); |
45 splitter->addWidget(new QPushButton("here will be the chart", splitter)); |
45 splitter->addWidget(new QPushButton("here will be the table", splitter)); |
46 splitter->addWidget(new QPushButton("here will be the table", splitter)); |
46 tabs->addTab(splitter, QString::fromWCharArray(name.c_str())); |
47 int index = tabs->addTab(splitter, QString::fromWCharArray(name.c_str())); |
47 if (tabs->count() == 2) tabs->setCurrentIndex(1); // switch to the first relation (first tab is Options tab) |
48 if (tabs->count() == 2) tabs->setCurrentIndex(index); // switch to the first relation (first tab is Options tab) |
|
49 tabs->setTabIcon(index, QIcon::fromTheme("application-vnd.oasis.opendocument.spreadsheet")); |
48 } |
50 } |
49 |
51 |
50 void RelpipeChartMainWindow::attribute(const string_t& value) { |
52 void RelpipeChartMainWindow::attribute(const string_t& value) { |
51 // TODO: fill table and draw chart |
53 // TODO: fill table and draw chart |
52 } |
54 } |