19 #include "info_message.h" 24 namespace ParameterGui
31 QGridLayout * grid =
new QGridLayout(
this);
33 icon =
new QLabel(
this);
34 #ifndef QT_NO_MESSAGEBOX 35 icon->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
36 icon->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
38 grid->addWidget(
icon, 0, 0, Qt::AlignTop);
44 again =
new QCheckBox(
this);
45 again->setChecked(
true);
46 again->setText(QErrorMessage::tr(
"&Show this message again"));
47 grid->addWidget(
again, 1, 1, Qt::AlignTop);
49 ok =
new QPushButton(
this);
50 ok->setText(QErrorMessage::tr(
"&OK"));
51 #ifdef QT_SOFTKEYS_ENABLED 52 ok_action =
new QAction(
ok);
53 ok_action->setSoftKeyRole(QAction::PositiveSoftKey);
54 ok_action->setText(
ok->text());
55 connect(ok_action, SIGNAL(triggered()),
this, SLOT(accept()));
58 connect(
ok, SIGNAL(clicked()),
this, SLOT(accept()));
60 grid->addWidget(
ok, 2, 0, 1, 2, Qt::AlignCenter);
62 grid->setColumnStretch(1, 42);
63 grid->setRowStretch(0, 42);
65 QString settings_file = QDir::currentPath() +
"/settings.ini";
67 settings =
new QSettings (settings_file, QSettings::IniFormat);
78 this->message->setText(message);
93 if(!
again->isChecked())
96 settings->setValue(
"showInformation",
false);
InfoMessage(QWidget *parent=0)
void setInfoMessage(const QString &message)