summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveSite.cpp5
-rw-r--r--desktop-widgets/tab-widgets/TabDiveSite.h1
-rw-r--r--desktop-widgets/tab-widgets/TabDiveSite.ui17
3 files changed, 18 insertions, 5 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveSite.cpp b/desktop-widgets/tab-widgets/TabDiveSite.cpp
index dc0b6be67..816835dd3 100644
--- a/desktop-widgets/tab-widgets/TabDiveSite.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveSite.cpp
@@ -74,3 +74,8 @@ void TabDiveSite::on_purgeUnused_clicked()
{
Command::purgeUnusedDiveSites();
}
+
+void TabDiveSite::on_filterText_textChanged(const QString &text)
+{
+ model.setFilter(text);
+}
diff --git a/desktop-widgets/tab-widgets/TabDiveSite.h b/desktop-widgets/tab-widgets/TabDiveSite.h
index b9c07ed69..1fdaeb989 100644
--- a/desktop-widgets/tab-widgets/TabDiveSite.h
+++ b/desktop-widgets/tab-widgets/TabDiveSite.h
@@ -17,6 +17,7 @@ private slots:
void diveSiteAdded(struct dive_site *, int idx);
void diveSiteChanged(struct dive_site *ds, int field);
void on_purgeUnused_clicked();
+ void on_filterText_textChanged(const QString &text);
private:
Ui::TabDiveSite ui;
DiveSiteSortedModel model;
diff --git a/desktop-widgets/tab-widgets/TabDiveSite.ui b/desktop-widgets/tab-widgets/TabDiveSite.ui
index b536f101a..0d53b3510 100644
--- a/desktop-widgets/tab-widgets/TabDiveSite.ui
+++ b/desktop-widgets/tab-widgets/TabDiveSite.ui
@@ -15,11 +15,18 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QToolButton" name="purgeUnused">
- <property name="text">
- <string>Purge unused dive sites</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="layout">
+ <item>
+ <widget class="QToolButton" name="purgeUnused">
+ <property name="text">
+ <string>Purge unused dive sites</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="filterText"/>
+ </item>
+ </layout>
</item>
<item>
<widget class="TableView" name="diveSites" native="true"/>