summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <[email protected]>2015-03-01 20:51:28 +0100
committerRalf Habacker <[email protected]>2015-03-02 22:50:07 +0100
commitd1bab9661da25071b4af7c9e9a38617114aad428 (patch)
tree5f59269b21384977110bd111c733059fc817c796
parentf43183df867ce3a832fa5cf4b8dacbdf5bf85580 (diff)
Refactor class NoteDialog to use new base class.
-rw-r--r--umbrello/dialogs/notedialog.cpp11
-rw-r--r--umbrello/dialogs/notedialog.h11
2 files changed, 8 insertions, 14 deletions
diff --git a/umbrello/dialogs/notedialog.cpp b/umbrello/dialogs/notedialog.cpp
index a464a6e..fcc31cd 100644
--- a/umbrello/dialogs/notedialog.cpp
+++ b/umbrello/dialogs/notedialog.cpp
@@ -25,13 +25,9 @@
* Constructs an NoteDialog.
*/
NoteDialog::NoteDialog(QWidget * parent, NoteWidget * pNote)
- : KDialog(parent)
+ : SinglePageDialogBase(parent)
{
setCaption(i18n("Note Documentation"));
- setButtons(Ok | Cancel);
- setDefaultButton(Ok);
- setModal(true);
- showButtonSeparator(true);
m_pNoteWidget = pNote;
QFrame *frame = new QFrame(this);
@@ -40,7 +36,6 @@ NoteDialog::NoteDialog(QWidget * parent, NoteWidget * pNote)
QVBoxLayout *layout = new QVBoxLayout(frame);
layout->addWidget(m_docWidget, 10);
setMinimumSize(600, 250);
- connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
}
/**
@@ -50,10 +45,10 @@ NoteDialog::~NoteDialog()
{
}
-void NoteDialog::slotOk()
+bool NoteDialog::apply()
{
m_docWidget->apply();
- accept();
+ return true;
}
#include "notedialog.moc"
diff --git a/umbrello/dialogs/notedialog.h b/umbrello/dialogs/notedialog.h
index ffeff94..42488b5 100644
--- a/umbrello/dialogs/notedialog.h
+++ b/umbrello/dialogs/notedialog.h
@@ -12,7 +12,7 @@
#define NOTEDIALOG_H
// kde includes
-#include <KDialog>
+#include "singlepagedialogbase.h"
class DocumentationWidget;
class NoteWidget;
@@ -21,19 +21,18 @@ class NoteWidget;
* @author Paul Hensgen
* Bugs and comments to [email protected] or http://bugs.kde.org
*/
-class NoteDialog : public KDialog
+class NoteDialog : public SinglePageDialogBase
{
Q_OBJECT
public:
NoteDialog(QWidget *parent, NoteWidget *pNote);
~NoteDialog();
-public slots:
- void slotOk();
-
-private:
+protected:
DocumentationWidget *m_docWidget; ///< widget holding the documentation
NoteWidget *m_pNoteWidget; ///< note widget to show documentation for
+
+ bool apply();
};
#endif