src/document.cpp

changeset 9
8b9780700b5e
parent 8
44679e468ba9
child 21
0133e565e072
equal deleted inserted replaced
8:44679e468ba9 9:8b9780700b5e
7 model{model}, 7 model{model},
8 ui{*new Ui::Document} 8 ui{*new Ui::Document}
9 { 9 {
10 this->ui.setupUi(this); 10 this->ui.setupUi(this);
11 this->ui.listView->setModel(model); 11 this->ui.listView->setModel(model);
12 connect(this->ui.splitter, &QSplitter::splitterMoved, this, &Document::splitterChanged);
12 } 13 }
13 14
14 Document::~Document() 15 Document::~Document()
15 { 16 {
16 delete &this->ui; 17 delete &this->ui;
17 } 18 }
19
20 QByteArray Document::saveSplitterState() const
21 {
22 return this->ui.splitter->saveState();
23 }
24
25 void Document::restoreSplitterState(const QByteArray& state)
26 {
27 this->ui.splitter->restoreState(state);
28 }

mercurial