summaryrefslogtreecommitdiff
path: root/client/widgets/multilist.cc
diff options
context:
space:
mode:
authordeva <deva>2009-03-18 13:21:45 +0000
committerdeva <deva>2009-03-18 13:21:45 +0000
commit4696bba0897715cb79eb75fcb14169964e1562e2 (patch)
tree8b8da13a89f2b980e8f25cf7eb36086de34b039d /client/widgets/multilist.cc
parent838fbd870b3ce51fb6a7d8994d3d08f8ab65559c (diff)
Made a messagebox wrapper that does the button translation.
Diffstat (limited to 'client/widgets/multilist.cc')
-rw-r--r--client/widgets/multilist.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/client/widgets/multilist.cc b/client/widgets/multilist.cc
index 4d34691..87f4975 100644
--- a/client/widgets/multilist.cc
+++ b/client/widgets/multilist.cc
@@ -26,12 +26,13 @@
*/
#include "multilist.h"
-#include <QMessageBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QPushButton>
+#include "messagebox.h"
+
#include "widgetbuilder.h"
#include "common.h"
@@ -127,25 +128,25 @@ void MultiList::changed()
bool MultiList::isValid()
{
if(innerwidget_has_changes) {
- switch(QMessageBox::warning(NULL,
+ switch(MessageBox::warning(NULL,
"Gem ændringerne i listen?",
"Der er lavet en ændring som ikke er tilføjet til listen.\n"
"Ønsker du at tilføje ændringen til listen inden du gemmer makroen?",
- QMessageBox::Save | QMessageBox::Close | QMessageBox::Cancel)) {
- case QMessageBox::Save:
+ MessageBox::Save | MessageBox::Close | MessageBox::Cancel)) {
+ case MessageBox::Save:
if(innerwidget && innerwidget->isValid()) {
add();
} else {
- QMessageBox::critical(NULL,
+ MessageBox::critical(NULL,
"Fejl",
"Der er fejl i ændringen, og den kan ikke tilføjes til listen.\n",
- QMessageBox::Ok);
+ MessageBox::Ok);
return false;
}
break;
- case QMessageBox::Close:
+ case MessageBox::Close:
break;
- case QMessageBox::Cancel:
+ case MessageBox::Cancel:
default:
// FIXME: How to we actually block the commit and return to the editor?
return false;