Skip to content

Commit

Permalink
Make predefined filters dialog more similar to highlighters
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Feb 4, 2021
1 parent e1af31e commit 0974b57
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 37 deletions.
4 changes: 2 additions & 2 deletions src/ui/include/predefinedfilters.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#ifndef PREDEFINEDFILTERS_H_
#define PREDEFINEDFILTERS_H_

#include <unordered_map>
#include <map>

#include <QHash>
#include <QString>
Expand All @@ -60,7 +60,7 @@ namespace std {
// Represents collection of filters read from settings file.
class PredefinedFiltersCollection final : public Persistable<PredefinedFiltersCollection> {
public:
using Collection = std::unordered_map<QString, QString>;
using Collection = std::map<QString, QString>;

static const char* persistableName()
{
Expand Down
66 changes: 32 additions & 34 deletions src/ui/include/predefinedfiltersdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,43 @@
<property name="windowTitle">
<string>Predefined Filters</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,0,0,0">
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QTableWidget" name="filtersTableWidget"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="addFilterButton">
<property name="toolTip">
<string>New Filter</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../app/klogg.qrc">
<normaloff>:/images/icons8-plus-16.png</normaloff>:/images/icons8-plus-16.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="removeFilterButton">
<property name="toolTip">
<string>Remove Filter</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../app/klogg.qrc">
<normaloff>:/images/icons8-minus-16.png</normaloff>:/images/icons8-minus-16.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
Expand Down Expand Up @@ -58,38 +83,11 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="addFilterButton">
<property name="toolTip">
<string>New Filter</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../app/klogg.qrc">
<normaloff>:/images/icons8-plus-16.png</normaloff>:/images/icons8-plus-16.png
</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="removeFilterButton">
<property name="toolTip">
<string>Remove Filter</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../app/klogg.qrc">
<normaloff>:/images/icons8-minus-16.png</normaloff>:/images/icons8-minus-16.png
</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTableWidget" name="filtersTableWidget"/>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
Expand Down
2 changes: 1 addition & 1 deletion src/ui/src/predefinedfiltersdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QTimer>
#include <qtoolbutton.h>
#include <QToolButton>

#include "iconloader.h"
#include "log.h"
Expand Down

0 comments on commit 0974b57

Please sign in to comment.