summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-12-16 13:04:58 +0100
committerStanislaw Halik <sthalik@misaki.pl>2021-12-16 15:32:04 +0100
commita65df8d58184e06c07f0e8d28d4482f03aca0b57 (patch)
tree1a2192226d60548452a3d562dc29aeed0fad579a
parent69555ddc87fe727d59385e1752d3ba66aa5549ee (diff)
filter/accela: allow embedding
-rw-r--r--filter-accela/ftnoir_accela_filtercontrols.ui35
-rw-r--r--filter-accela/ftnoir_filter_accela.h5
-rw-r--r--filter-accela/ftnoir_filter_accela_dialog.cpp10
3 files changed, 38 insertions, 12 deletions
diff --git a/filter-accela/ftnoir_accela_filtercontrols.ui b/filter-accela/ftnoir_accela_filtercontrols.ui
index ce9f52a2..899f4920 100644
--- a/filter-accela/ftnoir_accela_filtercontrols.ui
+++ b/filter-accela/ftnoir_accela_filtercontrols.ui
@@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>550</width>
- <height>275</height>
+ <height>279</height>
</rect>
</property>
<property name="sizePolicy">
@@ -276,6 +276,19 @@
<zorder>label</zorder>
</widget>
</item>
+ <item row="3" column="0">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
<item row="2" column="0">
<widget class="QLabel" name="label_9">
<property name="sizePolicy">
@@ -321,18 +334,18 @@
</property>
</widget>
</item>
- <item row="3" column="0">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="4" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>1</height>
+ </size>
</property>
- </widget>
+ </spacer>
</item>
</layout>
</widget>
diff --git a/filter-accela/ftnoir_filter_accela.h b/filter-accela/ftnoir_filter_accela.h
index 6471a7b8..ddd3bc03 100644
--- a/filter-accela/ftnoir_filter_accela.h
+++ b/filter-accela/ftnoir_filter_accela.h
@@ -45,9 +45,12 @@ public:
dialog_accela();
void register_filter(IFilter*) override {}
void unregister_filter() override {}
+ void save() override;
+ void reload() override;
+ bool embeddable() noexcept override { return true; }
+ void set_buttons_visible(bool x) override;
private:
Ui::AccelaUICdialog_accela ui;
- void save();
settings_accela s;
private slots:
void doOK();
diff --git a/filter-accela/ftnoir_filter_accela_dialog.cpp b/filter-accela/ftnoir_filter_accela_dialog.cpp
index 37f265e1..6a0a35b0 100644
--- a/filter-accela/ftnoir_filter_accela_dialog.cpp
+++ b/filter-accela/ftnoir_filter_accela_dialog.cpp
@@ -78,3 +78,13 @@ void dialog_accela::save()
{
s.b->save();
}
+
+void dialog_accela::reload()
+{
+ s.b->reload();
+}
+
+void dialog_accela::set_buttons_visible(bool x)
+{
+ ui.buttonBox->setVisible(x);
+}