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

Ralf Habacker ralf.habacker at gmail.com
Mon Jun 25 22:44:52 UTC 2012


SVN commit 1303064 by habacker:

Moved documentation into cpp file; reordered methods.

 M  +40 -23    classoptionspage.cpp  
 M  +3 -29     classoptionspage.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classoptionspage.cpp #1303063:1303064
@@ -25,6 +25,9 @@
 #include <QtGui/QGridLayout>
 #include <QtGui/QGroupBox>
 
+/**
+ * Constructor - observe and modify a Widget
+ */
 ClassOptionsPage::ClassOptionsPage(QWidget* pParent, ClassifierWidget* pWidget)
   : QWidget(pParent)
 {
@@ -34,6 +37,9 @@
     setupPage();
 }
 
+/**
+ * Constructor - observe and modify an OptionState structure
+ */
 ClassOptionsPage::ClassOptionsPage(QWidget* pParent, Settings::OptionState *options)
   : QWidget(pParent)
 {
@@ -43,25 +49,33 @@
 }
 
 /**
- * Initialize optional items
+ * Destructor
  */
-void ClassOptionsPage::init()
+ClassOptionsPage::~ClassOptionsPage()
 {
-    m_options = NULL;
-    m_pWidget = NULL;
-    m_pShowStereotypeCB = NULL;
-    m_pShowAttsCB = NULL;
-    m_pShowAttSigCB = NULL;
-    m_pShowAttribAssocsCB = NULL;
-    m_pShowPublicOnlyCB = NULL;
-    m_pDrawAsCircleCB = NULL;
 }
 
-ClassOptionsPage::~ClassOptionsPage()
+/**
+ * Set related uml widget
+ */
+void ClassOptionsPage::setWidget( ClassifierWidget * pWidget )
 {
+    m_pWidget = pWidget;
 }
 
 /**
+ * Updates the widget with the dialog page properties.
+ */
+void ClassOptionsPage::updateUMLWidget()
+{
+    if (m_pWidget) {
+        updateWidget();
+    } else if (m_options) {
+        updateOptionState();
+    }
+}
+
+/**
  * Creates the page with the correct options for the class/interface
  */
 void ClassOptionsPage::setupPage()
@@ -189,18 +203,6 @@
 }
 
 /**
- * Updates the widget with the dialog page properties.
- */
-void ClassOptionsPage::updateUMLWidget()
-{
-    if (m_pWidget) {
-        updateWidget();
-    } else if (m_options) {
-        updateOptionState();
-    }
-}
-
-/**
  * Sets the ClassifierWidget's properties to those selected in this dialog page.
  */
 void ClassOptionsPage::updateWidget()
@@ -240,3 +242,18 @@
     m_options->classState.showOpSig = m_pShowOpSigCB->isChecked();
     m_options->classState.showPublicOnly = m_pShowPublicOnlyCB->isChecked();
 }
+
+/**
+ * Initialize optional items
+ */
+void ClassOptionsPage::init()
+{
+    m_options = NULL;
+    m_pWidget = NULL;
+    m_pShowStereotypeCB = NULL;
+    m_pShowAttsCB = NULL;
+    m_pShowAttSigCB = NULL;
+    m_pShowAttribAssocsCB = NULL;
+    m_pShowPublicOnlyCB = NULL;
+    m_pDrawAsCircleCB = NULL;
+}
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classoptionspage.h #1303063:1303064
@@ -33,38 +33,20 @@
 class ClassOptionsPage : public QWidget
 {
 public:
-
-    /**
-     * Constructor - observe and modify a Widget
-     */
     ClassOptionsPage(QWidget* pParent, ClassifierWidget* pWidget);
-
-    /**
-     * Constructor - observe and modify an OptionState structure
-     */
     ClassOptionsPage(QWidget* pParent, Settings::OptionState *options );
-
-    /**
-     * destructor
-     */
     virtual ~ClassOptionsPage();
 
+    void setWidget( ClassifierWidget * pWidget );
     void updateUMLWidget();
 
-    void setWidget( ClassifierWidget * pWidget ) {
-        m_pWidget = pWidget;
-    }
-
 protected:
-
     void init();
 
     void setupPage();
-
     void setupClassPageOption();
 
     void updateWidget();
-
     void updateOptionState();
 
     //GUI widgets
@@ -75,15 +57,7 @@
     QCheckBox * m_pShowAttribAssocsCB;
     QCheckBox * m_pDrawAsCircleCB;
 
-    /**
-     * The classifier widget to represent in the dialog page.
-     */
-    ClassifierWidget* m_pWidget;
-
-    /**
-     * The OptionState structure to represent in the dialog page.
-     */
-    Settings::OptionState *m_options;
-
+    ClassifierWidget* m_pWidget; ///< The classifier widget to represent in the dialog page.
+    Settings::OptionState *m_options; ///< The OptionState structure to represent in the dialog page.
 };
 #endif




More information about the umbrello-devel mailing list