[Uml-devel] KDE/kdesdk/umbrello/umbrello/dialogs
Andi Fischer
andi.fischer at hispeed.ch
Sat May 31 13:35:22 UTC 2008
SVN commit 814855 by fischer:
Krazy: using KLineEdit instead of QLineEdit.
M +9 -6 umluniqueconstraintdialog.cpp
M +10 -9 umluniqueconstraintdialog.h
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/umluniqueconstraintdialog.cpp #814854:814855
@@ -10,7 +10,7 @@
***************************************************************************/
#include "umluniqueconstraintdialog.h"
-#include <QtGui/qlayout.h>
+#include <QtGui/QLayout>
#include <QtGui/QVBoxLayout>
#include <QtGui/QHBoxLayout>
@@ -77,7 +77,7 @@
m_pNameL = new QLabel( i18nc("name label", "Name"), this );
nameLayout->addWidget( m_pNameL );
// name lineEdit
- m_pNameLE = new QLineEdit( this );
+ m_pNameLE = new KLineEdit( this );
nameLayout->addWidget( m_pNameLE );
// group box to hold the column details
@@ -139,8 +139,9 @@
m_pNameLE->setText( m_pUniqueConstraint->getName() );
// select firstItem
- if ( m_pAttributeListLB->count()!=0 )
+ if ( m_pAttributeListLB->count()!=0 ) {
m_pAttributeListLB->setSelected( 0, true );
+ }
slotResetWidgetState();
@@ -151,8 +152,9 @@
{
int index = m_pAttributeCB->currentIndex();
- if ( index == -1 )
+ if ( index == -1 ) {
return;
+ }
// get reference
UMLEntityAttribute* entAtt = m_pEntityAttributeList.at(index);
@@ -178,8 +180,9 @@
{
int index = m_pAttributeListLB->currentItem();
- if ( index == -1 )
+ if ( index == -1 ) {
return;
+ }
// get reference
UMLEntityAttribute* entAtt = m_pConstraintAttributeList.at(index );
@@ -213,7 +216,7 @@
bool UMLUniqueConstraintDialog::apply()
{
QString name = m_pNameLE -> text();
- if( name.length() == 0 ) {
+ if ( name.length() == 0 ) {
KMessageBox::error(this, i18n("You have entered an invalid constraint name."),
i18n("Constraint Name Invalid"), false);
m_pNameLE -> setText( m_pUniqueConstraint -> getName() );
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/umluniqueconstraintdialog.h #814854:814855
@@ -5,7 +5,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2003-2007 *
+ * copyright (C) 2003-2008 *
* Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
@@ -13,22 +13,22 @@
#define UMLUNIQUECONSTRAINTDIALOG_H
//qt includes
-#include <qwidget.h>
-#include <qlabel.h>
+#include <QtGui/QWidget>
+#include <QtGui/QLabel>
#include <q3groupbox.h>
#include <q3listbox.h>
#include <q3textedit.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <QtGui/QPushButton>
//kde includes
#include <karrowbutton.h>
#include <kcombobox.h>
#include <kdialog.h>
+#include <klineedit.h>
//app includes
-#include "../umlclassifierlistitemlist.h"
-#include "../umlentityattributelist.h"
+#include "umlclassifierlistitemlist.h"
+#include "umlentityattributelist.h"
class UMLDoc;
class UMLUniqueConstraint;
@@ -40,7 +40,8 @@
* @author Sharan Rao
* Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
*/
-class UMLUniqueConstraintDialog : public KDialog {
+class UMLUniqueConstraintDialog : public KDialog
+{
Q_OBJECT
public:
/**
@@ -81,7 +82,7 @@
/* GUI Widgets */
QGroupBox* m_pAttributeListGB;
QLabel* m_pNameL;
- QLineEdit* m_pNameLE;
+ KLineEdit* m_pNameLE;
Q3ListBox* m_pAttributeListLB;
KComboBox* m_pAttributeCB;
QPushButton* m_pAddPB,*m_pRemovePB;
More information about the umbrello-devel
mailing list