-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqtui.py
More file actions
149 lines (140 loc) · 8.07 KB
/
qtui.py
File metadata and controls
149 lines (140 loc) · 8.07 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'qtui.ui'
#
# Created by: PyQt5 UI code generator 5.15.11
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_main_window(object):
def setupUi(self, main_window):
main_window.setObjectName("main_window")
main_window.setEnabled(True)
main_window.resize(1008, 571)
self.centralwidget = QtWidgets.QWidget(main_window)
self.centralwidget.setLayoutDirection(QtCore.Qt.LeftToRight)
self.centralwidget.setAutoFillBackground(False)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.verticalLayout.setObjectName("verticalLayout")
self.top_layout = QtWidgets.QHBoxLayout()
self.top_layout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.top_layout.setObjectName("top_layout")
self.input_layout = QtWidgets.QVBoxLayout()
self.input_layout.setContentsMargins(-1, 9, -1, -1)
self.input_layout.setObjectName("input_layout")
self.path_input = QtWidgets.QLineEdit(self.centralwidget)
self.path_input.setMinimumSize(QtCore.QSize(0, 34))
self.path_input.setObjectName("path_input")
self.input_layout.addWidget(self.path_input)
self.bottom_input_layout = QtWidgets.QHBoxLayout()
self.bottom_input_layout.setObjectName("bottom_input_layout")
self.show_dirs_checkbox = QtWidgets.QCheckBox(self.centralwidget)
self.show_dirs_checkbox.setObjectName("show_dirs_checkbox")
self.bottom_input_layout.addWidget(self.show_dirs_checkbox)
self.show_hidden_checkbox = QtWidgets.QCheckBox(self.centralwidget)
self.show_hidden_checkbox.setObjectName("show_hidden_checkbox")
self.bottom_input_layout.addWidget(self.show_hidden_checkbox)
self.altsort_checkbox = QtWidgets.QCheckBox(self.centralwidget)
self.altsort_checkbox.setTristate(True)
self.altsort_checkbox.setObjectName("altsort_checkbox")
self.bottom_input_layout.addWidget(self.altsort_checkbox)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.bottom_input_layout.addItem(spacerItem)
self.input_layout.addLayout(self.bottom_input_layout)
self.top_layout.addLayout(self.input_layout)
self.button_layout = QtWidgets.QVBoxLayout()
self.button_layout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.button_layout.setContentsMargins(0, 8, 0, -1)
self.button_layout.setObjectName("button_layout")
self.back_button = QtWidgets.QPushButton(self.centralwidget)
self.back_button.setObjectName("back_button")
self.button_layout.addWidget(self.back_button)
self.folder_perms_button = QtWidgets.QPushButton(self.centralwidget)
self.folder_perms_button.setObjectName("folder_perms_button")
self.button_layout.addWidget(self.folder_perms_button)
self.top_layout.addLayout(self.button_layout)
self.verticalLayout.addLayout(self.top_layout)
self.container_widget = QtWidgets.QWidget(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.container_widget.sizePolicy().hasHeightForWidth())
self.container_widget.setSizePolicy(sizePolicy)
self.container_widget.setLayoutDirection(QtCore.Qt.LeftToRight)
self.container_widget.setObjectName("container_widget")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.container_widget)
self.horizontalLayout_2.setContentsMargins(-1, -1, -1, 0)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.scrollArea = QtWidgets.QScrollArea(self.container_widget)
self.scrollArea.setFrameShape(QtWidgets.QFrame.NoFrame)
self.scrollArea.setFrameShadow(QtWidgets.QFrame.Sunken)
self.scrollArea.setLineWidth(0)
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.scrollArea.setObjectName("scrollArea")
self.scrollAreaWidgetContents = QtWidgets.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 972, 111))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.scrollAreaWidgetContents.sizePolicy().hasHeightForWidth())
self.scrollAreaWidgetContents.setSizePolicy(sizePolicy)
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.scrollAreaWidgetContents)
self.horizontalLayout.setContentsMargins(-1, -1, -1, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.main_grid = QtWidgets.QGridLayout()
self.main_grid.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
self.main_grid.setContentsMargins(-1, -1, -1, 0)
self.main_grid.setSpacing(10)
self.main_grid.setObjectName("main_grid")
self.test_grid_button = QtWidgets.QPushButton(self.scrollAreaWidgetContents)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.test_grid_button.sizePolicy().hasHeightForWidth())
self.test_grid_button.setSizePolicy(sizePolicy)
self.test_grid_button.setMinimumSize(QtCore.QSize(200, 100))
self.test_grid_button.setMaximumSize(QtCore.QSize(200, 100))
font = QtGui.QFont()
font.setBold(True)
font.setItalic(False)
font.setUnderline(True)
font.setWeight(75)
font.setKerning(True)
self.test_grid_button.setFont(font)
self.test_grid_button.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.test_grid_button.setMouseTracking(False)
self.test_grid_button.setAutoFillBackground(False)
self.test_grid_button.setCheckable(False)
self.test_grid_button.setAutoDefault(False)
self.test_grid_button.setDefault(False)
self.test_grid_button.setFlat(False)
self.test_grid_button.setObjectName("test_grid_button")
self.main_grid.addWidget(self.test_grid_button, 0, 0, 1, 1)
self.horizontalLayout.addLayout(self.main_grid)
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
self.horizontalLayout_2.addWidget(self.scrollArea)
self.verticalLayout.addWidget(self.container_widget)
main_window.setCentralWidget(self.centralwidget)
self.retranslateUi(main_window)
QtCore.QMetaObject.connectSlotsByName(main_window)
def retranslateUi(self, main_window):
_translate = QtCore.QCoreApplication.translate
main_window.setWindowTitle(_translate("main_window", "Permission Manager"))
self.show_dirs_checkbox.setText(_translate("main_window", "Show direcotries"))
self.show_hidden_checkbox.setText(_translate("main_window", "Show hidden"))
self.altsort_checkbox.setText(_translate("main_window", "Alternative sort"))
self.back_button.setText(_translate("main_window", "Back"))
self.folder_perms_button.setText(_translate("main_window", "Folder Perms"))
self.test_grid_button.setText(_translate("main_window", "testing"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
main_window = QtWidgets.QMainWindow()
ui = Ui_main_window()
ui.setupUi(main_window)
main_window.show()
sys.exit(app.exec_())