mirror of https://github.com/OpenMW/openmw.git
implemented view/document closing
parent
9834bb3ad5
commit
758371d7e4
@ -1,8 +1,31 @@
|
||||
|
||||
#include "view.hpp"
|
||||
|
||||
CSVDoc::View::View (CSMDoc::Document *document) : mDocument (document)
|
||||
#include <iostream>
|
||||
|
||||
#include <QCloseEvent>
|
||||
|
||||
#include "viewmanager.hpp"
|
||||
|
||||
void CSVDoc::View::closeEvent (QCloseEvent *event)
|
||||
{
|
||||
if (!mViewManager.closeRequest (this))
|
||||
event->ignore();
|
||||
}
|
||||
|
||||
CSVDoc::View::View (ViewManager& viewManager, CSMDoc::Document *document)
|
||||
: mViewManager (viewManager), mDocument (document)
|
||||
{
|
||||
resize (200, 200);
|
||||
setWindowTitle ("New Document");
|
||||
}
|
||||
|
||||
const CSMDoc::Document *CSVDoc::View::getDocument() const
|
||||
{
|
||||
return mDocument;
|
||||
}
|
||||
|
||||
CSMDoc::Document *CSVDoc::View::getDocument()
|
||||
{
|
||||
return mDocument;
|
||||
}
|
Loading…
Reference in New Issue