GUI: better message boxes (without taskbar entry)
This commit is contained in:
parent
d8b506cfc0
commit
c6f4bb0f99
|
@ -224,6 +224,8 @@ void ScriptView::error(int line, QString message)
|
||||||
title="Script Error!";
|
title="Script Error!";
|
||||||
QMessageBox msg(QMessageBox::Critical, title, message);
|
QMessageBox msg(QMessageBox::Critical, title, message);
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/script-error.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/script-error.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
msg.exec();
|
msg.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,6 +308,8 @@ void ScriptView::message(QString message)
|
||||||
{
|
{
|
||||||
QMessageBox msg(QMessageBox::Information, "Information", message);
|
QMessageBox msg(QMessageBox::Information, "Information", message);
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/information.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/information.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
msg.exec();
|
msg.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,6 +326,8 @@ void ScriptView::question(QString message)
|
||||||
{
|
{
|
||||||
QMessageBox msg(QMessageBox::Question, "Question", message, QMessageBox::Yes|QMessageBox::No);
|
QMessageBox msg(QMessageBox::Question, "Question", message, QMessageBox::Yes|QMessageBox::No);
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/question.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/question.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
if(msg.exec()==QMessageBox::Yes)
|
if(msg.exec()==QMessageBox::Yes)
|
||||||
Bridge::getBridge()->scriptResult=1;
|
Bridge::getBridge()->scriptResult=1;
|
||||||
else
|
else
|
||||||
|
|
|
@ -356,6 +356,8 @@ void CPUDisassembly::setLabel()
|
||||||
{
|
{
|
||||||
QMessageBox msg(QMessageBox::Critical, "Error!", "DbgSetLabelAt failed!");
|
QMessageBox msg(QMessageBox::Critical, "Error!", "DbgSetLabelAt failed!");
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
msg.exec();
|
msg.exec();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -375,6 +377,8 @@ void CPUDisassembly::setComment()
|
||||||
{
|
{
|
||||||
QMessageBox msg(QMessageBox::Critical, "Error!", "DbgSetCommentAt failed!");
|
QMessageBox msg(QMessageBox::Critical, "Error!", "DbgSetCommentAt failed!");
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
msg.exec();
|
msg.exec();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -391,6 +395,8 @@ void CPUDisassembly::setBookmark()
|
||||||
{
|
{
|
||||||
QMessageBox msg(QMessageBox::Critical, "Error!", "DbgSetBookmarkAt failed!");
|
QMessageBox msg(QMessageBox::Critical, "Error!", "DbgSetBookmarkAt failed!");
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
msg.exec();
|
msg.exec();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -412,6 +418,8 @@ void CPUDisassembly::toggleFunction()
|
||||||
|
|
||||||
QMessageBox msg(QMessageBox::Question, "Add the function?", start_text + "-" + end_text + label_text, QMessageBox::Yes|QMessageBox::No);
|
QMessageBox msg(QMessageBox::Question, "Add the function?", start_text + "-" + end_text + label_text, QMessageBox::Yes|QMessageBox::No);
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/compile.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/compile.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
if(msg.exec() != QMessageBox::Yes)
|
if(msg.exec() != QMessageBox::Yes)
|
||||||
return;
|
return;
|
||||||
QString cmd = "functionadd " + start_text + "," + end_text;
|
QString cmd = "functionadd " + start_text + "," + end_text;
|
||||||
|
@ -429,6 +437,8 @@ void CPUDisassembly::toggleFunction()
|
||||||
QMessageBox msg(QMessageBox::Warning, "Deleting the function:", start_text + "-" + end_text + label_text, QMessageBox::Ok|QMessageBox::Cancel);
|
QMessageBox msg(QMessageBox::Warning, "Deleting the function:", start_text + "-" + end_text + label_text, QMessageBox::Ok|QMessageBox::Cancel);
|
||||||
msg.setDefaultButton(QMessageBox::Cancel);
|
msg.setDefaultButton(QMessageBox::Cancel);
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/compile-warning.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/compile-warning.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
if(msg.exec() != QMessageBox::Ok)
|
if(msg.exec() != QMessageBox::Ok)
|
||||||
return;
|
return;
|
||||||
QString cmd = "functiondel " + start_text;
|
QString cmd = "functiondel " + start_text;
|
||||||
|
@ -469,5 +479,7 @@ void CPUDisassembly::assembleAt()
|
||||||
|
|
||||||
QMessageBox msg(QMessageBox::Critical, "Error!", "Function not (yet) supported...");
|
QMessageBox msg(QMessageBox::Critical, "Error!", "Function not (yet) supported...");
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
msg.exec();
|
msg.exec();
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,6 @@ void GotoDialog::on_editExpression_textChanged(const QString &arg1)
|
||||||
addrText=QString(module)+"."+QString("%1").arg(addr, sizeof(int_t)*2, 16, QChar('0')).toUpper();
|
addrText=QString(module)+"."+QString("%1").arg(addr, sizeof(int_t)*2, 16, QChar('0')).toUpper();
|
||||||
else
|
else
|
||||||
addrText=QString("%1").arg(addr, sizeof(int_t)*2, 16, QChar('0')).toUpper();
|
addrText=QString("%1").arg(addr, sizeof(int_t)*2, 16, QChar('0')).toUpper();
|
||||||
|
|
||||||
ui->labelError->setText(QString("<font color='#00FF00'><b>Correct expression! -> </b></color>" + addrText));
|
ui->labelError->setText(QString("<font color='#00FF00'><b>Correct expression! -> </b></color>" + addrText));
|
||||||
ui->buttonOk->setEnabled(true);
|
ui->buttonOk->setEnabled(true);
|
||||||
expressionText=arg1;
|
expressionText=arg1;
|
||||||
|
|
|
@ -125,6 +125,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||||
{
|
{
|
||||||
QMessageBox msg(QMessageBox::Critical, "DbgInit Error!", QString(errormsg));
|
QMessageBox msg(QMessageBox::Critical, "DbgInit Error!", QString(errormsg));
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
msg.exec();
|
msg.exec();
|
||||||
ExitProcess(1);
|
ExitProcess(1);
|
||||||
}
|
}
|
||||||
|
@ -199,6 +201,8 @@ void MainWindow::updateMRUMenu()
|
||||||
{
|
{
|
||||||
QMessageBox msg(QMessageBox::Critical, "Error!", "Failed to find menu!");
|
QMessageBox msg(QMessageBox::Critical, "Error!", "Failed to find menu!");
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
msg.exec();
|
msg.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -207,6 +211,8 @@ void MainWindow::updateMRUMenu()
|
||||||
{
|
{
|
||||||
QMessageBox msg(QMessageBox::Critical, "Error!", "Failed to find submenu!");
|
QMessageBox msg(QMessageBox::Critical, "Error!", "Failed to find submenu!");
|
||||||
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
msg.setWindowIcon(QIcon(":/icons/images/compile-error.png"));
|
||||||
|
msg.setParent(this, Qt::Dialog);
|
||||||
|
msg.setWindowFlags(msg.windowFlags()&(~Qt::WindowContextHelpButtonHint));
|
||||||
msg.exec();
|
msg.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue