Merge branch 'develop'
This commit is contained in:
commit
23053c0ce8
BIN
docs/Stan aplikacji.docx
Normal file
BIN
docs/Stan aplikacji.docx
Normal file
Binary file not shown.
1
docs/info.md
Normal file
1
docs/info.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
#In this folder you will find all the documentation for the MagicPodcast project.
|
2
generate_linguist_update.sh
Executable file
2
generate_linguist_update.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
pipenv run python -m PyQt5.pylupdate_main 'magicpodcast.pro'
|
2
generate_pyrcc_update.sh
Executable file
2
generate_pyrcc_update.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
pipenv run python -m PyQt5.pyrcc_main resources.qrc -o resources_rc.py
|
9
magicpodcast.pro
Normal file
9
magicpodcast.pro
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# magicpodcast.pro
|
||||||
|
SOURCES += src/python/ui/mainwindow_ui.py
|
||||||
|
src/python/ui/settings_dialog_ui.py \
|
||||||
|
src/python/ui/preview_dialog_ui.py
|
||||||
|
|
||||||
|
TRANSLATIONS += src/gui/dicts/magicpodcast.pl.ts \
|
||||||
|
src/gui/dicts/magicpodcast.en.ts
|
||||||
|
|
||||||
|
RESOURCES += resources.qrc
|
@ -1,7 +1,7 @@
|
|||||||
[pylama]
|
[pylama]
|
||||||
linters = pep8,pyflakes
|
linters = pep8,pyflakes
|
||||||
format = pylint
|
format = pylint
|
||||||
skip = *_ui.py
|
skip = *_ui.py,*/.env/*,node_modules/*,resources_rc.py
|
||||||
#ignore = E201,E202,E231,E701
|
#ignore = E201,E202,E231,E701
|
||||||
|
|
||||||
|
|
||||||
|
22
resources.qrc
Normal file
22
resources.qrc
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="left">
|
||||||
|
<file>src/gui/images/left.png</file>
|
||||||
|
</qresource>
|
||||||
|
|
||||||
|
<qresource prefix="right">
|
||||||
|
<file>src/gui/images/right.png</file>
|
||||||
|
</qresource>
|
||||||
|
|
||||||
|
<qresource prefix="none">
|
||||||
|
<file>src/gui/images/none.png</file>
|
||||||
|
</qresource>
|
||||||
|
|
||||||
|
<qresource prefix="both">
|
||||||
|
<file>src/gui/images/both.png</file>
|
||||||
|
</qresource>
|
||||||
|
|
||||||
|
<qresource prefix="language">
|
||||||
|
<file>src/gui/dicts/magicpodcast.en.qm</file>
|
||||||
|
<file>src/gui/dicts/magicpodcast.pl.qm</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
110697
resources_rc.py
Normal file
110697
resources_rc.py
Normal file
File diff suppressed because it is too large
Load Diff
164
src/gui/dicts/dictionary.qph
Normal file
164
src/gui/dicts/dictionary.qph
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
<!DOCTYPE QPH>
|
||||||
|
<QPH language="en_GB" sourcelanguage="pl_PL">
|
||||||
|
<phrase>
|
||||||
|
<source>Plik audio 1 rozmówcy</source>
|
||||||
|
<target>Audio file 1 speaker</target>
|
||||||
|
<definition>speaker_audio_first</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Imię 1 rozmówcy</source>
|
||||||
|
<target>Name of 1 speaker</target>
|
||||||
|
<definition>speaker_name_first</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Dodaj audio 1</source>
|
||||||
|
<target>Add audio 1</target>
|
||||||
|
<definition>add_audio_first</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Plik audio 2 rozmówcy</source>
|
||||||
|
<target>Audio file 2 speaker</target>
|
||||||
|
<definition>speaker_audio_second</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Dodaj audio 2</source>
|
||||||
|
<target>Add audio 2</target>
|
||||||
|
<definition>add_audio_second</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source> Imię 2 rozmówcy</source>
|
||||||
|
<target> Name of 2 speaker</target>
|
||||||
|
<definition>speaker_name_second</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Zaznacz jeśli kanały rozmówców są połączone w jednym nagraniu</source>
|
||||||
|
<target>Mark if the speaker channels are connected in one recording</target>
|
||||||
|
<definition>mark_connected_channels</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Podgląd - rozmówcy aktywni</source>
|
||||||
|
<target>Preview - active speakers</target>
|
||||||
|
<definition>preview_active_speakers</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Rozmówcy - aktywni</source>
|
||||||
|
<target>Speakers - active</target>
|
||||||
|
<definition>active_speakers</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Podgląd - rozmówcy nieaktywni</source>
|
||||||
|
<target>Preview - speakers inactive</target>
|
||||||
|
<definition>preview_inactive_speakers</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Rozmówcy - nieaktywni</source>
|
||||||
|
<target>Speakers - inactive</target>
|
||||||
|
<definition>inactive_speakers</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Podgląd - 1 rozmówca aktywny</source>
|
||||||
|
<target>Preview - 1 speaker active</target>
|
||||||
|
<definition>preview_active_first_speaker</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Pierwszy rozmówca - aktywny</source>
|
||||||
|
<target>First speaker - active</target>
|
||||||
|
<definition>active_first_speaker</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Podgląd - 2 rozmówca aktywny</source>
|
||||||
|
<target>Preview - 2 speaker active</target>
|
||||||
|
<definition>preview_active_second_speaker</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Drugi rozmówca - aktywny</source>
|
||||||
|
<target>Second speaker - active</target>
|
||||||
|
<definition>active_second_speaker</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Poziom wykrywania głosu</source>
|
||||||
|
<target>Voice detection level</target>
|
||||||
|
<definition>voice_detection_level</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Podgląd podcastu</source>
|
||||||
|
<target>Preview a podcast</target>
|
||||||
|
<definition>podcast_preview</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Projekt</source>
|
||||||
|
<target>Project</target>
|
||||||
|
<definition>project</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Nowy projekt</source>
|
||||||
|
<target>New project</target>
|
||||||
|
<definition>new_project</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Kliknij, aby utwórzyć nowy projekt</source>
|
||||||
|
<target>Click to create a new project</target>
|
||||||
|
<definition>create_new_project</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Otwórz projekt</source>
|
||||||
|
<target>Open a project</target>
|
||||||
|
<definition>open_project</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Kliknij, aby otworzyć istniejący projekt</source>
|
||||||
|
<target>Click to open an existing project</target>
|
||||||
|
<definition>tooltip_open_project
|
||||||
|
</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Zapisz projekt</source>
|
||||||
|
<target>Save the project</target>
|
||||||
|
<definition>save_project</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Kliknij, aby zapisać aktualny projekt</source>
|
||||||
|
<target>Click to save the current project</target>
|
||||||
|
<definition>tooltip_save_project</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Zapisz projekt jako</source>
|
||||||
|
<target>Save the project as</target>
|
||||||
|
<definition>save_project_as</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Kliknij, aby zapisać projekt jako</source>
|
||||||
|
<target>Click to save the project as</target>
|
||||||
|
<definition>tooltip_save_project_as</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Zamknij program</source>
|
||||||
|
<target>Close the program</target>
|
||||||
|
<definition>close_program</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Kliknij, aby zakończyć działanie programu</source>
|
||||||
|
<target>Click to end the program</target>
|
||||||
|
<definition>tooltip_close_program</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Ustawienia</source>
|
||||||
|
<target>Settings</target>
|
||||||
|
<definition>settings</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Kliknij, aby przejść do ustawień programu</source>
|
||||||
|
<target>Click to go to program settings</target>
|
||||||
|
<definition>tooltip_settings</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>O programie MagicPodcast</source>
|
||||||
|
<target>About the MagicPodcast program</target>
|
||||||
|
<definition>about_program</definition>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
<source>Kliknij, aby wyświetlić informacje dotyczące programu MagicPodcast</source>
|
||||||
|
<target>Click to view MagicPodcast information</target>
|
||||||
|
<definition>tooltip_about_program</definition>
|
||||||
|
</phrase>
|
||||||
|
</QPH>
|
BIN
src/gui/dicts/magicpodcast.en.qm
Normal file
BIN
src/gui/dicts/magicpodcast.en.qm
Normal file
Binary file not shown.
212
src/gui/dicts/magicpodcast.en.ts
Normal file
212
src/gui/dicts/magicpodcast.en.ts
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="en_GB" sourcelanguage="pl_PL">
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="294"/>
|
||||||
|
<source>MagicPodcast</source>
|
||||||
|
<translation>MagicPodcast</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="295"/>
|
||||||
|
<source>Plik audio 1 rozmówcy</source>
|
||||||
|
<translation>Audio file 1 speaker</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="296"/>
|
||||||
|
<source>Imię 1 rozmówcy</source>
|
||||||
|
<translation>Name of 1 speaker</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="297"/>
|
||||||
|
<source>Dodaj audio 1</source>
|
||||||
|
<translation>Add audio 1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="298"/>
|
||||||
|
<source>Plik audio 2 rozmówcy</source>
|
||||||
|
<translation>Audio file 2 speaker</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="299"/>
|
||||||
|
<source>Imię 2 rozmówcy</source>
|
||||||
|
<translation>Name of 2 speaker</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="300"/>
|
||||||
|
<source>Dodaj audio 2</source>
|
||||||
|
<translation>Add audio 2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="301"/>
|
||||||
|
<source>Zaznacz jeśli kanały rozmówców są połączone w jednym nagraniu</source>
|
||||||
|
<translation>Mark if the speaker channels are connected in one recording</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="302"/>
|
||||||
|
<source>Podgląd - rozmówcy aktywni</source>
|
||||||
|
<translation>Preview - active speakers</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="303"/>
|
||||||
|
<source>Rozmówcy - aktywni</source>
|
||||||
|
<translation>Speakers - active</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="304"/>
|
||||||
|
<source>Podgląd - rozmówcy nieaktywni</source>
|
||||||
|
<translation>Preview - speakers inactive</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="305"/>
|
||||||
|
<source>Rozmówcy - nieaktywni</source>
|
||||||
|
<translation>Speakers - inactive</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="306"/>
|
||||||
|
<source>Podgląd - 1 rozmówca aktywny</source>
|
||||||
|
<translation>Preview - 1 speaker active</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="307"/>
|
||||||
|
<source>Pierwszy rozmówca - aktywny</source>
|
||||||
|
<translation>First speaker - active</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="308"/>
|
||||||
|
<source>Podgląd - 2 rozmówca aktywny</source>
|
||||||
|
<translation>Preview - 2 speaker active</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="309"/>
|
||||||
|
<source>Drugi rozmówca - aktywny</source>
|
||||||
|
<translation>Second speaker - active</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="310"/>
|
||||||
|
<source>Poziom wykrywania głosu:</source>
|
||||||
|
<translation>Voice detection level:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="311"/>
|
||||||
|
<source>Podgląd</source>
|
||||||
|
<translation>Preview</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="312"/>
|
||||||
|
<source>Wygeneruj podcast</source>
|
||||||
|
<translation>Generate a podcast</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="313"/>
|
||||||
|
<source>Projekt</source>
|
||||||
|
<translation>Project</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="314"/>
|
||||||
|
<source>Nowy projekt</source>
|
||||||
|
<translation>New project</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="315"/>
|
||||||
|
<source>Kliknij, aby utwórzyć nowy projekt</source>
|
||||||
|
<translation>Click to create a new project</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="316"/>
|
||||||
|
<source>Ctrl+N</source>
|
||||||
|
<translation>Ctrl+N</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="317"/>
|
||||||
|
<source>Otwórz projekt</source>
|
||||||
|
<translation>Open a project</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="318"/>
|
||||||
|
<source>Kliknij, aby otworzyć istniejący projekt</source>
|
||||||
|
<translation>Click to open an existing project</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="319"/>
|
||||||
|
<source>Ctrl+O</source>
|
||||||
|
<translation>Ctrl+O</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="320"/>
|
||||||
|
<source>Zapisz projekt</source>
|
||||||
|
<translation>Save the project</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="321"/>
|
||||||
|
<source>Kliknij, aby zapisać aktualny projekt</source>
|
||||||
|
<translation>Click to save the current project</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="322"/>
|
||||||
|
<source>Ctrl+S</source>
|
||||||
|
<translation>Ctrl+S</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="323"/>
|
||||||
|
<source>Zapisz projekt jako</source>
|
||||||
|
<translation>Save the project as</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="324"/>
|
||||||
|
<source>Kliknij, aby zapisać projekt jako</source>
|
||||||
|
<translation>Click to save the project as</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="325"/>
|
||||||
|
<source>Ctrl+Shift+S</source>
|
||||||
|
<translation>Ctrl+Shift+S</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="326"/>
|
||||||
|
<source>Zamknij program</source>
|
||||||
|
<translation>Close the program</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="327"/>
|
||||||
|
<source>Kliknij, aby zakończyć działanie programu</source>
|
||||||
|
<translation>Click to end the program</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="328"/>
|
||||||
|
<source>Ctrl+W</source>
|
||||||
|
<translation>Ctrl+W</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="329"/>
|
||||||
|
<source>Ustawienia</source>
|
||||||
|
<translation>Settings</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="330"/>
|
||||||
|
<source>Kliknij, aby przejść do ustawień programu</source>
|
||||||
|
<translation>Click to go to program settings</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="331"/>
|
||||||
|
<source>Ctrl+U</source>
|
||||||
|
<translation>Ctrl+U</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="332"/>
|
||||||
|
<source>O programie MagicPodcast</source>
|
||||||
|
<translation>About the MagicPodcast program</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="333"/>
|
||||||
|
<source>Kliknij, aby wyświetlić informacje dotyczące programu MagicPodcast</source>
|
||||||
|
<translation>Click to view MagicPodcast information</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="334"/>
|
||||||
|
<source>Ctrl+I</source>
|
||||||
|
<translation>Ctrl+I</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
BIN
src/gui/dicts/magicpodcast.pl.qm
Normal file
BIN
src/gui/dicts/magicpodcast.pl.qm
Normal file
Binary file not shown.
211
src/gui/dicts/magicpodcast.pl.ts
Normal file
211
src/gui/dicts/magicpodcast.pl.ts
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="pl_PL" sourcelanguage="en_GB">
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="294"/>
|
||||||
|
<source>MagicPodcast</source>
|
||||||
|
<translation>MagicPodcast</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="295"/>
|
||||||
|
<source>Audio file 1 speaker</source>
|
||||||
|
<translation>Plik audio 1 rozmówcy</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="296"/>
|
||||||
|
<source>Name of 1 speaker</source>
|
||||||
|
<translation>Imię 1 rozmówcy</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="297"/>
|
||||||
|
<source>Add audio 1</source>
|
||||||
|
<translation>Dodaj audio 1</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="298"/>
|
||||||
|
<source>Audio file 2 speaker</source>
|
||||||
|
<translation>Plik audio 2 rozmówcy</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="299"/>
|
||||||
|
<source>Name of 2 speaker</source>
|
||||||
|
<translation>Imię 2 rozmówcy</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="300"/>
|
||||||
|
<source>Add audio 2</source>
|
||||||
|
<translation>Dodaj audio 2</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="301"/>
|
||||||
|
<source>Mark if the speaker channels are connected in one recording</source>
|
||||||
|
<translation>Zaznacz jeśli kanały rozmówców są połączone w jednym nagraniu</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="302"/>
|
||||||
|
<source>Preview - active speakers</source>
|
||||||
|
<translation>Podgląd - rozmówcy aktywni</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="303"/>
|
||||||
|
<source>Speakers - active</source>
|
||||||
|
<translation>Rozmówcy - aktywni</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="304"/>
|
||||||
|
<source>Preview - speakers inactive</source>
|
||||||
|
<translation>Podgląd - rozmówcy nieaktywni</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="305"/>
|
||||||
|
<source>Speakers - inactive</source>
|
||||||
|
<translation>Rozmówcy - nieaktywni</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="306"/>
|
||||||
|
<source>Preview - 1 speaker active</source>
|
||||||
|
<translation>Podgląd - 1 rozmówca aktywny</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="307"/>
|
||||||
|
<source>First speaker - active</source>
|
||||||
|
<translation>Pierwszy rozmówca - aktywny</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="308"/>
|
||||||
|
<source>Preview - 2 speaker active</source>
|
||||||
|
<translation>Podgląd - 2 rozmówca aktywny</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="309"/>
|
||||||
|
<source>Second speaker - active</source>
|
||||||
|
<translation>Drugi rozmówca - aktywny</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="310"/>
|
||||||
|
<source>Voice detection level:</source>
|
||||||
|
<translation>Poziom wykrywania głosu:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="311"/>
|
||||||
|
<source>Preview</source>
|
||||||
|
<translation>Podgląd</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="312"/>
|
||||||
|
<source>Generate a podcast</source>
|
||||||
|
<translation>Wygeneruj podcast</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="313"/>
|
||||||
|
<source>Project</source>
|
||||||
|
<translation>Projekt</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="314"/>
|
||||||
|
<source>New project</source>
|
||||||
|
<translation>Nowy projekt</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="315"/>
|
||||||
|
<source>Click to create a new project</source>
|
||||||
|
<translation>Kliknij, aby utwórzyć nowy projekt</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="316"/>
|
||||||
|
<source>Ctrl+N</source>
|
||||||
|
<translation>Ctrl+N</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="317"/>
|
||||||
|
<source>Open a project</source>
|
||||||
|
<translation>Otwórz projekt</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="318"/>
|
||||||
|
<source>Click to open an existing project</source>
|
||||||
|
<translation>Kliknij, aby otworzyć istniejący projekt</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="319"/>
|
||||||
|
<source>Ctrl+O</source>
|
||||||
|
<translation>Ctrl+O</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="320"/>
|
||||||
|
<source>Save the project</source>
|
||||||
|
<translation>Zapisz projekt</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="321"/>
|
||||||
|
<source>Click to save the current project</source>
|
||||||
|
<translation>Kliknij, aby zapisać aktualny projekt</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="322"/>
|
||||||
|
<source>Ctrl+S</source>
|
||||||
|
<translation>Ctrl+S</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="323"/>
|
||||||
|
<source>Save the project as</source>
|
||||||
|
<translation>Zapisz projekt jako</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="324"/>
|
||||||
|
<source>Click to save the project as</source>
|
||||||
|
<translation>Kliknij, aby zapisać projekt jako</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="325"/>
|
||||||
|
<source>Ctrl+Shift+S</source>
|
||||||
|
<translation>Ctrl+Shift+S</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="326"/>
|
||||||
|
<source>Close the program</source>
|
||||||
|
<translation>Zamknij program</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="327"/>
|
||||||
|
<source>Click to end the program</source>
|
||||||
|
<translation>Kliknij, aby zakończyć działanie programu</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="328"/>
|
||||||
|
<source>Ctrl+W</source>
|
||||||
|
<translation>Ctrl+W</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="329"/>
|
||||||
|
<source>Settings</source>
|
||||||
|
<translation>Ustawienia</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="330"/>
|
||||||
|
<source>Click to go to program settings</source>
|
||||||
|
<translation>Kliknij, aby przejść do ustawień programu</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="331"/>
|
||||||
|
<source>Ctrl+U</source>
|
||||||
|
<translation>Ctrl+U</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="332"/>
|
||||||
|
<source>About the MagicPodcast program</source>
|
||||||
|
<translation>O programie MagicPodcast</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="333"/>
|
||||||
|
<source>Click to view MagicPodcast information</source>
|
||||||
|
<translation>Kliknij, aby wyświetlić informacje dotyczące programu MagicPodcast</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../python/ui/mainwindow_ui.py" line="334"/>
|
||||||
|
<source>Ctrl+I</source>
|
||||||
|
<translation>Ctrl+I</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
135
src/gui/dicts/phrases.txt
Normal file
135
src/gui/dicts/phrases.txt
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
|
||||||
|
|
||||||
|
Plik audio 1 rozmówcy
|
||||||
|
Audio file 1 speaker
|
||||||
|
speaker_audio_one
|
||||||
|
|
||||||
|
Imię 1 rozmówcy
|
||||||
|
Name of 1 speaker
|
||||||
|
speaker_name_one
|
||||||
|
|
||||||
|
Dodaj audio 1
|
||||||
|
Add audio 1
|
||||||
|
add_audio_one
|
||||||
|
|
||||||
|
|
||||||
|
Plik audio 2 rozmówcy
|
||||||
|
Audio file 2 speaker
|
||||||
|
speaker_audio_second
|
||||||
|
|
||||||
|
Imię 2 rozmówcy
|
||||||
|
Name of 2 speaker
|
||||||
|
speaker_name_second
|
||||||
|
|
||||||
|
Dodaj audio 2
|
||||||
|
Add audio 2
|
||||||
|
add_audio_second
|
||||||
|
|
||||||
|
Zaznacz jeśli kanały rozmówców są połączone w jednym nagraniu
|
||||||
|
Mark if the speaker channels are connected in one recording
|
||||||
|
mark_connected_channels
|
||||||
|
|
||||||
|
Podgląd - rozmówcy aktywni
|
||||||
|
Preview - active speakers
|
||||||
|
preview_active_speakers
|
||||||
|
|
||||||
|
Rozmówcy - aktywni
|
||||||
|
Speakers - active
|
||||||
|
active_speakers
|
||||||
|
|
||||||
|
Podgląd - rozmówcy nieaktywni
|
||||||
|
Preview - speakers inactive
|
||||||
|
preview_inactive_speakers
|
||||||
|
|
||||||
|
Rozmówcy - nieaktywni
|
||||||
|
Speakers - inactive
|
||||||
|
inactive_speakers
|
||||||
|
|
||||||
|
Podgląd - 1 rozmówca aktywny
|
||||||
|
Preview - 1 speaker active
|
||||||
|
preview_active_first_speaker
|
||||||
|
|
||||||
|
Pierwszy rozmówca - aktywny
|
||||||
|
First speaker - active
|
||||||
|
active_first_speaker
|
||||||
|
|
||||||
|
Podgląd - 2 rozmówca aktywny
|
||||||
|
Preview - 2 speaker active
|
||||||
|
preview_active_second_speaker
|
||||||
|
|
||||||
|
Drugi rozmówca - aktywny
|
||||||
|
Second speaker - active
|
||||||
|
active_second_speaker
|
||||||
|
|
||||||
|
Poziom wykrywania głosu
|
||||||
|
Voice detection level
|
||||||
|
voice_detection_level
|
||||||
|
|
||||||
|
Podgląd podcastu
|
||||||
|
Preview a podcast
|
||||||
|
podcast_preview
|
||||||
|
|
||||||
|
Wygeneruj podcast
|
||||||
|
Generate a podcast
|
||||||
|
podcast_generate
|
||||||
|
|
||||||
|
Projekt
|
||||||
|
Project
|
||||||
|
project
|
||||||
|
|
||||||
|
Nowy projekt
|
||||||
|
New project
|
||||||
|
new_project
|
||||||
|
|
||||||
|
Kliknij, aby utwórzyć nowy projekt
|
||||||
|
Click to create a new project
|
||||||
|
create_new_project
|
||||||
|
|
||||||
|
|
||||||
|
Otwórz projekt
|
||||||
|
Open a project
|
||||||
|
open_project
|
||||||
|
|
||||||
|
Kliknij, aby otworzyć istniejący projekt
|
||||||
|
Click to open an existing project
|
||||||
|
tooltip_open_project
|
||||||
|
|
||||||
|
Zapisz projekt
|
||||||
|
Save the project
|
||||||
|
save_project
|
||||||
|
|
||||||
|
Kliknij, aby zapisać aktualny projekt
|
||||||
|
Click to save the current project
|
||||||
|
tooltip_save_project
|
||||||
|
|
||||||
|
Zapisz projekt jako
|
||||||
|
Save the project as
|
||||||
|
save_project_as
|
||||||
|
|
||||||
|
Kliknij, aby zapisać projekt jako
|
||||||
|
Click to save the project as
|
||||||
|
tooltip_save_project_as
|
||||||
|
|
||||||
|
Zamknij program
|
||||||
|
Close the program
|
||||||
|
close_program
|
||||||
|
|
||||||
|
Kliknij, aby zakończyć działanie programu
|
||||||
|
Click to end the program
|
||||||
|
tooltip_close_program
|
||||||
|
|
||||||
|
Ustawienia
|
||||||
|
Settings
|
||||||
|
settings
|
||||||
|
|
||||||
|
Kliknij, aby przejść do ustawień programu
|
||||||
|
Click to go to program settings
|
||||||
|
tooltip_settings
|
||||||
|
|
||||||
|
O programie MagicPodcast
|
||||||
|
About the MagicPodcast program
|
||||||
|
about_program
|
||||||
|
|
||||||
|
Kliknij, aby wyświetlić informacje dotyczące programu MagicPodcast
|
||||||
|
Click to view MagicPodcast information
|
||||||
|
tooltip_about_program
|
98
src/gui/ui/settings_dialog.ui
Normal file
98
src/gui/ui/settings_dialog.ui
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>SettingsDialog</class>
|
||||||
|
<widget class="QDialog" name="SettingsDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>100</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>400</width>
|
||||||
|
<height>100</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Ustawienia</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="h_layout_language">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_language">
|
||||||
|
<property name="text">
|
||||||
|
<string>Język programu:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="combo_box_language">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>en</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>pl</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="button_box">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>button_box</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>SettingsDialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>button_box</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>SettingsDialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
@ -1,46 +1,56 @@
|
|||||||
from PyQt5.QtGui import QPixmap
|
|
||||||
from PyQt5.QtWidgets import QMainWindow, QLabel,\
|
|
||||||
QFileDialog, QDialog, QDialogButtonBox, QVBoxLayout, QCheckBox
|
|
||||||
from PyQt5.QtCore import Qt
|
|
||||||
from src.python.ui.mainwindow_ui import Ui_MainWindow
|
|
||||||
import tempfile
|
|
||||||
import subprocess
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
import tempfile
|
||||||
|
import resources_rc
|
||||||
|
from PyQt5.QtCore import Qt
|
||||||
|
from PyQt5.QtGui import QPixmap
|
||||||
|
from PyQt5.QtWidgets import QMainWindow, QLabel, QFileDialog, QDialog, QDialogButtonBox, QVBoxLayout, QApplication
|
||||||
|
from src.python.classes.settings_dialog import SettingsDialog
|
||||||
|
from src.python.ui.mainwindow_ui import Ui_MainWindow
|
||||||
|
from src.python.classes.translate import Translator
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QMainWindow, Ui_MainWindow):
|
class MainWindow(QMainWindow, QApplication, Ui_MainWindow):
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(MainWindow, self).__init__(parent=parent)
|
super(MainWindow, self).__init__(parent=parent)
|
||||||
|
self.translator = Translator()
|
||||||
|
self.installTranslator(self.translator)
|
||||||
|
self.lang = 'pl'
|
||||||
|
self.translator.load_lang(self.lang)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
self.setup_logic()
|
self.setup_logic()
|
||||||
|
|
||||||
self.setup_detail()
|
self.setup_detail()
|
||||||
|
self.retranslateUi(self.window())
|
||||||
self.aresample = 8000
|
self.aresample = 8000
|
||||||
self.test_data()
|
self.test_data()
|
||||||
|
|
||||||
def setup_logic(self):
|
def setup_logic(self):
|
||||||
|
self.action_settings.triggered.connect(self.open_setting_dialog)
|
||||||
|
self.button_generate.clicked.connect(self.generate_video_podcast)
|
||||||
self.button_audio_1.clicked.connect(lambda: self.open_audio_import(audio_number=1))
|
self.button_audio_1.clicked.connect(lambda: self.open_audio_import(audio_number=1))
|
||||||
self.button_audio_2.clicked.connect(lambda: self.open_audio_import(audio_number=2))
|
self.button_audio_2.clicked.connect(lambda: self.open_audio_import(audio_number=2))
|
||||||
|
|
||||||
self.check_box_connected_channels.stateChanged.connect(self.channels_connected)
|
|
||||||
|
|
||||||
self.button_select_avatar_1.clicked.connect(lambda: self.open_image_import(image_number=1))
|
self.button_select_avatar_1.clicked.connect(lambda: self.open_image_import(image_number=1))
|
||||||
self.button_select_avatar_2.clicked.connect(lambda: self.open_image_import(image_number=2))
|
self.button_select_avatar_2.clicked.connect(lambda: self.open_image_import(image_number=2))
|
||||||
self.button_select_avatar_3.clicked.connect(lambda: self.open_image_import(image_number=3))
|
self.button_select_avatar_3.clicked.connect(lambda: self.open_image_import(image_number=3))
|
||||||
self.button_select_avatar_4.clicked.connect(lambda: self.open_image_import(image_number=4))
|
self.button_select_avatar_4.clicked.connect(lambda: self.open_image_import(image_number=4))
|
||||||
|
|
||||||
self.button_generate.clicked.connect(self.generate_video_podcast)
|
|
||||||
|
|
||||||
self.check_box_connected_channels.setChecked(True)
|
self.check_box_connected_channels.setChecked(True)
|
||||||
|
self.check_box_connected_channels.stateChanged.connect(self.channels_connected)
|
||||||
|
|
||||||
|
def change_language(self):
|
||||||
|
self.translator.load_lang(self.lang)
|
||||||
|
self.retranslateUi(self.window())
|
||||||
|
|
||||||
|
# After change language need setup preview for test data once again
|
||||||
|
self.test_data()
|
||||||
|
|
||||||
def setup_detail(self):
|
def setup_detail(self):
|
||||||
self.line_edit_name_1.setDisabled(True)
|
self.line_edit_name_1.setDisabled(True)
|
||||||
self.line_edit_name_2.setDisabled(True)
|
self.line_edit_name_2.setDisabled(True)
|
||||||
|
|
||||||
def create_custom_dialog(self, title: str, msg: str):
|
@staticmethod
|
||||||
|
def create_custom_dialog(title: str, msg: str):
|
||||||
dialog = QDialog()
|
dialog = QDialog()
|
||||||
dialog.setWindowTitle(title)
|
|
||||||
label = QLabel()
|
label = QLabel()
|
||||||
label.setText(msg)
|
label.setText(msg)
|
||||||
label.setObjectName('message_box')
|
label.setObjectName('message_box')
|
||||||
@ -55,11 +65,34 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
def test_data(self):
|
def test_data(self):
|
||||||
self.line_edit_audio_1.setText('./src/sounds/oba_kanały.mp3')
|
self.line_edit_audio_1.setText('./src/sounds/oba_kanały.mp3')
|
||||||
|
pixmap1 = QPixmap('./src/gui/images/both.png')
|
||||||
|
scaled_pixmap1 = pixmap1.scaled(pixmap1.size(), Qt.KeepAspectRatio)
|
||||||
|
self.preview_label_avatar_1.setPixmap(scaled_pixmap1)
|
||||||
self.preview_label_avatar_1.setProperty('path', './src/gui/images/both.png')
|
self.preview_label_avatar_1.setProperty('path', './src/gui/images/both.png')
|
||||||
|
|
||||||
|
pixmap2 = QPixmap('./src/gui/images/none.png')
|
||||||
|
scaled_pixmap2 = pixmap2.scaled(pixmap2.size(), Qt.KeepAspectRatio)
|
||||||
|
self.preview_label_avatar_2.setPixmap(scaled_pixmap2)
|
||||||
self.preview_label_avatar_2.setProperty('path', './src/gui/images/none.png')
|
self.preview_label_avatar_2.setProperty('path', './src/gui/images/none.png')
|
||||||
|
|
||||||
|
pixmap3 = QPixmap('./src/gui/images/left.png')
|
||||||
|
scaled_pixmap3 = pixmap3.scaled(pixmap3.size(), Qt.KeepAspectRatio)
|
||||||
|
self.preview_label_avatar_3.setPixmap(scaled_pixmap3)
|
||||||
self.preview_label_avatar_3.setProperty('path', './src/gui/images/left.png')
|
self.preview_label_avatar_3.setProperty('path', './src/gui/images/left.png')
|
||||||
|
|
||||||
|
pixmap4 = QPixmap('./src/gui/images/right.png')
|
||||||
|
scaled_pixmap4 = pixmap4.scaled(pixmap4.size(), Qt.KeepAspectRatio)
|
||||||
|
self.preview_label_avatar_4.setPixmap(scaled_pixmap4)
|
||||||
self.preview_label_avatar_4.setProperty('path', './src/gui/images/right.png')
|
self.preview_label_avatar_4.setProperty('path', './src/gui/images/right.png')
|
||||||
|
|
||||||
|
def open_setting_dialog(self):
|
||||||
|
old_lang = self.lang
|
||||||
|
settings = SettingsDialog(parent=self)
|
||||||
|
settings.exec_()
|
||||||
|
if old_lang != self.lang:
|
||||||
|
print(old_lang, self.lang)
|
||||||
|
self.change_language()
|
||||||
|
|
||||||
def open_image_import(self, image_number: int):
|
def open_image_import(self, image_number: int):
|
||||||
dialog = QFileDialog()
|
dialog = QFileDialog()
|
||||||
dialog.setOption(dialog.DontUseNativeDialog, True)
|
dialog.setOption(dialog.DontUseNativeDialog, True)
|
||||||
@ -67,13 +100,15 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||||||
file_formats = "All Files (*);;JPG (*.jpg);;PNG (*.png)"
|
file_formats = "All Files (*);;JPG (*.jpg);;PNG (*.png)"
|
||||||
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", file_formats, options=dialog.options())
|
file, _ = dialog.getOpenFileName(self, "QFileDialog.getOpenFileName()", "", file_formats, options=dialog.options())
|
||||||
if not file:
|
if not file:
|
||||||
|
title = 'Ostrzeżenie'
|
||||||
msg = "[!] Nie wybrano żadnego pliku."
|
msg = "[!] Nie wybrano żadnego pliku."
|
||||||
dialog = self.create_custom_dialog(title='Ostrzeżenie', msg=msg)
|
dialog = self.create_custom_dialog(title=title, msg=msg)
|
||||||
dialog.exec_()
|
dialog.exec_()
|
||||||
|
|
||||||
if file and not file.lower().endswith('.jpg') and not file.lower().endswith('.png'):
|
if file and not file.lower().endswith('.jpg') and not file.lower().endswith('.png'):
|
||||||
|
title = 'Błąd'
|
||||||
msg = F"[!] Plik {file} nie jest plikiem jpg/png."
|
msg = F"[!] Plik {file} nie jest plikiem jpg/png."
|
||||||
dialog = self.create_custom_dialog(title='Błąd', msg=msg)
|
dialog = self.create_custom_dialog(title=title, msg=msg)
|
||||||
dialog.exec_()
|
dialog.exec_()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
@ -174,4 +209,3 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||||||
print(echo_temp_dir_name)
|
print(echo_temp_dir_name)
|
||||||
print(ech)
|
print(ech)
|
||||||
|
|
||||||
pass
|
|
||||||
|
18
src/python/classes/settings_dialog.py
Normal file
18
src/python/classes/settings_dialog.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
from PyQt5.QtWidgets import QDialog
|
||||||
|
from src.python.ui.settings_dialog_ui import Ui_SettingsDialog
|
||||||
|
|
||||||
|
|
||||||
|
class SettingsDialog(QDialog, Ui_SettingsDialog):
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
super(SettingsDialog, self).__init__(parent=parent)
|
||||||
|
self.setupUi(self)
|
||||||
|
self.language = self.combo_box_language.currentText() if parent is None else self.parent().lang
|
||||||
|
self.setup_logic()
|
||||||
|
|
||||||
|
def setup_logic(self):
|
||||||
|
self.combo_box_language.setCurrentText(self.language)
|
||||||
|
self.button_box.accepted.connect(self.set_lang)
|
||||||
|
|
||||||
|
def set_lang(self):
|
||||||
|
"""Set new lang in mainwindow"""
|
||||||
|
self.parent().lang = self.combo_box_language.currentText()
|
15
src/python/classes/translate.py
Normal file
15
src/python/classes/translate.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
from PyQt5.QtCore import QTranslator
|
||||||
|
# import locale
|
||||||
|
# import resources_rc
|
||||||
|
# import sys
|
||||||
|
|
||||||
|
|
||||||
|
class Translator(QTranslator):
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
QTranslator.__init__(self)
|
||||||
|
|
||||||
|
def load_lang(self, lang):
|
||||||
|
print(f"Get this lang: {lang}")
|
||||||
|
print(":/language/src/gui/dicts/magicpodcast" + "." + lang)
|
||||||
|
self.load(":/language/src/gui/dicts/magicpodcast" + "." + lang)
|
59
src/python/ui/settings_dialog_ui.py
Normal file
59
src/python/ui/settings_dialog_ui.py
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file './src/gui/ui/settings_dialog.ui'
|
||||||
|
#
|
||||||
|
# Created by: PyQt5 UI code generator 5.15.2
|
||||||
|
#
|
||||||
|
# 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_SettingsDialog(object):
|
||||||
|
def setupUi(self, SettingsDialog):
|
||||||
|
SettingsDialog.setObjectName("SettingsDialog")
|
||||||
|
SettingsDialog.resize(400, 100)
|
||||||
|
SettingsDialog.setMaximumSize(QtCore.QSize(400, 100))
|
||||||
|
self.verticalLayout = QtWidgets.QVBoxLayout(SettingsDialog)
|
||||||
|
self.verticalLayout.setObjectName("verticalLayout")
|
||||||
|
self.h_layout_language = QtWidgets.QHBoxLayout()
|
||||||
|
self.h_layout_language.setObjectName("h_layout_language")
|
||||||
|
self.label_language = QtWidgets.QLabel(SettingsDialog)
|
||||||
|
self.label_language.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
|
self.label_language.setObjectName("label_language")
|
||||||
|
self.h_layout_language.addWidget(self.label_language)
|
||||||
|
self.combo_box_language = QtWidgets.QComboBox(SettingsDialog)
|
||||||
|
self.combo_box_language.setObjectName("combo_box_language")
|
||||||
|
self.combo_box_language.addItem("")
|
||||||
|
self.combo_box_language.addItem("")
|
||||||
|
self.h_layout_language.addWidget(self.combo_box_language)
|
||||||
|
self.verticalLayout.addLayout(self.h_layout_language)
|
||||||
|
self.button_box = QtWidgets.QDialogButtonBox(SettingsDialog)
|
||||||
|
self.button_box.setOrientation(QtCore.Qt.Horizontal)
|
||||||
|
self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
|
||||||
|
self.button_box.setObjectName("button_box")
|
||||||
|
self.verticalLayout.addWidget(self.button_box)
|
||||||
|
|
||||||
|
self.retranslateUi(SettingsDialog)
|
||||||
|
self.button_box.accepted.connect(SettingsDialog.accept)
|
||||||
|
self.button_box.rejected.connect(SettingsDialog.reject)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
|
||||||
|
|
||||||
|
def retranslateUi(self, SettingsDialog):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
SettingsDialog.setWindowTitle(_translate("SettingsDialog", "Ustawienia"))
|
||||||
|
self.label_language.setText(_translate("SettingsDialog", "Język programu:"))
|
||||||
|
self.combo_box_language.setItemText(0, _translate("SettingsDialog", "en"))
|
||||||
|
self.combo_box_language.setItemText(1, _translate("SettingsDialog", "pl"))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
SettingsDialog = QtWidgets.QDialog()
|
||||||
|
ui = Ui_SettingsDialog()
|
||||||
|
ui.setupUi(SettingsDialog)
|
||||||
|
SettingsDialog.show()
|
||||||
|
sys.exit(app.exec_())
|
Loading…
Reference in New Issue
Block a user