Add first icons to mainwindow. Update qrc file. Refactoring.

This commit is contained in:
Jarosław Wieczorek 2021-01-11 16:46:53 +01:00
parent 2e5202e33d
commit 6352a4d2a8
12 changed files with 56720 additions and 55667 deletions

View File

@ -18,7 +18,7 @@ def process_find_loudness(file_path: str, threshold_at_point: int, inertia_sampl
position = 0 position = 0
results = [] results = []
last_swap_position = 0 last_swap_position = 0
keep_loud_until = -1 keep_loud_until = 0
was_loud_last_time = False was_loud_last_time = False
print("Read chunks") print("Read chunks")
chunks = stream.read() chunks = stream.read()

View File

@ -3,7 +3,7 @@ import math
from find_loudness import process_find_loudness from find_loudness import process_find_loudness
graph_density = 8000 graph_density = 8000
threshold_at_point = 7 threshold_at_point = 1
inertia_s = 0.3 inertia_s = 0.3
inertia_samples = inertia_s * graph_density inertia_samples = inertia_s * graph_density

View File

@ -19,4 +19,20 @@
<file>src/gui/dicts/magicpodcast.en.qm</file> <file>src/gui/dicts/magicpodcast.en.qm</file>
<file>src/gui/dicts/magicpodcast.pl.qm</file> <file>src/gui/dicts/magicpodcast.pl.qm</file>
</qresource> </qresource>
<qresource prefix="icons">
<file>src/gui/images/icons/save.png</file>
<file>src/gui/images/icons/save_as.png</file>
<file>src/gui/images/icons/preview.png</file>
<file>src/gui/images/icons/open.png</file>
<file>src/gui/images/icons/generate.png</file>
<file>src/gui/images/icons/info.png</file>
<file>src/gui/images/icons/settings.png</file>
</qresource>
<qresource prefix="favicon">
<file>src/gui/images/icons/32x32.png</file>
<file>src/gui/images/icons/45x45.png</file>
<file>src/gui/images/icons/60x60.png</file>
</qresource>
</RCC> </RCC>

File diff suppressed because it is too large Load Diff

View File

Before

Width:  |  Height:  |  Size: 840 B

After

Width:  |  Height:  |  Size: 840 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 780 B

After

Width:  |  Height:  |  Size: 780 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -565,6 +565,10 @@
<property name="text"> <property name="text">
<string>Podgląd</string> <string>Podgląd</string>
</property> </property>
<property name="icon">
<iconset resource="../../../resources.qrc">
<normaloff>:/icons/src/gui/images/icons/preview.png</normaloff>:/icons/src/gui/images/icons/preview.png</iconset>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -572,6 +576,10 @@
<property name="text"> <property name="text">
<string>Wygeneruj podcast</string> <string>Wygeneruj podcast</string>
</property> </property>
<property name="icon">
<iconset resource="../../../resources.qrc">
<normaloff>:/icons/src/gui/images/icons/generate.png</normaloff>:/icons/src/gui/images/icons/generate.png</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -611,6 +619,10 @@
</widget> </widget>
<widget class="QStatusBar" name="status_bar"/> <widget class="QStatusBar" name="status_bar"/>
<action name="action_new"> <action name="action_new">
<property name="icon">
<iconset resource="../../../resources.qrc">
<normaloff>:/icons/src/gui/images/icons/open.png</normaloff>:/icons/src/gui/images/icons/open.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Nowy projekt</string> <string>Nowy projekt</string>
</property> </property>
@ -622,6 +634,10 @@
</property> </property>
</action> </action>
<action name="action_open"> <action name="action_open">
<property name="icon">
<iconset resource="../../../resources.qrc">
<normaloff>:/icons/src/gui/images/icons/open.png</normaloff>:/icons/src/gui/images/icons/open.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Otwórz projekt</string> <string>Otwórz projekt</string>
</property> </property>
@ -633,6 +649,10 @@
</property> </property>
</action> </action>
<action name="action_save"> <action name="action_save">
<property name="icon">
<iconset resource="../../../resources.qrc">
<normaloff>:/icons/src/gui/images/icons/save.png</normaloff>:/icons/src/gui/images/icons/save.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Zapisz projekt</string> <string>Zapisz projekt</string>
</property> </property>
@ -644,6 +664,10 @@
</property> </property>
</action> </action>
<action name="action_save_as"> <action name="action_save_as">
<property name="icon">
<iconset resource="../../../resources.qrc">
<normaloff>:/icons/src/gui/images/icons/save_as.png</normaloff>:/icons/src/gui/images/icons/save_as.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Zapisz projekt jako</string> <string>Zapisz projekt jako</string>
</property> </property>
@ -666,6 +690,10 @@
</property> </property>
</action> </action>
<action name="action_settings"> <action name="action_settings">
<property name="icon">
<iconset resource="../../../resources.qrc">
<normaloff>:/icons/src/gui/images/icons/settings.png</normaloff>:/icons/src/gui/images/icons/settings.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Ustawienia</string> <string>Ustawienia</string>
</property> </property>
@ -677,6 +705,10 @@
</property> </property>
</action> </action>
<action name="action_about"> <action name="action_about">
<property name="icon">
<iconset resource="../../../resources.qrc">
<normaloff>:/icons/src/gui/images/icons/info.png</normaloff>:/icons/src/gui/images/icons/info.png</iconset>
</property>
<property name="text"> <property name="text">
<string>O programie MagicPodcast</string> <string>O programie MagicPodcast</string>
</property> </property>
@ -688,7 +720,9 @@
</property> </property>
</action> </action>
</widget> </widget>
<resources/> <resources>
<include location="../../../resources.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>action_exit</sender> <sender>action_exit</sender>

View File

@ -239,9 +239,15 @@ class Ui_MainWindow(object):
self.h_layout_preview_or_generate = QtWidgets.QHBoxLayout() self.h_layout_preview_or_generate = QtWidgets.QHBoxLayout()
self.h_layout_preview_or_generate.setObjectName("h_layout_preview_or_generate") self.h_layout_preview_or_generate.setObjectName("h_layout_preview_or_generate")
self.button_preview = QtWidgets.QPushButton(self.central_widget) self.button_preview = QtWidgets.QPushButton(self.central_widget)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/src/gui/images/icons/preview.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.button_preview.setIcon(icon)
self.button_preview.setObjectName("button_preview") self.button_preview.setObjectName("button_preview")
self.h_layout_preview_or_generate.addWidget(self.button_preview) self.h_layout_preview_or_generate.addWidget(self.button_preview)
self.button_generate = QtWidgets.QPushButton(self.central_widget) self.button_generate = QtWidgets.QPushButton(self.central_widget)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/icons/src/gui/images/icons/generate.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.button_generate.setIcon(icon1)
self.button_generate.setObjectName("button_generate") self.button_generate.setObjectName("button_generate")
self.h_layout_preview_or_generate.addWidget(self.button_generate) self.h_layout_preview_or_generate.addWidget(self.button_generate)
self.verticalLayout.addLayout(self.h_layout_preview_or_generate) self.verticalLayout.addLayout(self.h_layout_preview_or_generate)
@ -261,18 +267,34 @@ class Ui_MainWindow(object):
self.status_bar.setObjectName("status_bar") self.status_bar.setObjectName("status_bar")
MainWindow.setStatusBar(self.status_bar) MainWindow.setStatusBar(self.status_bar)
self.action_new = QtWidgets.QAction(MainWindow) self.action_new = QtWidgets.QAction(MainWindow)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/icons/src/gui/images/icons/open.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_new.setIcon(icon2)
self.action_new.setObjectName("action_new") self.action_new.setObjectName("action_new")
self.action_open = QtWidgets.QAction(MainWindow) self.action_open = QtWidgets.QAction(MainWindow)
self.action_open.setIcon(icon2)
self.action_open.setObjectName("action_open") self.action_open.setObjectName("action_open")
self.action_save = QtWidgets.QAction(MainWindow) self.action_save = QtWidgets.QAction(MainWindow)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/icons/src/gui/images/icons/save.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_save.setIcon(icon3)
self.action_save.setObjectName("action_save") self.action_save.setObjectName("action_save")
self.action_save_as = QtWidgets.QAction(MainWindow) self.action_save_as = QtWidgets.QAction(MainWindow)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/icons/src/gui/images/icons/save_as.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_save_as.setIcon(icon4)
self.action_save_as.setObjectName("action_save_as") self.action_save_as.setObjectName("action_save_as")
self.action_exit = QtWidgets.QAction(MainWindow) self.action_exit = QtWidgets.QAction(MainWindow)
self.action_exit.setObjectName("action_exit") self.action_exit.setObjectName("action_exit")
self.action_settings = QtWidgets.QAction(MainWindow) self.action_settings = QtWidgets.QAction(MainWindow)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/icons/src/gui/images/icons/settings.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_settings.setIcon(icon5)
self.action_settings.setObjectName("action_settings") self.action_settings.setObjectName("action_settings")
self.action_about = QtWidgets.QAction(MainWindow) self.action_about = QtWidgets.QAction(MainWindow)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/icons/src/gui/images/icons/info.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_about.setIcon(icon6)
self.action_about.setObjectName("action_about") self.action_about.setObjectName("action_about")
self.menu_project.addAction(self.action_new) self.menu_project.addAction(self.action_new)
self.menu_project.addAction(self.action_open) self.menu_project.addAction(self.action_open)
@ -332,6 +354,7 @@ class Ui_MainWindow(object):
self.action_about.setText(_translate("MainWindow", "O programie MagicPodcast")) self.action_about.setText(_translate("MainWindow", "O programie MagicPodcast"))
self.action_about.setToolTip(_translate("MainWindow", "Kliknij, aby wyświetlić informacje dotyczące programu MagicPodcast")) self.action_about.setToolTip(_translate("MainWindow", "Kliknij, aby wyświetlić informacje dotyczące programu MagicPodcast"))
self.action_about.setShortcut(_translate("MainWindow", "Ctrl+I")) self.action_about.setShortcut(_translate("MainWindow", "Ctrl+I"))
import resources_rc
if __name__ == "__main__": if __name__ == "__main__":