예제 #1
0
/** Handle presses of h and ? keys. */
void HelpDialogManager::handleEvent(Event *key)
{
	KeyEvent *ke;
	if((ke= dynamic_cast<KeyEvent *>(key))&&
			(ke->keycode== Qt::Key_H|| ke->keycode== Qt::Key_Question))
	{
		parent->stopTimer();
		QDialog window(parent);
		Ui::helpDialog hDialog;
		hDialog.setupUi(&window);
		window.exec();
		parent->startTimer();
	} else
		AbstractResponsibility::handleEvent(key);
}
예제 #2
0
/*!
*/
void TNxSpooler::openHelp()
{
   // As this is a slot that can be called by Qt code (in response to a pushed button, for example), we
   // don't allow exceptions to go out from here. So we use a "try" block.
   try
   {
       QDEBUG_METHOD_NAME;

       Ui::helpDialog uiHelp;
       QDialog help(this);
       uiHelp.setupUi(&help);

       help.exec(); // The returned value is not important here
   }
   catch(std::exception &excep)
   {
      syst.exitBecauseException(excep);
   }
   catch(...)
   {
      syst.exitBecauseException();
   }
}