Skip to content

Commit

Permalink
feat: add config setting for skipping delete confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-adam committed Nov 27, 2021
1 parent 59b1a5f commit 162a8b5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/hobbits-gui/preferencesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QPainter>
#include <QSpacerItem>
#include <QSpinBox>
#include <QCheckBox>

PreferencesDialog::PreferencesDialog(QSharedPointer<const HobbitsPluginManager> pluginManager, QWidget *parent) :
QDialog(parent),
Expand Down Expand Up @@ -104,6 +105,17 @@ QLayoutItem* PreferencesDialog::createEditor(
});
return new QWidgetItem(editor);
}
else if (value.type() == QVariant::Bool) {
QCheckBox *editor = new QCheckBox(parent);
editor->setChecked(value.toBool());
connect(
editor,
&QCheckBox::toggled,
[setter](bool newVal) {
setter(QVariant(newVal));
});
return new QWidgetItem(editor);
}
else if (int(value.type()) == QMetaType::QColor) {
QPushButton *dialogLauncher = new QPushButton("Select Color...", parent);
QLabel *colorChip = new QLabel(parent);
Expand Down

0 comments on commit 162a8b5

Please sign in to comment.