-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgui_filter.py
100 lines (94 loc) · 5.83 KB
/
gui_filter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'D:\Apps\DEV\PROJECTS\KoHighlights\gui_filter.ui',
# licensing of 'D:\Apps\DEV\PROJECTS\KoHighlights\gui_filter.ui' applies.
#
# Created: Thu May 2 17:29:33 2024
# by: pyside2-uic running on PySide2 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore, QtGui, QtWidgets
class Ui_Filter(object):
def setupUi(self, Filter):
Filter.setObjectName("Filter")
Filter.resize(215, 66)
Filter.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
self.verticalLayout = QtWidgets.QVBoxLayout(Filter)
self.verticalLayout.setContentsMargins(4, 4, 4, 4)
self.verticalLayout.setObjectName("verticalLayout")
self.filter_frm1 = QtWidgets.QFrame(Filter)
self.filter_frm1.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.filter_frm1.setFrameShadow(QtWidgets.QFrame.Raised)
self.filter_frm1.setObjectName("filter_frm1")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.filter_frm1)
self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.filter_txt = QtWidgets.QLineEdit(self.filter_frm1)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.filter_txt.sizePolicy().hasHeightForWidth())
self.filter_txt.setSizePolicy(sizePolicy)
self.filter_txt.setText("")
self.filter_txt.setObjectName("filter_txt")
self.horizontalLayout_4.addWidget(self.filter_txt)
self.filter_btn = QtWidgets.QPushButton(self.filter_frm1)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.filter_btn.sizePolicy().hasHeightForWidth())
self.filter_btn.setSizePolicy(sizePolicy)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/stuff/filter.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.filter_btn.setIcon(icon)
self.filter_btn.setObjectName("filter_btn")
self.horizontalLayout_4.addWidget(self.filter_btn)
self.verticalLayout.addWidget(self.filter_frm1)
self.filter_frm2 = QtWidgets.QFrame(Filter)
self.filter_frm2.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.filter_frm2.setFrameShadow(QtWidgets.QFrame.Raised)
self.filter_frm2.setObjectName("filter_frm2")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.filter_frm2)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.filter_box = QtWidgets.QComboBox(self.filter_frm2)
self.filter_box.setObjectName("filter_box")
self.filter_box.addItem("")
self.filter_box.addItem("")
self.filter_box.addItem("")
self.filter_box.addItem("")
self.horizontalLayout.addWidget(self.filter_box)
self.filtered_lbl = QtWidgets.QLabel(self.filter_frm2)
self.filtered_lbl.setText("")
self.filtered_lbl.setObjectName("filtered_lbl")
self.horizontalLayout.addWidget(self.filtered_lbl)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.clear_filter_btn = QtWidgets.QPushButton(self.filter_frm2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.clear_filter_btn.sizePolicy().hasHeightForWidth())
self.clear_filter_btn.setSizePolicy(sizePolicy)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/stuff/trash.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.clear_filter_btn.setIcon(icon1)
self.clear_filter_btn.setObjectName("clear_filter_btn")
self.horizontalLayout.addWidget(self.clear_filter_btn)
self.verticalLayout.addWidget(self.filter_frm2)
self.retranslateUi(Filter)
self.filter_box.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(Filter)
def retranslateUi(self, Filter):
self.filter_txt.setToolTip(QtWidgets.QApplication.translate("Filter", "Type the keywords to filter the visible items", None, -1))
self.filter_txt.setPlaceholderText(QtWidgets.QApplication.translate("Filter", "Type here to filter...", None, -1))
self.filter_btn.setToolTip(QtWidgets.QApplication.translate("Filter", "Set filter", None, -1))
self.filter_btn.setText(QtWidgets.QApplication.translate("Filter", "Filter", None, -1))
self.filter_box.setToolTip(QtWidgets.QApplication.translate("Filter", "Select where to search for the keywords", None, -1))
self.filter_box.setItemText(0, QtWidgets.QApplication.translate("Filter", "Filter All:", None, -1))
self.filter_box.setItemText(1, QtWidgets.QApplication.translate("Filter", "Filter Highlights:", None, -1))
self.filter_box.setItemText(2, QtWidgets.QApplication.translate("Filter", "Filter Comments:", None, -1))
self.filter_box.setItemText(3, QtWidgets.QApplication.translate("Filter", "Filter Book Titles:", None, -1))
self.clear_filter_btn.setToolTip(QtWidgets.QApplication.translate("Filter", "Clear the filter field", None, -1))
self.clear_filter_btn.setStatusTip(QtWidgets.QApplication.translate("Filter", "Clears the filter field", None, -1))
self.clear_filter_btn.setText(QtWidgets.QApplication.translate("Filter", "Clear", None, -1))
import images_rc