src/RelpipeChartMainWindow.h
author František Kučera <franta-hg@frantovo.cz>
Sun, 30 Sep 2018 20:54:35 +0200
branchv_0
changeset 20 b13e7ed9eea3
parent 19 ac70c7af6a9b
child 23 ff4a1c07a481
permissions -rw-r--r--
better use of signal/slot mechanism, threads, Qt::ConnectionType::QueuedConnection

#pragma once

#include <QTableWidget>
#include <QLabel>

#include "ui_RelpipeChartMainWindow.h"

#include <relpipe/reader/typedefs.h>
#include <relpipe/reader/TypeId.h>
#include <relpipe/reader/handlers/RelationalReaderStringHandler.h>
#include <relpipe/reader/handlers/AttributeMetadata.h>

using namespace relpipe::reader;
using namespace relpipe::reader::handlers;

class RelpipeChartMainWindow : public QMainWindow {
	Q_OBJECT
public:
	RelpipeChartMainWindow();
	virtual ~RelpipeChartMainWindow();
public slots:
	void startRelation(const string_t name, std::vector<AttributeMetadata> attributes);
	void attribute(const string_t value);
	void endOfPipe();
	void setStatusMessage(string_t message);
private:
	Ui::RelpipeChartMainWindow widget;
	QTabWidget* tabs = new QTabWidget(this);
	QTableWidget* currentTable;
	QLabel* status = new QLabel();
	integer_t attributeCounter;
};