Clean up form files
This commit is contained in:
parent
e3c66097da
commit
ef4ea669df
|
@ -25,17 +25,11 @@ SnackbarSettingsEditor::SnackbarSettingsEditor(QWidget *parent)
|
|||
canvas->setLayout(layout);
|
||||
canvas->setMaximumHeight(300);
|
||||
|
||||
// layout->addWidget(m_snackbar);
|
||||
// layout->setAlignment(m_snackbar, Qt::AlignHCenter);
|
||||
m_snackbar->setParent(this);
|
||||
|
||||
// setupForm();
|
||||
setupForm();
|
||||
|
||||
// connect(ui->disabledCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateWidget()));
|
||||
// connect(ui->valueLineEdit, SIGNAL(textChanged(QString)), this, SLOT(updateWidget()));
|
||||
// connect(ui->orientationComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateWidget()));
|
||||
// connect(ui->invertedCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateWidget()));
|
||||
//
|
||||
// connect(m_slider, SIGNAL(valueChanged(int)), this, SLOT(setupForm()));
|
||||
connect(ui->showSnackbarButton, SIGNAL(pressed()), this, SLOT(showSnackbar()));
|
||||
}
|
||||
|
||||
SnackbarSettingsEditor::~SnackbarSettingsEditor()
|
||||
|
@ -45,38 +39,13 @@ SnackbarSettingsEditor::~SnackbarSettingsEditor()
|
|||
|
||||
void SnackbarSettingsEditor::setupForm()
|
||||
{
|
||||
// switch (m_slider->orientation())
|
||||
// {
|
||||
// case Qt::Horizontal:
|
||||
// ui->orientationComboBox->setCurrentIndex(0);
|
||||
// break;
|
||||
// case Qt::Vertical:
|
||||
// ui->orientationComboBox->setCurrentIndex(1);
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// ui->disabledCheckBox->setChecked(!m_slider->isEnabled());
|
||||
// ui->valueLineEdit->setText(QString::number(m_slider->value()));
|
||||
// ui->invertedCheckBox->setChecked(m_slider->invertedAppearance());
|
||||
}
|
||||
|
||||
void SnackbarSettingsEditor::updateWidget()
|
||||
{
|
||||
// switch (ui->orientationComboBox->currentIndex())
|
||||
// {
|
||||
// case 0:
|
||||
// m_slider->setOrientation(Qt::Horizontal);
|
||||
// break;
|
||||
// case 1:
|
||||
// m_slider->setOrientation(Qt::Vertical);
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// m_slider->setDisabled(ui->disabledCheckBox->isChecked());
|
||||
// m_slider->setValue(ui->valueLineEdit->text().toInt());
|
||||
// m_slider->setInvertedAppearance(ui->invertedCheckBox->isChecked());
|
||||
}
|
||||
|
||||
void SnackbarSettingsEditor::showSnackbar()
|
||||
{
|
||||
m_snackbar->addMessage(QString("Hello from the Snackbar"));
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ public:
|
|||
protected slots:
|
||||
void setupForm();
|
||||
void updateWidget();
|
||||
void showSnackbar();
|
||||
|
||||
private:
|
||||
Ui::SnackbarSettingsForm *const ui;
|
||||
|
|
|
@ -13,100 +13,31 @@
|
|||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="formLayoutWidget">
|
||||
<widget class="QPushButton" name="showSnackbarButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>274</width>
|
||||
<height>371</height>
|
||||
<x>20</x>
|
||||
<y>60</y>
|
||||
<width>141</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="formAlignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="disabledLabel">
|
||||
<property name="text">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="disabledCheckBox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="sizeLabel">
|
||||
<property name="text">
|
||||
<string>Size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="sizeSpinBox"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="useThemeColorsLabel">
|
||||
<property name="text">
|
||||
<string>Use theme colors</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="useThemeColorsCheckBox"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="colorLabel">
|
||||
<property name="text">
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="colorLineEdit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="colorToolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="disabledColorLabel">
|
||||
<property name="text">
|
||||
<string>Disabled color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="disabledColorLineEdit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="disabledColorToolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<property name="text">
|
||||
<string>Show snackbar</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>171</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TODO</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
|
|
@ -35,14 +35,7 @@ TabsSettingsEditor::TabsSettingsEditor(QWidget *parent)
|
|||
|
||||
m_tabs->setMinimumWidth(700);
|
||||
|
||||
// setupForm();
|
||||
|
||||
// connect(ui->disabledCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateWidget()));
|
||||
// connect(ui->valueLineEdit, SIGNAL(textChanged(QString)), this, SLOT(updateWidget()));
|
||||
// connect(ui->orientationComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateWidget()));
|
||||
// connect(ui->invertedCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateWidget()));
|
||||
//
|
||||
// connect(m_slider, SIGNAL(valueChanged(int)), this, SLOT(setupForm()));
|
||||
setupForm();
|
||||
}
|
||||
|
||||
TabsSettingsEditor::~TabsSettingsEditor()
|
||||
|
@ -52,38 +45,8 @@ TabsSettingsEditor::~TabsSettingsEditor()
|
|||
|
||||
void TabsSettingsEditor::setupForm()
|
||||
{
|
||||
// switch (m_slider->orientation())
|
||||
// {
|
||||
// case Qt::Horizontal:
|
||||
// ui->orientationComboBox->setCurrentIndex(0);
|
||||
// break;
|
||||
// case Qt::Vertical:
|
||||
// ui->orientationComboBox->setCurrentIndex(1);
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// ui->disabledCheckBox->setChecked(!m_slider->isEnabled());
|
||||
// ui->valueLineEdit->setText(QString::number(m_slider->value()));
|
||||
// ui->invertedCheckBox->setChecked(m_slider->invertedAppearance());
|
||||
}
|
||||
|
||||
void TabsSettingsEditor::updateWidget()
|
||||
{
|
||||
// switch (ui->orientationComboBox->currentIndex())
|
||||
// {
|
||||
// case 0:
|
||||
// m_slider->setOrientation(Qt::Horizontal);
|
||||
// break;
|
||||
// case 1:
|
||||
// m_slider->setOrientation(Qt::Vertical);
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// m_slider->setDisabled(ui->disabledCheckBox->isChecked());
|
||||
// m_slider->setValue(ui->valueLineEdit->text().toInt());
|
||||
// m_slider->setInvertedAppearance(ui->invertedCheckBox->isChecked());
|
||||
}
|
||||
|
|
|
@ -13,28 +13,6 @@
|
|||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="formLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>361</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="disabledLabel">
|
||||
<property name="text">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="disabledCheckBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
|
Loading…
Reference in New Issue