summaryrefslogtreecommitdiff
path: root/src/messagebox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/messagebox.cc')
-rw-r--r--src/messagebox.cc41
1 files changed, 39 insertions, 2 deletions
diff --git a/src/messagebox.cc b/src/messagebox.cc
index 63bbeee..1975eac 100644
--- a/src/messagebox.cc
+++ b/src/messagebox.cc
@@ -72,9 +72,9 @@ MessageBox::MessageBox(QWidget* parent,
pix_icon->load( PIXMAP_WARNING );
break;
case TYPE_YES_NO:
- pix_icon->load( PIXMAP_QUESTION );
- break;
+ case TYPE_YES_NO_MAYBE:
case TYPE_YES_NO_CANCEL:
+ case TYPE_YES_NO_MAYBE_CANCEL:
pix_icon->load( PIXMAP_QUESTION );
break;
}
@@ -134,6 +134,20 @@ MessageBox::MessageBox(QWidget* parent,
connect(bno, SIGNAL( clicked() ), SLOT(bno_clicked()));
break;
}
+ case TYPE_YES_NO_MAYBE:
+ {
+ QPushButton *byes = createButton(f, TXT_YES );
+ QPushButton *bno = createButton(f, TXT_NO );
+ QPushButton *bmaybe = createButton(f, TXT_MAYBE );
+ QGridLayout *glayout = new QGridLayout(f, 1, 3, 20, 20);
+ glayout->addWidget(bno, 0, 0);
+ glayout->addWidget(byes, 0, 1);
+ glayout->addWidget(bmaybe, 0, 2);
+ connect(byes, SIGNAL( clicked() ), SLOT(byes_clicked()));
+ connect(bno, SIGNAL( clicked() ), SLOT(bno_clicked()));
+ connect(bmaybe, SIGNAL( clicked() ), SLOT(bmaybe_clicked()));
+ break;
+ }
case TYPE_YES_NO_CANCEL:
{
QPushButton *byes = createButton(f, TXT_YES );
@@ -148,6 +162,23 @@ MessageBox::MessageBox(QWidget* parent,
connect(bno, SIGNAL( clicked() ), SLOT(bno_clicked()));
break;
}
+ case TYPE_YES_NO_MAYBE_CANCEL:
+ {
+ QPushButton *byes = createButton(f, TXT_YES );
+ QPushButton *bcancel = createButton(f, TXT_CANCEL );
+ QPushButton *bno = createButton(f, TXT_NO );
+ QPushButton *bmaybe = createButton(f, TXT_MAYBE );
+ QGridLayout *glayout = new QGridLayout(f, 1, 4, 20, 20);
+ glayout->addWidget(bno, 0, 0);
+ glayout->addWidget(bcancel, 0, 1);
+ glayout->addWidget(byes, 0, 2);
+ glayout->addWidget(bmaybe, 0, 3);
+ connect(bmaybe, SIGNAL( clicked() ), SLOT(bmaybe_clicked()));
+ connect(byes, SIGNAL( clicked() ), SLOT(byes_clicked()));
+ connect(bcancel, SIGNAL( clicked() ), SLOT(bcancel_clicked()));
+ connect(bno, SIGNAL( clicked() ), SLOT(bno_clicked()));
+ break;
+ }
}
}
@@ -185,4 +216,10 @@ void MessageBox::bno_clicked()
{
done(MSG_NO);
}
+
+void MessageBox::bmaybe_clicked()
+{
+ done(MSG_MAYBE);
+}
+
#endif/*USE_GUI*/