src/document.cpp

Fri, 13 Dec 2019 15:55:56 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Fri, 13 Dec 2019 15:55:56 +0200
changeset 17
a5111f4e6412
parent 9
8b9780700b5e
child 21
0133e565e072
permissions
-rw-r--r--

added teapot rendering

#include "document.h"
#include "ui_document.h"
#include "model.h"

Document::Document(Model* model, QWidget* parent) :
	QWidget{parent},
	model{model},
	ui{*new Ui::Document}
{
	this->ui.setupUi(this);
	this->ui.listView->setModel(model);
	connect(this->ui.splitter, &QSplitter::splitterMoved, this, &Document::splitterChanged);
}

Document::~Document()
{
	delete &this->ui;
}

QByteArray Document::saveSplitterState() const
{
	return this->ui.splitter->saveState();
}

void Document::restoreSplitterState(const QByteArray& state)
{
	this->ui.splitter->restoreState(state);
}

mercurial