#define TYPENUM 5
-Editor *e;
+Editor *editor;
/**
* @attention Currently not in use
* @copydoc QWidget::closeEvent(QCloseEvent*)
*/
void Editor::closeEvent(QCloseEvent * e) {
- e->ignore();
+ e->accept();
}
/**
*/
int main(int argc, char **argv)
{
- QApplication a(argc, argv);
- //a.setStyle(WindowsStyle);
- /*
- Defaults are zeroed, so created Editor widget become top-level window.
- */
- e = new Editor(argv[1]);
- e->resize(600, 400);
- e->show();
- return a.exec();
+ QApplication app(argc, argv);
+ //app.setStyle(WindowsStyle);
+ editor = new Editor(argv[1]);
+ app.setMainWidget(editor);
+ editor->resize(600, 400);
+ editor->show();
+ return app.exec();
}
/**
* Event invoked on program close.
- * @copydoc QWidget::closeEvent(QCloseEvent*)
+ * Closes application. Displays additional window to confirm exit.
*/
void QKernel::closeEvent(QCloseEvent * e)
{
- e->ignore();
+ QuitProc();
}
/**
app->setMainWidget(&kernel);
kernel.show();
kernel.InitMessage();
+
return app->exec();
}