[Uml-devel] KDE/kdesdk/umbrello/umbrello/dialogs
Andi Fischer
andi.fischer at hispeed.ch
Sat Aug 16 20:46:41 UTC 2008
SVN commit 848076 by fischer:
Replacing all q3 widgets.
M +25 -24 notedialog.cpp
M +14 -12 notedialog.h
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/notedialog.cpp #848075:848076
@@ -1,31 +1,29 @@
/***************************************************************************
- * *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2002-2007 *
+ * copyright (C) 2002-2008 *
* Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
// own header
#include "notedialog.h"
-// qt/kde includes
-#include <QVBoxLayout>
-#include <QHBoxLayout>
-#include <qlineedit.h>
-#include <q3groupbox.h>
-#include <q3textedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
+// kde includes
#include <klocale.h>
#include <kmessagebox.h>
+#include <ktextedit.h>
+// qt includes
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QGroupBox>
NoteDialog::NoteDialog( QWidget * parent, NoteWidget * pNote )
- : KDialog(parent) {
+ : KDialog(parent)
+{
setCaption( i18n("Note Documentation") );
setButtons( Help | Ok | Cancel );
setDefaultButton( Ok );
@@ -37,28 +35,31 @@
QFrame *frame = new QFrame( this );
setMainWidget( frame );
- m_pDocGB = new Q3GroupBox(i18n("Documentation"), frame);
+ m_pDocGB = new QGroupBox(i18n("Documentation"), frame);
QVBoxLayout * mainLayout = new QVBoxLayout(frame);
- mainLayout -> addWidget(m_pDocGB);
- mainLayout -> setSpacing(10);
- mainLayout -> setMargin(margin);
+ mainLayout->addWidget(m_pDocGB);
+ mainLayout->setSpacing(10);
+ mainLayout->setMargin(margin);
QHBoxLayout * docLayout = new QHBoxLayout(m_pDocGB);
- docLayout -> setSpacing(10);
- docLayout -> setMargin(margin);
+ docLayout->setSpacing(10);
+ docLayout->setMargin(margin);
- m_pDocTE = new Q3TextEdit( m_pDocGB );
- m_pDocTE -> setFocus();
- docLayout -> addWidget( m_pDocTE );
- m_pDocTE -> setText( pNote -> getDoc() );
+ m_pDocTE = new KTextEdit( m_pDocGB );
+ m_pDocTE->setFocus();
+ docLayout->addWidget( m_pDocTE );
+ m_pDocTE->setText( pNote->getDoc() );
setMinimumSize(330, 160);
connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
}
-NoteDialog::~NoteDialog() {}
+NoteDialog::~NoteDialog()
+{
+}
-void NoteDialog::slotOk() {
- m_pNoteWidget -> setDoc( m_pDocTE -> text() );
+void NoteDialog::slotOk()
+{
+ m_pNoteWidget->setDoc( m_pDocTE->toPlainText() );
accept();
}
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/notedialog.h #848075:848076
@@ -1,30 +1,31 @@
/***************************************************************************
- * *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2002-2006 *
+ * copyright (C) 2002-2008 *
* Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
#ifndef NOTEDIALOG_H
#define NOTEDIALOG_H
-//kde includes
+
+// app includes
+#include "notewidget.h"
+
+// kde includes
#include <kdialog.h>
-//app includes
-#include "../notewidget.h"
+class KTextEdit;
+class QGroupBox;
+
/**
* @author Paul Hensgen
* Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
*/
-class Q3GroupBox;
-class Q3TextEdit;
-
-class NoteDialog : public KDialog {
-
+class NoteDialog : public KDialog
+{
Q_OBJECT
public:
@@ -40,10 +41,11 @@
public slots:
void slotOk();
+
private:
//GUI widgets
- Q3GroupBox * m_pDocGB;
- Q3TextEdit * m_pDocTE;
+ QGroupBox * m_pDocGB;
+ KTextEdit * m_pDocTE;
/**
* Note widget to show documentation for.
More information about the umbrello-devel
mailing list