Skip to content

Commit

Permalink
Initial Release
Browse files Browse the repository at this point in the history
  • Loading branch information
aalramadan committed Jul 3, 2024
1 parent e1160b2 commit b1b62a3
Show file tree
Hide file tree
Showing 273 changed files with 54,789 additions and 1 deletion.
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,45 @@
# TransVisio
# **TransVisio**
![alt text](image.png)

## **💡What does it do?**
**TransVisio** provides translations for multiple languages using Large Language Models (LLMs). It takes inputs in various formats (e.g., subtitle file or a video) and it extracts the text

## **Models Supported**

- **GPT 4o**
- **GPT 4 Turbo**
- **GPT 4**
- **GPT 3 Turbo**
- **Gemini 1.5 Pro**
- **Gemini 1.5 Flash**
- **Gemini 1.0 Pro**
- **Whisper 20231117**
## **Features**

- Inputs supported: </br>
Subtitle files (*.srt *.ass *.ssa). </br>
Video files (*.mp4 *.mkv *.webm *.flv *.avi *.mov *.wmv *.m4v). </br>
Audio files (*.wav *.ogg *.mp3 *.aac *.flac *.m4a *.oga *.opus). </br>
Excel files (*.xls *.xlsx *.csv). </br>

- You can specify the number of **input sentences**.

- You can **pause/resume** translation at any point.

- You can reverse the direction of the translated output.

- You can **remove** and/or **edit** the translated output and the input. The tool will automatically align the rows.

- Ability to specify **Start Time** and **Duration** for video/audio inputs.

- Provides a **Temperature** setting, which Controls the randomness of the model’s output. A lower value makes the output more deterministic and focused, while a higher value makes the output more diverse and creative.

- Light and Dark themes.

> Note: Make sure that you specify the API key for Whisper along with the **Start Time** and **Duration** before selecting the video/audio input.
## **Demo**

## **Disclaimer**
**TransVisio** is part of a collaborative research funded by the Abdul Hameed Shoman Foundation (Agreement Number: 230800351).
Hosting Institution: The project is hosted by the English Language and Translation Department at the Applied Science Private University.</br>
73 changes: 73 additions & 0 deletions compile/Inno_Setup_Script.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "TransVisio"
#define MyAppVersion "1.0.0"
#define MyAppExeName "TransVisio.exe"
#define MyAppAssocName MyAppName + " File"
#define MyAppAssocExt ".myp"
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{DF428DA0-9FF7-4358-A0BA-FA4847DD361B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName={autopf}\{#MyAppName}

; Specifies that Setup cannot run on anything but x64 and Windows 11 on Arm.
ArchitecturesAllowed=x64compatible

; Requests that the install be done in "64-bit mode" on x64 or Windows 11 on Arm,
; meaning it should use the native 64-bit Program Files directory and
; the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64compatible

ChangesAssociations=yes
DisableProgramGroupPage=yes
OutputBaseFilename=mysetup
Compression=lzma
SolidCompression=yes
WizardStyle=modern

; Run in non administrative install mode (install for current user only.)
PrivilegesRequired=lowest

SetupIconFile="C:\Users\Ali\Desktop\TransVisio\images\images\icon.ico"

; Used to display version in installer properties
VersionInfoVersion={#MyAppVersion}
UninstallDisplayIcon="C:\Users\Ali\Desktop\TransVisio\images\images\icon.ico"
AppPublisher=aalramadan


[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Users\Ali\Desktop\TransVisio\dist\main\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Ali\Desktop\TransVisio\dist\main\_internal\*"; DestDir: "{app}\_internal"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Registry]
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".myp"; ValueData: ""

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent runasoriginaluser




112 changes: 112 additions & 0 deletions compile/build.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
Build (Windows):
pyinstaller --windowed --hidden-import=tiktoken_ext.openai_public --hidden-import=tiktoken_ext --icon="C:\Users\Ali\Desktop\TransVisio\images\images\icon.ico" main.py

Build (Mac OS):
pyinstaller --onefile --windowed --hidden-import=tiktoken_ext.openai_public --hidden-import=tiktoken_ext --icon="/Users/Ali/Desktop/TransVisio/images/images/icon.icns" main.py



* Use for debugging --> --console instead of --windowed
#################################################################################
Python packages used (Windows):
absl-py 2.1.0
altgraph 0.17.4
annotated-types 0.7.0
anyio 4.4.0
ass 0.5.4
audio-extract 0.6.0
cachetools 5.3.3
certifi 2024.6.2
charset-normalizer 3.3.2
click 8.1.7
colorama 0.4.6
contourpy 1.2.1
cycler 0.12.1
decorator 4.4.2
distro 1.9.0
et-xmlfile 1.1.0
ffmpeg-python 0.2.0
filelock 3.15.4
fonttools 4.53.0
fsspec 2024.6.1
future 1.0.0
google-ai-generativelanguage 0.6.5
google-api-core 2.19.0
google-api-python-client 2.134.0
google-auth 2.30.0
google-auth-httplib2 0.2.0
google-generativeai 0.7.0
googleapis-common-protos 1.63.1
grpcio 1.64.1
grpcio-status 1.62.2
h11 0.14.0
httpcore 1.0.5
httplib2 0.22.0
httpx 0.27.0
idna 3.7
imageio 2.34.2
imageio-ffmpeg 0.4.8
intel-openmp 2021.4.0
Jinja2 3.1.4
joblib 1.4.2
kiwisolver 1.4.5
llvmlite 0.43.0
Markdown 3.6
MarkupSafe 2.1.5
matplotlib 3.9.0
mkl 2021.4.0
more-itertools 10.3.0
mpmath 1.3.0
mutagen 1.46.0
networkx 3.3
nltk 3.8.1
numba 0.60.0
numpy 1.26.4
openai 1.35.3
openai-whisper 20231117
openpyxl 3.1.5
packaging 24.1
pandas 2.2.2
pefile 2023.2.7
pillow 10.3.0
pip 24.1.1
proglog 0.1.10
proto-plus 1.24.0
protobuf 4.25.3
pyasn1 0.6.0
pyasn1_modules 0.4.0
pydantic 2.7.4
pydantic_core 2.18.4
pyinstaller 6.8.0
pyinstaller-hooks-contrib 2024.7
pyparsing 3.1.2
PySide6 6.7.2
PySide6_Addons 6.7.2
PySide6_Essentials 6.7.2
python-dateutil 2.9.0.post0
pytz 2024.1
pywin32-ctypes 0.2.2
qasync 0.27.1
regex 2024.5.15
requests 2.32.3
rsa 4.9
scikit-learn 1.5.0
scipy 1.13.1
setuptools 70.1.1
shiboken6 6.7.2
six 1.16.0
sniffio 1.3.1
srt 3.5.3
sympy 1.12.1
tbb 2021.13.0
tensorboard-data-server 0.7.2
threadpoolctl 3.5.0
tiktoken 0.7.0
torch 2.3.1
tqdm 4.66.4
typing_extensions 4.12.2
tzdata 2024.1
uritemplate 4.1.1
urllib3 2.2.2
Werkzeug 3.0.3
xlrd 2.0.1
Binary file added image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-3d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-4k.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-account-logout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-action-redo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-action-undo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-airplane-mode-off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-airplane-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-alarm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-align-center.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-align-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-align-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-arrow-bottom-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-arrow-bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-arrow-circle-bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-arrow-circle-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-arrow-circle-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-arrow-circle-top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-arrow-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-arrow-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-arrow-top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-at.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-av-timer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-ban.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-battery-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/cil-battery-3.png
Binary file added images/icons/cil-battery-5.png
Binary file added images/icons/cil-battery-alert.png
Binary file added images/icons/cil-battery-slash.png
Binary file added images/icons/cil-bell.png
Binary file added images/icons/cil-bluetooth.png
Binary file added images/icons/cil-briefcase.png
Binary file added images/icons/cil-browser.png
Binary file added images/icons/cil-calendar-check.png
Binary file added images/icons/cil-camera-roll.png
Binary file added images/icons/cil-camera.png
Binary file added images/icons/cil-caret-bottom.png
Binary file added images/icons/cil-caret-left.png
Binary file added images/icons/cil-caret-right.png
Binary file added images/icons/cil-caret-top.png
Binary file added images/icons/cil-cart.png
Binary file added images/icons/cil-cast.png
Binary file added images/icons/cil-chart-line.png
Binary file added images/icons/cil-chart-pie.png
Binary file added images/icons/cil-chart.png
Binary file added images/icons/cil-chat-bubble.png
Binary file added images/icons/cil-check-alt.png
Binary file added images/icons/cil-check-circle.png
Binary file added images/icons/cil-check.png
Binary file added images/icons/cil-chevron-bottom.png
Binary file added images/icons/cil-chevron-circle-down-alt.png
Binary file added images/icons/cil-chevron-circle-left-alt.png
Binary file added images/icons/cil-chevron-circle-right-alt.png
Binary file added images/icons/cil-chevron-circle-up-alt.png
Binary file added images/icons/cil-chevron-double-down.png
Binary file added images/icons/cil-chevron-double-left.png
Binary file added images/icons/cil-chevron-double-right.png
Binary file added images/icons/cil-chevron-double-up-alt.png
Binary file added images/icons/cil-chevron-double-up.png
Binary file added images/icons/cil-chevron-left.png
Binary file added images/icons/cil-chevron-right.png
Binary file added images/icons/cil-chevron-top.png
Binary file added images/icons/cil-circle.png
Binary file added images/icons/cil-clipboard.png
Binary file added images/icons/cil-clock.png
Binary file added images/icons/cil-clone.png
Binary file added images/icons/cil-closed-captioning.png
Binary file added images/icons/cil-cloud-download.png
Binary file added images/icons/cil-cloud-upload.png
Binary file added images/icons/cil-cloudy.png
Binary file added images/icons/cil-code.png
Binary file added images/icons/cil-coffee.png
Binary file added images/icons/cil-comment-bubble.png
Binary file added images/icons/cil-comment-square.png
Binary file added images/icons/cil-credit-card.png
Binary file added images/icons/cil-cursor-move.png
Binary file added images/icons/cil-cursor.png
Binary file added images/icons/cil-cut.png
Binary file added images/icons/cil-data-transfer-down.png
Binary file added images/icons/cil-data-transfer-up.png
Binary file added images/icons/cil-deaf.png
Binary file added images/icons/cil-description.png
Binary file added images/icons/cil-devices.png
Binary file added images/icons/cil-dialpad.png
Binary file added images/icons/cil-dog.png
Binary file added images/icons/cil-door.png
Binary file added images/icons/cil-double-quote-sans-left.png
Binary file added images/icons/cil-double-quote-sans-right.png
Binary file added images/icons/cil-drop.png
Binary file added images/icons/cil-envelope-closed.png
Binary file added images/icons/cil-envelope-letter.png
Binary file added images/icons/cil-envelope-open.png
Binary file added images/icons/cil-equalizer.png
Binary file added images/icons/cil-ethernet.png
Binary file added images/icons/cil-exit-to-app.png
Binary file added images/icons/cil-expand-down.png
Binary file added images/icons/cil-expand-left.png
Binary file added images/icons/cil-expand-right.png
Binary file added images/icons/cil-expand-up.png
Binary file added images/icons/cil-exposure.png
Binary file added images/icons/cil-external-link.png
Binary file added images/icons/cil-face-dead.png
Binary file added images/icons/cil-featured-playlist.png
Binary file added images/icons/cil-file.png
Binary file added images/icons/cil-find-in-page.png
Binary file added images/icons/cil-fingerprint.png
Binary file added images/icons/cil-fire.png
Binary file added images/icons/cil-flip-to-back.png
Binary file added images/icons/cil-folder-open.png
Binary file added images/icons/cil-folder.png
Binary file added images/icons/cil-frown.png
Binary file added images/icons/cil-gamepad.png
Binary file added images/icons/cil-hand-point-down.png
Binary file added images/icons/cil-hand-point-left.png
Binary file added images/icons/cil-hand-point-right.png
Binary file added images/icons/cil-hand-point-up.png
Binary file added images/icons/cil-hd.png
Binary file added images/icons/cil-hdr.png
Binary file added images/icons/cil-headphones.png
Binary file added images/icons/cil-heart.png
Binary file added images/icons/cil-highligt.png
Binary file added images/icons/cil-history.png
Binary file added images/icons/cil-home.png
Binary file added images/icons/cil-house.png
Binary file added images/icons/cil-image-plus.png
Binary file added images/icons/cil-image1.png
Binary file added images/icons/cil-infinity.png
Binary file added images/icons/cil-input-power.png
Binary file added images/icons/cil-input.png
Binary file added images/icons/cil-justify-center.png
Binary file added images/icons/cil-justify-left.png
Binary file added images/icons/cil-justify-right.png
Binary file added images/icons/cil-keyboard.png
Binary file added images/icons/cil-laptop.png
Binary file added images/icons/cil-layers.png
Binary file added images/icons/cil-level-down.png
Binary file added images/icons/cil-level-up.png
Binary file added images/icons/cil-library-add.png
Binary file added images/icons/cil-library.png
Binary file added images/icons/cil-lightbulb.png
Binary file added images/icons/cil-link-alt.png
Binary file added images/icons/cil-link-broken.png
Binary file added images/icons/cil-link.png
Binary file added images/icons/cil-location-pin.png
Binary file added images/icons/cil-lock-locked.png
Binary file added images/icons/cil-lock-unlocked.png
Binary file added images/icons/cil-loop-1.png
Binary file added images/icons/cil-loop-circular.png
Binary file added images/icons/cil-loop.png
Binary file added images/icons/cil-low-vision.png
Binary file added images/icons/cil-magnifying-glass.png
Binary file added images/icons/cil-map.png
Binary file added images/icons/cil-media-eject.png
Binary file added images/icons/cil-media-pause.png
Binary file added images/icons/cil-media-play.png
Binary file added images/icons/cil-media-skip-backward.png
Binary file added images/icons/cil-media-skip-forward.png
Binary file added images/icons/cil-media-step-backward.png
Binary file added images/icons/cil-media-step-forward.png
Binary file added images/icons/cil-media-stop.png
Binary file added images/icons/cil-medical-cross.png
Binary file added images/icons/cil-meh.png
Binary file added images/icons/cil-menu.png
Binary file added images/icons/cil-microphone.png
Binary file added images/icons/cil-minus.png
Binary file added images/icons/cil-mobile-landscape.png
Binary file added images/icons/cil-mobile.png
Binary file added images/icons/cil-mood-bad.png
Binary file added images/icons/cil-mood-good.png
Binary file added images/icons/cil-mood-very-bad.png
Binary file added images/icons/cil-mood-very-good.png
Binary file added images/icons/cil-moon.png
Binary file added images/icons/cil-mouse.png
Binary file added images/icons/cil-move.png
Binary file added images/icons/cil-movie.png
Binary file added images/icons/cil-mug-tea.png
Binary file added images/icons/cil-mug.png
Binary file added images/icons/cil-notes.png
Binary file added images/icons/cil-options-horizontal.png
Binary file added images/icons/cil-options.png
Binary file added images/icons/cil-paint-bucket.png
Binary file added images/icons/cil-paper-plane.png
Binary file added images/icons/cil-paperclip.png
Binary file added images/icons/cil-paragraph.png
Binary file added images/icons/cil-pen-alt.png
Binary file added images/icons/cil-pencil.png
Binary file added images/icons/cil-people.png
Binary file added images/icons/cil-phone.png
Binary file added images/icons/cil-pin.png
Binary file added images/icons/cil-plus.png
Binary file added images/icons/cil-power-standby.png
Binary file added images/icons/cil-print.png
Binary file added images/icons/cil-rectangle.png
Binary file added images/icons/cil-reload.png
Binary file added images/icons/cil-remove.png
Binary file added images/icons/cil-rss.png
Binary file added images/icons/cil-satelite.png
Binary file added images/icons/cil-save.png
Binary file added images/icons/cil-screen-desktop.png
Binary file added images/icons/cil-screen-smartphone.png
Binary file added images/icons/cil-settings.png
Binary file added images/icons/cil-share-boxed.png
Binary file added images/icons/cil-share.png
Binary file added images/icons/cil-signal-cellular-0.png
Binary file added images/icons/cil-signal-cellular-3.png
Binary file added images/icons/cil-size-grip.png
Binary file added images/icons/cil-smile.png
Binary file added images/icons/cil-speaker.png
Binary file added images/icons/cil-speech.png
Binary file added images/icons/cil-speedometer.png
Binary file added images/icons/cil-star.png
Binary file added images/icons/cil-tags.png
Binary file added images/icons/cil-task.png
Binary file added images/icons/cil-terminal.png
Binary file added images/icons/cil-text-size.png
Binary file added images/icons/cil-text-square.png
Binary file added images/icons/cil-text.png
Binary file added images/icons/cil-thumb-down.png
Binary file added images/icons/cil-thumb-up.png
Binary file added images/icons/cil-transfer.png
Binary file added images/icons/cil-triangle.png
Binary file added images/icons/cil-truck.png
Binary file added images/icons/cil-user-female.png
Binary file added images/icons/cil-user-follow.png
Binary file added images/icons/cil-user-unfollow.png
Binary file added images/icons/cil-user.png
Binary file added images/icons/cil-vertical-align-bottom.png
Binary file added images/icons/cil-view-column.png
Binary file added images/icons/cil-view-module.png
Binary file added images/icons/cil-view-quilt.png
Binary file added images/icons/cil-view-stream.png
Binary file added images/icons/cil-voice-over-record.png
Binary file added images/icons/cil-volume-high.png
Binary file added images/icons/cil-volume-low.png
Binary file added images/icons/cil-volume-off.png
Binary file added images/icons/cil-wallet.png
Binary file added images/icons/cil-watch.png
Binary file added images/icons/cil-wifi-signal-0.png
Binary file added images/icons/cil-wifi-signal-1.png
Binary file added images/icons/cil-wifi-signal-2.png
Binary file added images/icons/cil-wifi-signal-4.png
Binary file added images/icons/cil-wifi-signal-off.png
Binary file added images/icons/cil-window-maximize.png
Binary file added images/icons/cil-window-minimize.png
Binary file added images/icons/cil-window-restore.png
Binary file added images/icons/cil-wrap-text.png
Binary file added images/icons/cil-x-circle.png
Binary file added images/icons/cil-x.png
Binary file added images/icons/cil-zoom-in.png
Binary file added images/icons/cil-zoom-out.png
Binary file added images/icons/icon_close.png
Binary file added images/icons/icon_maximize.png
Binary file added images/icons/icon_menu.png
Binary file added images/icons/icon_minimize.png
Binary file added images/icons/icon_restore.png
Binary file added images/icons/icon_settings.png
Binary file added images/icons/info.png
Binary file added images/icons/warning.png
1 change: 1 addition & 0 deletions images/images/icon.icns

Large diffs are not rendered by default.

Binary file added images/images/icon.ico
Binary file not shown.
Binary file added images/images/icon.png
Binary file added images/loading.gif
44 changes: 44 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from ui_main import Ui_MainWindow
from PySide6.QtWidgets import QApplication, QMainWindow
from PySide6.QtGui import QIcon
from qasync import QEventLoop
import ui_functions
import asyncio

class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self):
super().__init__()

self.loop = loop or asyncio.get_event_loop()

self.setupUi(self) # Initializes ui_main.py

# .connect can call a function, but can't pass argument to it
# so, we use a parameterless lambda tha wraps a call with argument
# and then .connect ends calling the parameterless lambda
self.btn_open.clicked.connect(lambda: ui_functions.load_template_file(self))
self.btn_save.clicked.connect(lambda: ui_functions.save_template_file(self))
self.btn_next.clicked.connect(lambda: ui_functions.check_inputs(self))
self.btn_start.clicked.connect(lambda: ui_functions.communicate_with_api(self))
self.btn_back.clicked.connect(lambda: ui_functions.button_click(self, self.btn_back))
self.btn_settings.clicked.connect(lambda: ui_functions.expand_settings(self))
self.data_table.itemSelectionChanged.connect(lambda: ui_functions.items_selected(self))
self.btn_delete_row.clicked.connect(lambda: ui_functions.delete_row(self))
self.btn_info.clicked.connect(lambda: ui_functions.expand_about(self))
self.btn_reverse.clicked.connect(lambda: ui_functions.change_text_direction(self))
self.chk_box_dark.clicked.connect(lambda: ui_functions.theme_switch(self, self.chk_box_dark))
self.chk_box_light.clicked.connect(lambda: ui_functions.theme_switch(self, self.chk_box_light))
self.temp_slider.valueChanged.connect(lambda: ui_functions.temp_slider_changed(self))
self.combo_model.currentIndexChanged.connect(lambda: ui_functions.reset_temp_slider(self))

if __name__ == "__main__":
app = QApplication()

loop = QEventLoop(app)
asyncio.set_event_loop(loop)

window = MainWindow()
window.show()

with loop:
loop.run_forever()
Loading

0 comments on commit b1b62a3

Please sign in to comment.