//--------------------------------------------------------------------------
void VeGraphicsTest::OnKeyPressed(VeKeyboard::InputKey eKey)
{
	if(eKey == VeKeyboard::KEY_F4)
	{
		QuitApp();
	}
}
Exemple #2
0
void MainWindow::createActions(){

    actionOpen          = new QAction(tr("&Open Mesh"   ), this);
    actionOpenShader    = new QAction(tr("Open Shade&r" ), this);
    actionSave_as       = new QAction(tr("&Save As ..." ), this);
    actionClose         = new QAction(tr("Close &Mesh"  ), this);
    actionAbout         = new QAction(tr("About Me"     ), this);
    actionAbout_QT      = new QAction(tr("About QT"     ), this);
    actionAbout_Tucano  = new QAction(tr("About Tucano" ), this);
    actionQuit          = new QAction(tr("E&xit"        ), this);
    actionViewReset     = new QAction(tr("Reset view"   ), this);

    actionOpen->setShortcut(tr("Ctrl+O"));
    actionOpenShader->setShortcut(tr("Ctrl+R"));
    actionQuit->setShortcut(tr("Ctrl+X"));
    actionSave_as->setShortcut(tr("Ctrl+S"));
    actionClose->setShortcut(tr("Ctrl+M"));
    actionAbout->setShortcut(tr("Ctrl+Shift+A"));
    actionAbout_QT->setShortcut(tr("Ctrl+Shift+B"));
    actionAbout_Tucano->setShortcut(tr("Ctrl+Shift+C"));

    connect(actionOpen,         SIGNAL(triggered()), this, SLOT(OpenFile())         );
    connect(actionOpenShader,   SIGNAL(triggered()), this, SLOT(OpenFileShader())   );
    connect(actionSave_as,      SIGNAL(triggered()), this, SLOT(SaveAs())           );
    connect(actionClose,        SIGNAL(triggered()), this, SLOT(CloseFile())        );
    connect(actionQuit,         SIGNAL(triggered()), this, SLOT(QuitApp())          );
    connect(actionAbout,        SIGNAL(triggered()), this, SLOT(AboutMe())          );
    connect(actionAbout_QT,     SIGNAL(triggered()), this, SLOT(AboutQT())          );
    connect(actionAbout_Tucano, SIGNAL(triggered()), this, SLOT(AboutTucano())      );
    connect(actionViewReset,    SIGNAL(triggered()), this, SLOT(ViewReset())        );

}