[qet] [4014] propertieseditordockwidget : remove button box.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4014
Author:   blacksun
Date:     2015-06-15 09:33:59 +0200 (Mon, 15 Jun 2015)
Log Message:
-----------
propertieseditordockwidget : remove button box. (become unused with live edit mode)

Modified Paths:
--------------
    trunk/sources/PropertiesEditor/propertieseditordockwidget.cpp
    trunk/sources/PropertiesEditor/propertieseditordockwidget.h
    trunk/sources/PropertiesEditor/propertieseditordockwidget.ui

Modified: trunk/sources/PropertiesEditor/propertieseditordockwidget.cpp
===================================================================
--- trunk/sources/PropertiesEditor/propertieseditordockwidget.cpp	2015-06-15 05:54:32 UTC (rev 4013)
+++ trunk/sources/PropertiesEditor/propertieseditordockwidget.cpp	2015-06-15 07:33:59 UTC (rev 4014)
@@ -19,8 +19,6 @@
 #include "ui_propertieseditordockwidget.h"
 #include "propertieseditorwidget.h"
 
-#include <QAbstractButton>
-
 /**
  * @brief PropertiesEditorDockWidget::PropertiesEditorDockWidget
  * Constructor
@@ -31,9 +29,6 @@
 	ui(new Ui::PropertiesEditorDockWidget)
 {
 	ui->setupUi(this);
-	ui->m_main_vlayout->setAlignment(ui->buttonBox, Qt::AlignBottom);
-	ui->buttonBox->setDisabled(true);
-	ui->buttonBox->setVisible (false);
 }
 
 /**
@@ -61,8 +56,6 @@
 	}
 
 	m_editor_list.clear();
-
-	ui->buttonBox->setDisabled(true);
 }
 
 /**
@@ -101,7 +94,6 @@
 
 	ui -> m_main_vlayout -> insertWidget(index, editor);
 	m_editor_list << editor;
-	setEnabledButtonBox(true);
 	return true;
 }
 
@@ -126,44 +118,5 @@
 	if (result)
 		ui -> m_main_vlayout -> removeWidget(editor);
 
-	if (m_editor_list.isEmpty())
-		setDisabledButtonBox(true);
 	return result;
 }
-
-/**
- * @brief PropertiesEditorDockWidget::setDisabledButtonBox
- * Disabled the button box at bottom of dock
- * @param b
- */
-void PropertiesEditorDockWidget::setDisabledButtonBox(bool b) {
-	ui -> buttonBox -> setDisabled(b);
-}
-
-/**
- * @brief PropertiesEditorDockWidget::setEnabledButtonBox
- * Enabled button box at bottom of dock
- * @param b
- */
-void PropertiesEditorDockWidget::setEnabledButtonBox(bool b) {
-	ui -> buttonBox -> setEnabled(b);
-}
-
-/**
- * @brief PropertiesEditorDockWidget::on_buttonBox_clicked
- * Action when button box button is clciked.
- * If button is ApplyRole : call the apply() method
- * If button is ResetRole : call the reset() method
- * @param button
- */
-void PropertiesEditorDockWidget::on_buttonBox_clicked(QAbstractButton *button)
-{
-	int answer = ui->buttonBox->buttonRole(button);
-
-	switch (answer)
-	{
-		case QDialogButtonBox::ApplyRole: apply(); break;
-		case QDialogButtonBox::ResetRole: reset(); break;
-		default: break;
-	}
-}

Modified: trunk/sources/PropertiesEditor/propertieseditordockwidget.h
===================================================================
--- trunk/sources/PropertiesEditor/propertieseditordockwidget.h	2015-06-15 05:54:32 UTC (rev 4013)
+++ trunk/sources/PropertiesEditor/propertieseditordockwidget.h	2015-06-15 07:33:59 UTC (rev 4014)
@@ -21,7 +21,6 @@
 #include <QDockWidget>
 
 class PropertiesEditorWidget;
-class QAbstractButton;
 
 namespace Ui {
 	class PropertiesEditorDockWidget;
@@ -41,13 +40,7 @@
 		bool addEditor (PropertiesEditorWidget *editor, int index = 0);
 		QList<PropertiesEditorWidget *> editors() const;
 		bool removeEditor (PropertiesEditorWidget *editor);
-		void setDisabledButtonBox(bool b = true);
-		void setEnabledButtonBox (bool b = true);
 
-
-	private slots:
-		void on_buttonBox_clicked(QAbstractButton *button);
-
 	protected:
 		QList <PropertiesEditorWidget *> m_editor_list;
 

Modified: trunk/sources/PropertiesEditor/propertieseditordockwidget.ui
===================================================================
--- trunk/sources/PropertiesEditor/propertieseditordockwidget.ui	2015-06-15 05:54:32 UTC (rev 4013)
+++ trunk/sources/PropertiesEditor/propertieseditordockwidget.ui	2015-06-15 07:33:59 UTC (rev 4014)
@@ -31,18 +31,7 @@
      <number>0</number>
     </property>
     <item>
-     <layout class="QVBoxLayout" name="m_main_vlayout">
-      <item>
-       <widget class="QDialogButtonBox" name="buttonBox">
-        <property name="standardButtons">
-         <set>QDialogButtonBox::Apply|QDialogButtonBox::RestoreDefaults</set>
-        </property>
-        <property name="centerButtons">
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-     </layout>
+     <layout class="QVBoxLayout" name="m_main_vlayout"/>
     </item>
    </layout>
   </widget>


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/