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->setLayout(layout);
|
||||||
canvas->setMaximumHeight(300);
|
canvas->setMaximumHeight(300);
|
||||||
|
|
||||||
// layout->addWidget(m_snackbar);
|
m_snackbar->setParent(this);
|
||||||
// layout->setAlignment(m_snackbar, Qt::AlignHCenter);
|
|
||||||
|
|
||||||
// setupForm();
|
setupForm();
|
||||||
|
|
||||||
// connect(ui->disabledCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateWidget()));
|
connect(ui->showSnackbarButton, SIGNAL(pressed()), this, SLOT(showSnackbar()));
|
||||||
// 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()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SnackbarSettingsEditor::~SnackbarSettingsEditor()
|
SnackbarSettingsEditor::~SnackbarSettingsEditor()
|
||||||
|
@ -45,38 +39,13 @@ SnackbarSettingsEditor::~SnackbarSettingsEditor()
|
||||||
|
|
||||||
void SnackbarSettingsEditor::setupForm()
|
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()
|
void SnackbarSettingsEditor::updateWidget()
|
||||||
{
|
{
|
||||||
// switch (ui->orientationComboBox->currentIndex())
|
}
|
||||||
// {
|
|
||||||
// case 0:
|
void SnackbarSettingsEditor::showSnackbar()
|
||||||
// m_slider->setOrientation(Qt::Horizontal);
|
{
|
||||||
// break;
|
m_snackbar->addMessage(QString("Hello from the Snackbar"));
|
||||||
// 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());
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ public:
|
||||||
protected slots:
|
protected slots:
|
||||||
void setupForm();
|
void setupForm();
|
||||||
void updateWidget();
|
void updateWidget();
|
||||||
|
void showSnackbar();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::SnackbarSettingsForm *const ui;
|
Ui::SnackbarSettingsForm *const ui;
|
||||||
|
|
|
@ -13,100 +13,31 @@
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="formLayoutWidget">
|
<widget class="QPushButton" name="showSnackbarButton">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>20</x>
|
||||||
<y>0</y>
|
<y>60</y>
|
||||||
<width>274</width>
|
<width>141</width>
|
||||||
<height>371</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<property name="text">
|
||||||
<property name="formAlignment">
|
<string>Show snackbar</string>
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<item row="0" column="0">
|
<widget class="QLabel" name="label">
|
||||||
<widget class="QLabel" name="disabledLabel">
|
<property name="geometry">
|
||||||
<property name="text">
|
<rect>
|
||||||
<string>Disabled</string>
|
<x>20</x>
|
||||||
</property>
|
<y>30</y>
|
||||||
</widget>
|
<width>171</width>
|
||||||
</item>
|
<height>16</height>
|
||||||
<item row="0" column="1">
|
</rect>
|
||||||
<widget class="QCheckBox" name="disabledCheckBox"/>
|
</property>
|
||||||
</item>
|
<property name="text">
|
||||||
<item row="1" column="0">
|
<string>TODO</string>
|
||||||
<widget class="QLabel" name="sizeLabel">
|
</property>
|
||||||
<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>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|
|
@ -35,14 +35,7 @@ TabsSettingsEditor::TabsSettingsEditor(QWidget *parent)
|
||||||
|
|
||||||
m_tabs->setMinimumWidth(700);
|
m_tabs->setMinimumWidth(700);
|
||||||
|
|
||||||
// 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()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TabsSettingsEditor::~TabsSettingsEditor()
|
TabsSettingsEditor::~TabsSettingsEditor()
|
||||||
|
@ -52,38 +45,8 @@ TabsSettingsEditor::~TabsSettingsEditor()
|
||||||
|
|
||||||
void TabsSettingsEditor::setupForm()
|
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()
|
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">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</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">
|
<widget class="QLabel" name="label">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
|
|
Loading…
Reference in New Issue