src/RelpipeChartMainWindow.h
author František Kučera <franta-hg@frantovo.cz>
Tue, 09 Oct 2018 23:02:11 +0200
branchv_0
changeset 23 ff4a1c07a481
parent 20 b13e7ed9eea3
child 28 04f1ac8a931b
permissions -rw-r--r--
use our own QAbstractTableModel and a QTableView instead of the QTableWidget

#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>

#include "RelpipeTableModel.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);
	RelpipeTableModel* currentModel;
	QLabel* status = new QLabel();
};