[Uml-devel] KDE/kdesdk/umbrello/umbrello/dialogs

Sharan Rao sharanrao at gmail.com
Tue Jul 3 09:14:56 UTC 2007


SVN commit 682703 by sharan:

"Allow Null" should be off and disabled when "Auto Increment" is On


 M  +12 -0     umlentityattributedialog.cpp  
 M  +5 -0      umlentityattributedialog.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/umlentityattributedialog.cpp #682702:682703
@@ -187,6 +187,7 @@
 
     m_pNameLE->setFocus();
     connect( m_pNameLE, SIGNAL( textChanged ( const QString & ) ), SLOT( slotNameChanged( const QString & ) ) );
+    connect( m_pAutoIncrementCB, SIGNAL( clicked( bool ) ), this, SLOT( slotAutoIncrementStateChanged( bool) ) );
     slotNameChanged(m_pNameLE->text() );
 }
 
@@ -280,4 +281,15 @@
 }
 
 
+void UMLEntityAttributeDialog::slotAutoIncrementStateChanged(bool checked) {
+    if ( checked == true ) {
+        m_pNullCB->setChecked( false );
+        m_pNullCB->setEnabled( false );
+    } else if ( checked == false ) {
+        m_pNullCB->setEnabled( true );
+    }
+
+}
+
+
 #include "umlentityattributedialog.moc"
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/umlentityattributedialog.h #682702:682703
@@ -73,7 +73,12 @@
     QCheckBox* m_pNullCB;
 
 public slots:
+
     /**
+     * is activated when the auto increment state is changed
+     */
+    void slotAutoIncrementStateChanged(bool checked);
+    /**
      * I don't think this is used, but if we had an apply button
      * it would slot into here
      */




More information about the umbrello-devel mailing list