diff --git a/examples/snackbarsettingseditor.cpp b/examples/snackbarsettingseditor.cpp
index 04f8dde..d36fd35 100644
--- a/examples/snackbarsettingseditor.cpp
+++ b/examples/snackbarsettingseditor.cpp
@@ -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"));
}
diff --git a/examples/snackbarsettingseditor.h b/examples/snackbarsettingseditor.h
index dad0199..2e4eb0d 100644
--- a/examples/snackbarsettingseditor.h
+++ b/examples/snackbarsettingseditor.h
@@ -17,6 +17,7 @@ public:
protected slots:
void setupForm();
void updateWidget();
+ void showSnackbar();
private:
Ui::SnackbarSettingsForm *const ui;
diff --git a/examples/snackbarsettingsform.ui b/examples/snackbarsettingsform.ui
index cee3034..5d04747 100644
--- a/examples/snackbarsettingsform.ui
+++ b/examples/snackbarsettingsform.ui
@@ -13,100 +13,31 @@
Form
-
+
- 0
- 0
- 274
- 371
+ 20
+ 60
+ 141
+ 22
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
- -
-
-
- Disabled
-
-
-
- -
-
-
- -
-
-
- Size
-
-
-
- -
-
-
- -
-
-
- Use theme colors
-
-
-
- -
-
-
- -
-
-
- Color
-
-
-
- -
-
-
-
-
-
- false
-
-
-
- -
-
-
- ...
-
-
-
-
-
- -
-
-
- Disabled color
-
-
-
- -
-
-
-
-
-
- false
-
-
-
- -
-
-
- ...
-
-
-
-
-
-
+
+ Show snackbar
+
+
+
+
+
+ 20
+ 30
+ 171
+ 16
+
+
+
+ TODO
+
diff --git a/examples/tabssettingseditor.cpp b/examples/tabssettingseditor.cpp
index 24eca89..8c3f9a0 100644
--- a/examples/tabssettingseditor.cpp
+++ b/examples/tabssettingseditor.cpp
@@ -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());
}
diff --git a/examples/tabssettingsform.ui b/examples/tabssettingsform.ui
index 8c6d306..5993d58 100644
--- a/examples/tabssettingsform.ui
+++ b/examples/tabssettingsform.ui
@@ -13,28 +13,6 @@
Form
-
-
-
- 0
- 0
- 361
- 61
-
-
-
- -
-
-
- Disabled
-
-
-
- -
-
-
-
-