-rw-r--r-- | library/qpemessagebox.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/library/qpemessagebox.cpp b/library/qpemessagebox.cpp new file mode 100644 index 0000000..02db760 --- a/dev/null +++ b/library/qpemessagebox.cpp | |||
@@ -0,0 +1,13 @@ | |||
1 | #include "qpemessagebox.h" | ||
2 | #include <qmessagebox.h> | ||
3 | |||
4 | bool QPEMessageBox::confirmDelete( QWidget *parent, const QString & caption, | ||
5 | const QString & object ) | ||
6 | { | ||
7 | QString msg = QObject::tr("Are you sure you want to delete\n %1?").arg( object ); | ||
8 | int r = QMessageBox::warning( parent, caption, msg, QMessageBox::Yes, | ||
9 | QMessageBox::No|QMessageBox::Default| | ||
10 | QMessageBox::Escape, 0 ); | ||
11 | |||
12 | return r == QMessageBox::Yes; | ||
13 | } | ||