propertieseditordockwidget : remove button box. (become unused with live edit mode)

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4014 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-06-15 07:33:59 +00:00
parent b9e9e8f3f6
commit 0a0da5e7cc
3 changed files with 1 additions and 66 deletions

View File

@@ -19,8 +19,6 @@
#include "ui_propertieseditordockwidget.h"
#include "propertieseditorwidget.h"
#include <QAbstractButton>
/**
* @brief PropertiesEditorDockWidget::PropertiesEditorDockWidget
* Constructor
@@ -31,9 +29,6 @@ PropertiesEditorDockWidget::PropertiesEditorDockWidget(QWidget *parent) :
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 @@ void PropertiesEditorDockWidget::clear()
}
m_editor_list.clear();
ui->buttonBox->setDisabled(true);
}
/**
@@ -101,7 +94,6 @@ bool PropertiesEditorDockWidget::addEditor(PropertiesEditorWidget *editor, int i
ui -> m_main_vlayout -> insertWidget(index, editor);
m_editor_list << editor;
setEnabledButtonBox(true);
return true;
}
@@ -126,44 +118,5 @@ bool PropertiesEditorDockWidget::removeEditor(PropertiesEditorWidget *editor)
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;
}
}