forked from eehmke/flactag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flactag_gui.py
197 lines (189 loc) · 11.4 KB
/
flactag_gui.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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'flactag_gui.ui'
#
# Created: Mon Feb 9 00:11:52 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(956, 817)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.gridLayout = QtGui.QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.splitter = QtGui.QSplitter(self.centralwidget)
self.splitter.setOrientation(QtCore.Qt.Horizontal)
self.splitter.setObjectName(_fromUtf8("splitter"))
self.dirTreeView = QtGui.QTreeView(self.splitter)
self.dirTreeView.setObjectName(_fromUtf8("dirTreeView"))
self.fileListView = QtGui.QListView(self.splitter)
self.fileListView.setObjectName(_fromUtf8("fileListView"))
self.groupBox = QtGui.QGroupBox(self.splitter)
self.groupBox.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
self.groupBox.setObjectName(_fromUtf8("groupBox"))
self.verticalLayout_4 = QtGui.QVBoxLayout(self.groupBox)
self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
self.verticalLayout_2 = QtGui.QVBoxLayout()
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.fileNameEdit = QtGui.QLineEdit(self.groupBox)
self.fileNameEdit.setObjectName(_fromUtf8("fileNameEdit"))
self.verticalLayout_2.addWidget(self.fileNameEdit)
self.sampleRateLabel = QtGui.QLabel(self.groupBox)
self.sampleRateLabel.setObjectName(_fromUtf8("sampleRateLabel"))
self.verticalLayout_2.addWidget(self.sampleRateLabel)
self.bitDepthLabel = QtGui.QLabel(self.groupBox)
self.bitDepthLabel.setObjectName(_fromUtf8("bitDepthLabel"))
self.verticalLayout_2.addWidget(self.bitDepthLabel)
self.lengthLabel = QtGui.QLabel(self.groupBox)
self.lengthLabel.setObjectName(_fromUtf8("lengthLabel"))
self.verticalLayout_2.addWidget(self.lengthLabel)
self.horizontalLayout_3 = QtGui.QHBoxLayout()
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.channelsLabel = QtGui.QLabel(self.groupBox)
self.channelsLabel.setObjectName(_fromUtf8("channelsLabel"))
self.horizontalLayout_3.addWidget(self.channelsLabel)
self.colorLabel = QtGui.QLabel(self.groupBox)
self.colorLabel.setText(_fromUtf8(""))
self.colorLabel.setObjectName(_fromUtf8("colorLabel"))
self.horizontalLayout_3.addWidget(self.colorLabel)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
self.verticalLayout_4.addLayout(self.verticalLayout_2)
self.tabWidget = QtGui.QTabWidget(self.groupBox)
self.tabWidget.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.tab = QtGui.QWidget()
self.tab.setObjectName(_fromUtf8("tab"))
self.verticalLayout = QtGui.QVBoxLayout(self.tab)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.gridLayout_2 = QtGui.QGridLayout()
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.buttonAdd = QtGui.QPushButton(self.tab)
self.buttonAdd.setObjectName(_fromUtf8("buttonAdd"))
self.gridLayout_2.addWidget(self.buttonAdd, 0, 0, 1, 1)
self.buttonAddHires = QtGui.QPushButton(self.tab)
self.buttonAddHires.setObjectName(_fromUtf8("buttonAddHires"))
self.gridLayout_2.addWidget(self.buttonAddHires, 0, 1, 1, 2)
self.buttonDelete = QtGui.QPushButton(self.tab)
self.buttonDelete.setObjectName(_fromUtf8("buttonDelete"))
self.gridLayout_2.addWidget(self.buttonDelete, 1, 0, 1, 2)
spacerItem = QtGui.QSpacerItem(212, 18, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_2.addItem(spacerItem, 1, 2, 1, 1)
self.verticalLayout.addLayout(self.gridLayout_2)
self.tagListView = QtGui.QTableView(self.tab)
self.tagListView.setObjectName(_fromUtf8("tagListView"))
self.verticalLayout.addWidget(self.tagListView)
self.tabWidget.addTab(self.tab, _fromUtf8(""))
self.tab_2 = QtGui.QWidget()
self.tab_2.setObjectName(_fromUtf8("tab_2"))
self.gridLayout_3 = QtGui.QGridLayout(self.tab_2)
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
self.verticalLayout_3 = QtGui.QVBoxLayout()
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.buttonAddPicture = QtGui.QPushButton(self.tab_2)
self.buttonAddPicture.setObjectName(_fromUtf8("buttonAddPicture"))
self.horizontalLayout_2.addWidget(self.buttonAddPicture)
self.buttonDeletePicture = QtGui.QPushButton(self.tab_2)
self.buttonDeletePicture.setObjectName(_fromUtf8("buttonDeletePicture"))
self.horizontalLayout_2.addWidget(self.buttonDeletePicture)
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
self.labelPicture = QtGui.QLabel(self.tab_2)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.labelPicture.sizePolicy().hasHeightForWidth())
self.labelPicture.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(14)
font.setBold(True)
font.setWeight(75)
self.labelPicture.setFont(font)
self.labelPicture.setScaledContents(False)
self.labelPicture.setAlignment(QtCore.Qt.AlignCenter)
self.labelPicture.setObjectName(_fromUtf8("labelPicture"))
self.verticalLayout_3.addWidget(self.labelPicture)
self.gridLayout_3.addLayout(self.verticalLayout_3, 0, 0, 1, 1)
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
self.verticalLayout_4.addWidget(self.tabWidget)
self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 956, 23))
self.menubar.setObjectName(_fromUtf8("menubar"))
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName(_fromUtf8("menuFile"))
self.menu_Help = QtGui.QMenu(self.menubar)
self.menu_Help.setObjectName(_fromUtf8("menu_Help"))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
MainWindow.setStatusBar(self.statusbar)
self.toolBar = QtGui.QToolBar(MainWindow)
self.toolBar.setObjectName(_fromUtf8("toolBar"))
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.actionOpen_File = QtGui.QAction(MainWindow)
self.actionOpen_File.setObjectName(_fromUtf8("actionOpen_File"))
self.action_Quit = QtGui.QAction(MainWindow)
self.action_Quit.setObjectName(_fromUtf8("action_Quit"))
self.action_Save = QtGui.QAction(MainWindow)
self.action_Save.setObjectName(_fromUtf8("action_Save"))
self.action_Help = QtGui.QAction(MainWindow)
self.action_Help.setObjectName(_fromUtf8("action_Help"))
self.action_About = QtGui.QAction(MainWindow)
self.action_About.setObjectName(_fromUtf8("action_About"))
self.menuFile.addAction(self.actionOpen_File)
self.menuFile.addAction(self.action_Save)
self.menuFile.addSeparator()
self.menuFile.addAction(self.action_Quit)
self.menu_Help.addAction(self.action_About)
self.menu_Help.addAction(self.action_Help)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menu_Help.menuAction())
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "FLAC Tagger", None))
self.groupBox.setTitle(_translate("MainWindow", "FLAC File", None))
self.sampleRateLabel.setText(_translate("MainWindow", "Sample rate", None))
self.bitDepthLabel.setText(_translate("MainWindow", "Bits per sample", None))
self.lengthLabel.setText(_translate("MainWindow", "Length", None))
self.channelsLabel.setText(_translate("MainWindow", "Channels", None))
self.buttonAdd.setToolTip(_translate("MainWindow", "Add new empty tag", None))
self.buttonAdd.setText(_translate("MainWindow", "Add Tag", None))
self.buttonAddHires.setToolTip(_translate("MainWindow", "<html><head/><body><p>Calculate phc tag based on artist and title, add relevant tags.</p><p>This will activate the blue LED on the Pono when this song is played.</p><p><br/></p></body></html>", None))
self.buttonAddHires.setText(_translate("MainWindow", "add HiRes Tags", None))
self.buttonDelete.setToolTip(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'DejaVu Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Delete selected tag</p></body></html>", None))
self.buttonDelete.setText(_translate("MainWindow", "Delete Tag", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Tags", None))
self.buttonAddPicture.setText(_translate("MainWindow", "Add Picture", None))
self.buttonDeletePicture.setText(_translate("MainWindow", "Delete Picture", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Pictures", None))
self.menuFile.setTitle(_translate("MainWindow", "&File", None))
self.menu_Help.setTitle(_translate("MainWindow", "&Help", None))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar", None))
self.actionOpen_File.setText(_translate("MainWindow", "Open &File", None))
self.action_Quit.setText(_translate("MainWindow", "&Quit", None))
self.action_Save.setText(_translate("MainWindow", "&Save", None))
self.action_Help.setText(_translate("MainWindow", "&Help", None))
self.action_About.setText(_translate("MainWindow", "&About", None))