本文整理汇总了C++中MessageDialog::show方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageDialog::show方法的具体用法?C++ MessageDialog::show怎么用?C++ MessageDialog::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageDialog
的用法示例。
在下文中一共展示了MessageDialog::show方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleKeypress
void Game::handleKeypress(const Common::Event &event) {
if (event.kbd.flags & Common::KBD_CTRL) {
if (_widepipeCtr == 8) {
// Implement original game cheating keys here someday
} else {
if (event.kbd.keycode == (Common::KEYCODE_a +
(DEBUG_STRING[_widepipeCtr] - 'a'))) {
if (++_widepipeCtr == 8) {
MessageDialog *dlg = new MessageDialog(_vm, 2,
"CHEATING ENABLED", "(for your convenience).");
dlg->show();
delete dlg;
}
}
}
}
switch (event.kbd.keycode) {
case Common::KEYCODE_F1:
_vm->_dialogs->_pendingDialog = DIALOG_GAME_MENU;
break;
case Common::KEYCODE_F5:
_vm->_dialogs->_pendingDialog = DIALOG_SAVE;
break;
case Common::KEYCODE_F7:
_vm->_dialogs->_pendingDialog = DIALOG_RESTORE;
break;
default:
break;
}
}
示例2: userDoubleClicked
void MainWindow::userDoubleClicked(const QString &nick)
{
if (!usersChatting.contains(nick))
{
MessageDialog *msgdlg = new MessageDialog(nick, 0);
connect(msgdlg, SIGNAL(messageReady(QString,QString)), irc, SLOT(sendMessage(QString,QString)));
QFont chatfont;
if (chatfont.fromString(settings.chatfont))
msgdlg->setFont(chatfont);
msgdlg->show();
usersChatting.insert(nick, msgdlg);
}
MessageDialog *msgdlg = usersChatting.value(nick);
if (msgdlg)
msgdlg->show();
}
示例3: handleKeypress
void Game::handleKeypress(const Common::KeyState &kbd) {
if (kbd.flags & Common::KBD_CTRL) {
if (_widepipeCtr == 8) {
// Implement original game cheating keys here someday
} else {
if (kbd.keycode == (Common::KEYCODE_a +
(DEBUG_STRING[_widepipeCtr] - 'a'))) {
if (++_widepipeCtr == 8) {
MessageDialog *dlg = new MessageDialog(_vm, 2,
"CHEATING ENABLED", "(for your convenience).");
dlg->show();
delete dlg;
}
}
}
}
Scene &scene = _vm->_game->_scene;
switch (kbd.keycode) {
case Common::KEYCODE_F1:
_vm->_dialogs->_pendingDialog = DIALOG_GAME_MENU;
break;
case Common::KEYCODE_F5:
_vm->_dialogs->_pendingDialog = DIALOG_SAVE;
break;
case Common::KEYCODE_F7:
_vm->_dialogs->_pendingDialog = DIALOG_RESTORE;
break;
case Common::KEYCODE_PAGEUP:
scene._userInterface._scrollbarStrokeType = SCROLLBAR_UP;
scene._userInterface.changeScrollBar();
break;
case Common::KEYCODE_PAGEDOWN:
scene._userInterface._scrollbarStrokeType = SCROLLBAR_DOWN;
scene._userInterface.changeScrollBar();
break;
default:
break;
}
}