2012-11-22 12:30:02 +00:00
|
|
|
|
|
|
|
#include "view.hpp"
|
|
|
|
|
2012-11-22 13:10:23 +00:00
|
|
|
#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)
|
2012-11-22 12:30:02 +00:00
|
|
|
{
|
|
|
|
resize (200, 200);
|
|
|
|
setWindowTitle ("New Document");
|
2012-11-22 13:10:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const CSMDoc::Document *CSVDoc::View::getDocument() const
|
|
|
|
{
|
|
|
|
return mDocument;
|
|
|
|
}
|
|
|
|
|
|
|
|
CSMDoc::Document *CSVDoc::View::getDocument()
|
|
|
|
{
|
|
|
|
return mDocument;
|
2012-11-22 12:30:02 +00:00
|
|
|
}
|