Make the interface better
This commit is contained in:
@@ -62,6 +62,14 @@ class Ui_Dialog(object):
|
||||
self.prevBtn = QtWidgets.QPushButton(parent=self.widget)
|
||||
self.prevBtn.setObjectName("prevBtn")
|
||||
self.verticalLayout.addWidget(self.prevBtn)
|
||||
self.line = QtWidgets.QFrame(parent=self.widget)
|
||||
self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
self.line.setObjectName("line")
|
||||
self.verticalLayout.addWidget(self.line)
|
||||
self.sessionBtn = QtWidgets.QPushButton(parent=self.widget)
|
||||
self.sessionBtn.setObjectName("sessionBtn")
|
||||
self.verticalLayout.addWidget(self.sessionBtn)
|
||||
self.horizontalLayout.addWidget(self.widget)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
@@ -76,3 +84,4 @@ class Ui_Dialog(object):
|
||||
self.scrollBtn.setText(_translate("Dialog", "Scroll"))
|
||||
self.nextBtn.setText(_translate("Dialog", "Next Para"))
|
||||
self.prevBtn.setText(_translate("Dialog", "Prev Para"))
|
||||
self.sessionBtn.setText(_translate("Dialog", "Start"))
|
||||
|
||||
@@ -99,6 +99,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="sessionBtn">
|
||||
<property name="text">
|
||||
<string>Start</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -24,18 +24,25 @@ class Ui_MainWindow(object):
|
||||
self.widget.setObjectName("widget")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.widget)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.WordButton = QtWidgets.QPushButton(parent=self.widget)
|
||||
self.WordButton.setEnabled(False)
|
||||
self.WordButton.setObjectName("WordButton")
|
||||
self.verticalLayout.addWidget(self.WordButton)
|
||||
self.toggleBtn = QtWidgets.QPushButton(parent=self.widget)
|
||||
self.toggleBtn.setObjectName("toggleBtn")
|
||||
self.verticalLayout.addWidget(self.toggleBtn)
|
||||
self.readBtn = QtWidgets.QPushButton(parent=self.widget)
|
||||
self.readBtn.setObjectName("readBtn")
|
||||
self.verticalLayout.addWidget(self.readBtn)
|
||||
self.editBtn = QtWidgets.QPushButton(parent=self.widget)
|
||||
self.editBtn.setObjectName("editBtn")
|
||||
self.verticalLayout.addWidget(self.editBtn)
|
||||
self.line = QtWidgets.QFrame(parent=self.widget)
|
||||
self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
self.line.setObjectName("line")
|
||||
self.verticalLayout.addWidget(self.line)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
self.bookBtn = QtWidgets.QPushButton(parent=self.widget)
|
||||
self.bookBtn.setObjectName("bookBtn")
|
||||
self.verticalLayout.addWidget(self.bookBtn)
|
||||
self.addBtn = QtWidgets.QPushButton(parent=self.widget)
|
||||
self.addBtn.setObjectName("addBtn")
|
||||
self.verticalLayout.addWidget(self.addBtn)
|
||||
self.horizontalLayout.addWidget(self.widget)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtWidgets.QMenuBar(parent=MainWindow)
|
||||
@@ -45,25 +52,62 @@ class Ui_MainWindow(object):
|
||||
self.menuFile.setObjectName("menuFile")
|
||||
self.menuBooks = QtWidgets.QMenu(parent=self.menubar)
|
||||
self.menuBooks.setObjectName("menuBooks")
|
||||
self.menuBooks_2 = QtWidgets.QMenu(parent=self.menuBooks)
|
||||
self.menuBooks_2.setObjectName("menuBooks_2")
|
||||
self.menuPeople = QtWidgets.QMenu(parent=self.menuBooks)
|
||||
self.menuPeople.setObjectName("menuPeople")
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.statusbar = QtWidgets.QStatusBar(parent=MainWindow)
|
||||
self.statusbar.setObjectName("statusbar")
|
||||
MainWindow.setStatusBar(self.statusbar)
|
||||
self.actionQuit = QtGui.QAction(parent=MainWindow)
|
||||
self.actionQuit.setObjectName("actionQuit")
|
||||
self.actionAddBook = QtGui.QAction(parent=MainWindow)
|
||||
self.actionAddBook.setObjectName("actionAddBook")
|
||||
self.actionEditBook = QtGui.QAction(parent=MainWindow)
|
||||
self.actionEditBook.setObjectName("actionEditBook")
|
||||
self.actionAddPerson = QtGui.QAction(parent=MainWindow)
|
||||
self.actionAddPerson.setObjectName("actionAddPerson")
|
||||
self.actionEditPerson = QtGui.QAction(parent=MainWindow)
|
||||
self.actionEditPerson.setObjectName("actionEditPerson")
|
||||
self.actionRead = QtGui.QAction(parent=MainWindow)
|
||||
self.actionRead.setObjectName("actionRead")
|
||||
self.menuFile.addAction(self.actionQuit)
|
||||
self.menuBooks_2.addAction(self.actionAddBook)
|
||||
self.menuBooks_2.addAction(self.actionEditBook)
|
||||
self.menuPeople.addAction(self.actionAddPerson)
|
||||
self.menuPeople.addAction(self.actionEditPerson)
|
||||
self.menuBooks.addAction(self.menuBooks_2.menuAction())
|
||||
self.menuBooks.addAction(self.menuPeople.menuAction())
|
||||
self.menubar.addAction(self.menuFile.menuAction())
|
||||
self.menubar.addAction(self.menuBooks.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.editBtn.clicked.connect(self.actionEditPerson.trigger) # type: ignore
|
||||
self.addBtn.clicked.connect(self.actionAddPerson.trigger) # type: ignore
|
||||
self.bookBtn.clicked.connect(self.actionAddBook.trigger) # type: ignore
|
||||
self.readBtn.clicked.connect(self.actionRead.trigger) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "Reading Helper"))
|
||||
self.WordButton.setText(_translate("MainWindow", "Words"))
|
||||
self.toggleBtn.setText(_translate("MainWindow", "Enable"))
|
||||
self.readBtn.setText(_translate("MainWindow", "Read"))
|
||||
self.editBtn.setText(_translate("MainWindow", "Edit"))
|
||||
self.bookBtn.setText(_translate("MainWindow", "Add Book"))
|
||||
self.addBtn.setText(_translate("MainWindow", "Add Person"))
|
||||
self.menuFile.setTitle(_translate("MainWindow", "File"))
|
||||
self.menuBooks.setTitle(_translate("MainWindow", "Books"))
|
||||
self.menuBooks.setTitle(_translate("MainWindow", "Edit"))
|
||||
self.menuBooks_2.setTitle(_translate("MainWindow", "Books"))
|
||||
self.menuPeople.setTitle(_translate("MainWindow", "People"))
|
||||
self.actionQuit.setText(_translate("MainWindow", "Quit"))
|
||||
self.actionAddBook.setText(_translate("MainWindow", "Add"))
|
||||
self.actionAddBook.setToolTip(_translate("MainWindow", "Add Book"))
|
||||
self.actionEditBook.setText(_translate("MainWindow", "Edit"))
|
||||
self.actionEditBook.setToolTip(_translate("MainWindow", "Edit Book"))
|
||||
self.actionAddPerson.setText(_translate("MainWindow", "Add"))
|
||||
self.actionAddPerson.setToolTip(_translate("MainWindow", "Add A Person"))
|
||||
self.actionEditPerson.setText(_translate("MainWindow", "Edit"))
|
||||
self.actionEditPerson.setToolTip(_translate("MainWindow", "Edit A Person"))
|
||||
self.actionRead.setText(_translate("MainWindow", "Read"))
|
||||
self.actionRead.setToolTip(_translate("MainWindow", "Read Book"))
|
||||
|
||||
150
ui/MainWindow.ui
150
ui/MainWindow.ui
@@ -22,19 +22,23 @@
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="WordButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QPushButton" name="readBtn">
|
||||
<property name="text">
|
||||
<string>Words</string>
|
||||
<string>Read</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="toggleBtn">
|
||||
<widget class="QPushButton" name="editBtn">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -58,6 +62,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="addBtn">
|
||||
<property name="text">
|
||||
<string>Add Person</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -80,8 +91,24 @@
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuBooks">
|
||||
<property name="title">
|
||||
<string>Books</string>
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuBooks_2">
|
||||
<property name="title">
|
||||
<string>Books</string>
|
||||
</property>
|
||||
<addaction name="actionAddBook"/>
|
||||
<addaction name="actionEditBook"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuPeople">
|
||||
<property name="title">
|
||||
<string>People</string>
|
||||
</property>
|
||||
<addaction name="actionAddPerson"/>
|
||||
<addaction name="actionEditPerson"/>
|
||||
</widget>
|
||||
<addaction name="menuBooks_2"/>
|
||||
<addaction name="menuPeople"/>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
<addaction name="menuBooks"/>
|
||||
@@ -92,7 +119,112 @@
|
||||
<string>Quit</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAddBook">
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add Book</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEditBook">
|
||||
<property name="text">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Edit Book</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAddPerson">
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add A Person</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEditPerson">
|
||||
<property name="text">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Edit A Person</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRead">
|
||||
<property name="text">
|
||||
<string>Read</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Read Book</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>editBtn</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>actionEditPerson</receiver>
|
||||
<slot>trigger()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>722</x>
|
||||
<y>117</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>addBtn</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>actionAddPerson</receiver>
|
||||
<slot>trigger()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>722</x>
|
||||
<y>532</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>bookBtn</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>actionAddBook</receiver>
|
||||
<slot>trigger()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>722</x>
|
||||
<y>491</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>readBtn</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>actionRead</receiver>
|
||||
<slot>trigger()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>722</x>
|
||||
<y>67</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
||||
@@ -18,6 +18,6 @@ p, li {
|
||||
font-size: 24px;
|
||||
}
|
||||
p.phonetic {
|
||||
font-family: "Tex Gyre Heros", sans-serif;
|
||||
font-size: 32px;
|
||||
font-family: "Gentium", sans-serif;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
BIN
ui/resources.rcc
BIN
ui/resources.rcc
Binary file not shown.
Reference in New Issue
Block a user