├── .gitignore
├── icon.ico
├── gui
├── widgets
│ ├── py_circular_progress
│ │ ├── __pycache__
│ │ │ ├── __init__.cpython-39.pyc
│ │ │ └── circular_progress.cpython-39.pyc
│ │ ├── __init__.py
│ │ └── py_circular_progress.py
│ ├── py_grips
│ │ └── __init__.py
│ ├── py_slider
│ │ ├── __init__.py
│ │ └── py_slider.py
│ ├── py_credits_bar
│ │ ├── __init__.py
│ │ └── py_credits.py
│ ├── py_toggle
│ │ ├── __init__.py
│ │ └── py_toggle.py
│ ├── py_window
│ │ ├── __init__.py
│ │ ├── styles.py
│ │ └── py_window.py
│ ├── py_line_edit
│ │ ├── __init__.py
│ │ └── py_line_edit.py
│ ├── py_icon_button
│ │ └── __init__.py
│ ├── py_push_button
│ │ ├── __init__.py
│ │ └── py_push_button.py
│ ├── py_table_widget
│ │ ├── __init__.py
│ │ ├── py_table_widget.py
│ │ └── style.py
│ ├── py_left_menu
│ │ ├── __init__.py
│ │ └── py_div.py
│ ├── py_left_column
│ │ ├── __init__.py
│ │ ├── py_icon.py
│ │ └── py_left_column.py
│ ├── py_title_bar
│ │ ├── __init__.py
│ │ └── py_div.py
│ └── __init__.py
├── themes
│ ├── default.json
│ ├── dracula.json
│ └── bright_theme.json
├── uis
│ ├── windows
│ │ └── main_window
│ │ │ ├── __init__.py
│ │ │ └── functions_main_window.py
│ ├── columns
│ │ ├── right_column.ui
│ │ ├── ui_right_column.py
│ │ ├── ui_left_column.py
│ │ └── left_column.ui
│ └── pages
│ │ └── ui_main_pages.py
├── images
│ └── svg_icons
│ │ ├── icon_minimize.svg
│ │ ├── icon_maximize.svg
│ │ ├── icon_menu_close.svg
│ │ ├── icon_arrow_left.svg
│ │ ├── icon_arrow_right.svg
│ │ ├── icon_busy.svg
│ │ ├── icon_idle.svg
│ │ ├── icon_online.svg
│ │ ├── icon_restore.svg
│ │ ├── icon_close.svg
│ │ ├── icon_menu.svg
│ │ ├── icon_invisible.svg
│ │ ├── icon_file.svg
│ │ ├── icon_folder.svg
│ │ ├── active_menu.svg
│ │ ├── icon_heart.svg
│ │ ├── icon_folder_open.svg
│ │ ├── icon_add_user.svg
│ │ ├── icon_send.svg
│ │ ├── icon_save.svg
│ │ ├── icon_widgets.svg
│ │ ├── icon_info.svg
│ │ ├── no_icon.svg
│ │ ├── icon_home.svg
│ │ ├── icon_attachment.svg
│ │ ├── icon_more_options.svg
│ │ ├── icon_search.svg
│ │ ├── icon_emoticons.svg
│ │ ├── icon_settings.svg
│ │ └── icon_signal.svg
└── core
│ ├── functions.py
│ ├── json_settings.py
│ └── json_themes.py
├── settings.json
├── README.md
├── LICENSE
├── qt_core.py
└── main.py
/.gitignore:
--------------------------------------------------------------------------------
1 | __pycache__/
2 | .vscode/
3 | .git/
4 | .pyc
--------------------------------------------------------------------------------
/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI/HEAD/icon.ico
--------------------------------------------------------------------------------
/gui/widgets/py_circular_progress/__pycache__/__init__.cpython-39.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI/HEAD/gui/widgets/py_circular_progress/__pycache__/__init__.cpython-39.pyc
--------------------------------------------------------------------------------
/gui/widgets/py_circular_progress/__pycache__/circular_progress.cpython-39.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI/HEAD/gui/widgets/py_circular_progress/__pycache__/circular_progress.cpython-39.pyc
--------------------------------------------------------------------------------
/gui/widgets/py_grips/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | from . py_grips import PyGrips
18 |
--------------------------------------------------------------------------------
/gui/widgets/py_slider/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY SLIDER
18 | # ///////////////////////////////////////////////////////////////
19 | from . py_slider import PySlider
--------------------------------------------------------------------------------
/gui/widgets/py_credits_bar/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY CREDITS
18 | # ///////////////////////////////////////////////////////////////
19 | from . py_credits import PyCredits
--------------------------------------------------------------------------------
/gui/widgets/py_toggle/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY PUSH BUTTON
18 | # ///////////////////////////////////////////////////////////////
19 | from . py_toggle import PyToggle
--------------------------------------------------------------------------------
/gui/widgets/py_window/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT WIDGETS
18 | # ///////////////////////////////////////////////////////////////
19 | from . py_window import PyWindow
--------------------------------------------------------------------------------
/gui/widgets/py_line_edit/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY LINE EDIT
18 | # ///////////////////////////////////////////////////////////////
19 | from . py_line_edit import PyLineEdit
--------------------------------------------------------------------------------
/gui/widgets/py_icon_button/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY ICON BUTTON
18 | # ///////////////////////////////////////////////////////////////
19 | from . py_icon_button import PyIconButton
--------------------------------------------------------------------------------
/gui/widgets/py_push_button/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY PUSH BUTTON
18 | # ///////////////////////////////////////////////////////////////
19 | from . py_push_button import PyPushButton
--------------------------------------------------------------------------------
/gui/widgets/py_table_widget/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY TABLE WIDGET
18 | # ///////////////////////////////////////////////////////////////
19 | from . py_table_widget import PyTableWidget
--------------------------------------------------------------------------------
/gui/widgets/py_left_menu/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY LEFT MENU
18 | # Left menu bar
19 | # ///////////////////////////////////////////////////////////////
20 | from . py_left_menu import PyLeftMenu
--------------------------------------------------------------------------------
/gui/widgets/py_circular_progress/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY TITLE BAR
18 | # ///////////////////////////////////////////////////////////////
19 | from . py_circular_progress import PyCircularProgress
--------------------------------------------------------------------------------
/gui/widgets/py_left_column/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY LEFT COLUMN
18 | # Left column with custom widgets
19 | # ///////////////////////////////////////////////////////////////
20 | from . py_left_column import PyLeftColumn
--------------------------------------------------------------------------------
/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "app_name": "PyOneDark - Modern GUI",
3 | "version" : "v1.0.0",
4 | "copyright" : "By: Wanderson M. Pimenta",
5 | "year" : 2021,
6 | "theme_name" : "default",
7 | "custom_title_bar": true,
8 | "startup_size": [
9 | 1400,
10 | 720
11 | ],
12 | "minimum_size": [
13 | 960,
14 | 540
15 | ],
16 | "lef_menu_size" : {
17 | "minimum" : 50,
18 | "maximum" : 240
19 | },
20 | "left_menu_content_margins" : 3,
21 | "left_column_size" : {
22 | "minimum" : 0,
23 | "maximum" : 240
24 | },
25 | "right_column_size" : {
26 | "minimum" : 0,
27 | "maximum" : 240
28 | },
29 | "time_animation" : 500,
30 | "font" : {
31 | "family" : "Segoe UI",
32 | "title_size" : 10,
33 | "text_size" : 9
34 | }
35 | }
--------------------------------------------------------------------------------
/gui/widgets/py_title_bar/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # PY TITLE BAR
18 | # Top bar with move application, maximize, restore, minimize,
19 | # close buttons and extra buttons
20 | # ///////////////////////////////////////////////////////////////
21 | from . py_title_bar import PyTitleBar
--------------------------------------------------------------------------------
/gui/themes/default.json:
--------------------------------------------------------------------------------
1 | {
2 | "theme_name" : "Default",
3 | "app_color" : {
4 | "dark_one" : "#1b1e23",
5 | "dark_two" : "#1e2229",
6 | "dark_three" : "#21252d",
7 | "dark_four" : "#272c36",
8 | "bg_one" : "#2c313c",
9 | "bg_two" : "#343b48",
10 | "bg_three" : "#3c4454",
11 | "icon_color" : "#c3ccdf",
12 | "icon_hover" : "#dce1ec",
13 | "icon_pressed" : "#6c99f4",
14 | "icon_active" : "#f5f6f9",
15 | "context_color" : "#568af2",
16 | "context_hover" : "#6c99f4",
17 | "context_pressed" : "#3f6fd1",
18 | "text_title" : "#dce1ec",
19 | "text_foreground" : "#8a95aa",
20 | "text_description" : "#4f5b6e",
21 | "text_active" : "#dce1ec",
22 | "white" : "#f5f6f9",
23 | "pink" : "#ff007f",
24 | "green" : "#00ff7f",
25 | "red" : "#ff5555",
26 | "yellow" : "#f1fa8c"
27 | }
28 | }
--------------------------------------------------------------------------------
/gui/themes/dracula.json:
--------------------------------------------------------------------------------
1 | {
2 | "theme_name" : "dracula",
3 | "app_color" : {
4 | "dark_one" : "#282a36",
5 | "dark_two" : "#2B2E3B",
6 | "dark_three" : "#333645",
7 | "dark_four" : "#3C4052",
8 | "bg_one" : "#44475a",
9 | "bg_two" : "#4D5066",
10 | "bg_three" : "#595D75",
11 | "icon_color" : "#c3ccdf",
12 | "icon_hover" : "#dce1ec",
13 | "icon_pressed" : "#ff79c6",
14 | "icon_active" : "#f5f6f9",
15 | "context_color" : "#ff79c6",
16 | "context_hover" : "#FF84D7",
17 | "context_pressed" : "#FF90DD",
18 | "text_title" : "#dce1ec",
19 | "text_foreground" : "#f8f8f2",
20 | "text_description" : "#979EC7",
21 | "text_active" : "#dce1ec",
22 | "white" : "#f5f6f9",
23 | "pink" : "#ff79c6",
24 | "green" : "#00ff7f",
25 | "red" : "#ff5555",
26 | "yellow" : "#f1fa8c"
27 | }
28 | }
--------------------------------------------------------------------------------
/gui/themes/bright_theme.json:
--------------------------------------------------------------------------------
1 | {
2 | "theme_name" : "Default",
3 | "app_color" : {
4 | "dark_one" : "#1b1e23",
5 | "dark_two" : "#1e2229",
6 | "dark_three" : "#21252d",
7 | "dark_four" : "#272c36",
8 | "bg_one" : "#D3E0F7",
9 | "bg_two" : "#E2E9F7",
10 | "bg_three" : "#EFF1F7",
11 | "icon_color" : "#6C7C96",
12 | "icon_hover" : "#8CB8FF",
13 | "icon_pressed" : "#6c99f4",
14 | "icon_active" : "#8CB8FF",
15 | "context_color" : "#568af2",
16 | "context_hover" : "#6c99f4",
17 | "context_pressed" : "#4B5469",
18 | "text_title" : "#606C85",
19 | "text_foreground" : "#6B7894",
20 | "text_description" : "#7887A6",
21 | "text_active" : "#8797BA",
22 | "white" : "#f5f6f9",
23 | "pink" : "#ff007f",
24 | "green" : "#00ff7f",
25 | "red" : "#ff5555",
26 | "yellow" : "#f1fa8c"
27 | }
28 | }
--------------------------------------------------------------------------------
/gui/uis/windows/main_window/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # MAIN WINDOW
18 | # ///////////////////////////////////////////////////////////////
19 | from . ui_main import UI_MainWindow
20 |
21 | # SETUP MAIN WINDOW
22 | # ///////////////////////////////////////////////////////////////
23 | from . setup_main_window import SetupMainWindow
--------------------------------------------------------------------------------
/gui/widgets/py_window/styles.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | class Styles(object):
18 | bg_style = """
19 | #pod_bg_app {{
20 | background-color: {_bg_color};
21 | border-radius: {_border_radius};
22 | border: {_border_size}px solid {_border_color};
23 | }}
24 | QFrame {{
25 | color: {_text_color};
26 | font: {_text_font};
27 | }}
28 | """
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PyOneDark Qt Widgets Modern GUI - With PySide6
2 |
3 | 
4 |
5 | > ## :gift: **//// DONATE ////**
6 | > ## 🔗 Donate (Gumroad): https://gum.co/mHsRC
7 | > This interface is free for any use, but if you are going to use it commercially, consider helping to maintain this project and others with a donation by Gumroado at the link above. This helps to keep this and other projects active.
8 |
9 | > **Warning**: this project was created using PySide6 and Python 3.9, using previous versions can cause compatibility problems.
10 |
11 | # YouTube - Presentation And Tutorials
12 | Presentation and tutorial video with the main functions of the user interface.
13 | > 🔗 Presentation - https://youtu.be/1v5errwE8ew
14 |
15 | > 🔗 Trailer - https://youtu.be/EJ8XApAl4aw
16 |
17 | > **TUTORIALS:**
18 |
19 | > Tutorial 01: https://youtu.be/QQGlTGYCMg0
20 |
21 | > Tutorial 02: https://youtu.be/LwKre2proDk
22 |
23 | > Tutorial 03: https://youtu.be/eUT4J9Ukg8g
24 |
25 | > Simple Text Editor - https://youtu.be/v7nh_bSumNQ
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Wanderson M. Pimenta
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/qt_core.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # QT CORE
18 | # Change for PySide Or PyQt
19 | # ///////////////////////// WARNING: ////////////////////////////
20 | # Remember that changing to PyQt too many modules will have
21 | # problems because some classes have different names like:
22 | # Property (pyqtProperty), Slot (pyqtSlot), Signal (pyqtSignal)
23 | # among others.
24 | # ///////////////////////////////////////////////////////////////
25 | from PySide6.QtCore import *
26 | from PySide6.QtGui import *
27 | from PySide6.QtWidgets import *
28 | from PySide6.QtSvgWidgets import *
29 |
--------------------------------------------------------------------------------
/gui/widgets/py_left_menu/py_div.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | # CUSTOM LEFT MENU
22 | # ///////////////////////////////////////////////////////////////
23 | class PyDiv(QWidget):
24 | def __init__(self, color):
25 | super().__init__()
26 |
27 | self.layout = QHBoxLayout(self)
28 | self.layout.setContentsMargins(5,0,5,0)
29 | self.frame_line = QFrame()
30 | self.frame_line.setStyleSheet(f"background: {color};")
31 | self.frame_line.setMaximumHeight(1)
32 | self.frame_line.setMinimumHeight(1)
33 | self.layout.addWidget(self.frame_line)
34 | self.setMaximumHeight(1)
35 |
--------------------------------------------------------------------------------
/gui/widgets/py_title_bar/py_div.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | # CUSTOM LEFT MENU
22 | # ///////////////////////////////////////////////////////////////
23 | class PyDiv(QWidget):
24 | def __init__(self, color):
25 | super().__init__()
26 |
27 | self.layout = QHBoxLayout(self)
28 | self.layout.setContentsMargins(0,5,0,5)
29 | self.frame_line = QFrame()
30 | self.frame_line.setStyleSheet(f"background: {color};")
31 | self.frame_line.setMaximumWidth(1)
32 | self.frame_line.setMinimumWidth(1)
33 | self.layout.addWidget(self.frame_line)
34 | self.setMaximumWidth(20)
35 | self.setMinimumWidth(20)
36 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_minimize.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/gui/core/functions.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT PACKAGES AND MODULES
18 | # ///////////////////////////////////////////////////////////////
19 | import os
20 |
21 | # APP FUNCTIONS
22 | # ///////////////////////////////////////////////////////////////
23 | class Functions:
24 |
25 | # SET SVG ICON
26 | # ///////////////////////////////////////////////////////////////
27 | def set_svg_icon(icon_name):
28 | app_path = os.path.abspath(os.getcwd())
29 | folder = "gui/images/svg_icons/"
30 | path = os.path.join(app_path, folder)
31 | icon = os.path.normpath(os.path.join(path, icon_name))
32 | return icon
33 |
34 | # SET SVG IMAGE
35 | # ///////////////////////////////////////////////////////////////
36 | def set_svg_image(icon_name):
37 | app_path = os.path.abspath(os.getcwd())
38 | folder = "gui/images/svg_images/"
39 | path = os.path.join(app_path, folder)
40 | icon = os.path.normpath(os.path.join(path, icon_name))
41 | return icon
42 |
43 | # SET IMAGE
44 | # ///////////////////////////////////////////////////////////////
45 | def set_image(image_name):
46 | app_path = os.path.abspath(os.getcwd())
47 | folder = "gui/images/images/"
48 | path = os.path.join(app_path, folder)
49 | image = os.path.normpath(os.path.join(path, image_name))
50 | return image
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_maximize.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_menu_close.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_arrow_left.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_arrow_right.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_busy.svg:
--------------------------------------------------------------------------------
1 |
2 |
61 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_idle.svg:
--------------------------------------------------------------------------------
1 |
2 |
61 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_online.svg:
--------------------------------------------------------------------------------
1 |
2 |
61 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_restore.svg:
--------------------------------------------------------------------------------
1 |
2 |
61 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_close.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/gui/widgets/py_push_button/py_push_button.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | # STYLE
22 | # ///////////////////////////////////////////////////////////////
23 | style = '''
24 | QPushButton {{
25 | border: none;
26 | padding-left: 10px;
27 | padding-right: 5px;
28 | color: {_color};
29 | border-radius: {_radius};
30 | background-color: {_bg_color};
31 | }}
32 | QPushButton:hover {{
33 | background-color: {_bg_color_hover};
34 | }}
35 | QPushButton:pressed {{
36 | background-color: {_bg_color_pressed};
37 | }}
38 | '''
39 |
40 | # PY PUSH BUTTON
41 | # ///////////////////////////////////////////////////////////////
42 | class PyPushButton(QPushButton):
43 | def __init__(
44 | self,
45 | text,
46 | radius,
47 | color,
48 | bg_color,
49 | bg_color_hover,
50 | bg_color_pressed,
51 | parent = None,
52 | ):
53 | super().__init__()
54 |
55 | # SET PARAMETRES
56 | self.setText(text)
57 | if parent != None:
58 | self.setParent(parent)
59 | self.setCursor(Qt.PointingHandCursor)
60 |
61 | # SET STYLESHEET
62 | custom_style = style.format(
63 | _color = color,
64 | _radius = radius,
65 | _bg_color = bg_color,
66 | _bg_color_hover = bg_color_hover,
67 | _bg_color_pressed = bg_color_pressed
68 | )
69 | self.setStyleSheet(custom_style)
70 |
71 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_menu.svg:
--------------------------------------------------------------------------------
1 |
2 |
64 |
--------------------------------------------------------------------------------
/gui/widgets/py_left_column/py_icon.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | # PY ICON WITH CUSTOM COLORS
22 | # ///////////////////////////////////////////////////////////////
23 | class PyIcon(QWidget):
24 | def __init__(
25 | self,
26 | icon_path,
27 | icon_color
28 | ):
29 | super().__init__()
30 |
31 | # PROPERTIES
32 | self._icon_path = icon_path
33 | self._icon_color = icon_color
34 |
35 | # SETUP UI
36 | self.setup_ui()
37 |
38 | def setup_ui(self):
39 | # LAYOUT
40 | self.layout = QVBoxLayout(self)
41 | self.layout.setContentsMargins(0,0,0,0)
42 |
43 | # LABEL
44 | self.icon = QLabel()
45 | self.icon.setAlignment(Qt.AlignCenter)
46 |
47 | # PAINTER
48 | self.set_icon(self._icon_path, self._icon_color)
49 |
50 | # ADD TO LAYOUT
51 | self.layout.addWidget(self.icon)
52 |
53 | def set_icon(self, icon_path, icon_color = None):
54 | # GET COLOR
55 | color = ""
56 | if icon_color != None:
57 | color = icon_color
58 | else:
59 | color = self._icon_color
60 |
61 | # PAINTER / PIXMAP
62 | icon = QPixmap(icon_path)
63 | painter = QPainter(icon)
64 | painter.setCompositionMode(QPainter.CompositionMode_SourceIn)
65 | painter.fillRect(icon.rect(), color)
66 | painter.end()
67 |
68 | # SET PIXMAP
69 | self.icon.setPixmap(icon)
70 |
71 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_invisible.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_file.svg:
--------------------------------------------------------------------------------
1 |
2 |
64 |
--------------------------------------------------------------------------------
/gui/core/json_settings.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT PACKAGES AND MODULES
18 | # ///////////////////////////////////////////////////////////////
19 | import json
20 | import os
21 |
22 | # APP SETTINGS
23 | # ///////////////////////////////////////////////////////////////
24 | class Settings(object):
25 | # APP PATH
26 | # ///////////////////////////////////////////////////////////////
27 | json_file = "settings.json"
28 | app_path = os.path.abspath(os.getcwd())
29 | settings_path = os.path.normpath(os.path.join(app_path, json_file))
30 | if not os.path.isfile(settings_path):
31 | print(f"WARNING: \"settings.json\" not found! check in the folder {settings_path}")
32 |
33 | # INIT SETTINGS
34 | # ///////////////////////////////////////////////////////////////
35 | def __init__(self):
36 | super(Settings, self).__init__()
37 |
38 | # DICTIONARY WITH SETTINGS
39 | # Just to have objects references
40 | self.items = {}
41 |
42 | # DESERIALIZE
43 | self.deserialize()
44 |
45 | # SERIALIZE JSON
46 | # ///////////////////////////////////////////////////////////////
47 | def serialize(self):
48 | # WRITE JSON FILE
49 | with open(self.settings_path, "w", encoding='utf-8') as write:
50 | json.dump(self.items, write, indent=4)
51 |
52 | # DESERIALIZE JSON
53 | # ///////////////////////////////////////////////////////////////
54 | def deserialize(self):
55 | # READ JSON FILE
56 | with open(self.settings_path, "r", encoding='utf-8') as reader:
57 | settings = json.loads(reader.read())
58 | self.items = settings
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_folder.svg:
--------------------------------------------------------------------------------
1 |
2 |
63 |
--------------------------------------------------------------------------------
/gui/widgets/__init__.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT WIDGETS
18 | # ADD here all custom widgets
19 | # ///////////////////////////////////////////////////////////////
20 |
21 | # PY WINDOW
22 | # ///////////////////////////////////////////////////////////////
23 | from . py_window import PyWindow
24 |
25 | # RESIZE GRIP
26 | # ///////////////////////////////////////////////////////////////
27 | from . py_grips import PyGrips
28 |
29 | # LEFT MENU
30 | # ///////////////////////////////////////////////////////////////
31 | from . py_left_menu import PyLeftMenu
32 |
33 | # PY LEFT COLUMN
34 | # ///////////////////////////////////////////////////////////////
35 | from . py_left_column import PyLeftColumn
36 |
37 | # PY TITLE BAR
38 | # ///////////////////////////////////////////////////////////////
39 | from . py_title_bar import PyTitleBar
40 |
41 | # PY CREDITS
42 | # ///////////////////////////////////////////////////////////////
43 | from . py_credits_bar import PyCredits
44 |
45 | # PY PUSH BUTTON
46 | # ///////////////////////////////////////////////////////////////
47 | from . py_push_button import PyPushButton
48 |
49 | # PY TOGGLE
50 | # ///////////////////////////////////////////////////////////////
51 | from . py_toggle import PyToggle
52 |
53 | # PY SLIDER
54 | # ///////////////////////////////////////////////////////////////
55 | from . py_slider import PySlider
56 |
57 | # PY CIRCULAR PROGRESS
58 | # ///////////////////////////////////////////////////////////////
59 | from . py_circular_progress import PyCircularProgress
60 |
61 | # PY ICON BUTTON
62 | # ///////////////////////////////////////////////////////////////
63 | from . py_icon_button import PyIconButton
64 |
65 | # PY LINE EDIT
66 | # ///////////////////////////////////////////////////////////////
67 | from . py_line_edit import PyLineEdit
68 |
69 | # PY TABLE WIDGET
70 | # ///////////////////////////////////////////////////////////////
71 | from . py_table_widget import PyTableWidget
--------------------------------------------------------------------------------
/gui/core/json_themes.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT PACKAGES AND MODULES
18 | # ///////////////////////////////////////////////////////////////
19 | import json
20 | import os
21 |
22 | # IMPORT SETTINGS
23 | # ///////////////////////////////////////////////////////////////
24 | from gui.core.json_settings import Settings
25 |
26 | # APP THEMES
27 | # ///////////////////////////////////////////////////////////////
28 | class Themes(object):
29 | # LOAD SETTINGS
30 | # ///////////////////////////////////////////////////////////////
31 | setup_settings = Settings()
32 | _settings = setup_settings.items
33 |
34 | # APP PATH
35 | # ///////////////////////////////////////////////////////////////
36 | json_file = f"gui/themes/{_settings['theme_name']}.json"
37 | app_path = os.path.abspath(os.getcwd())
38 | settings_path = os.path.normpath(os.path.join(app_path, json_file))
39 | if not os.path.isfile(settings_path):
40 | print(f"WARNING: \"gui/themes/{_settings['theme_name']}.json\" not found! check in the folder {settings_path}")
41 |
42 | # INIT SETTINGS
43 | # ///////////////////////////////////////////////////////////////
44 | def __init__(self):
45 | super(Themes, self).__init__()
46 |
47 | # DICTIONARY WITH SETTINGS
48 | self.items = {}
49 |
50 | # DESERIALIZE
51 | self.deserialize()
52 |
53 | # SERIALIZE JSON
54 | # ///////////////////////////////////////////////////////////////
55 | def serialize(self):
56 | # WRITE JSON FILE
57 | with open(self.settings_path, "w", encoding='utf-8') as write:
58 | json.dump(self.items, write, indent=4)
59 |
60 | # DESERIALIZE JSON
61 | # ///////////////////////////////////////////////////////////////
62 | def deserialize(self):
63 | # READ JSON FILE
64 | with open(self.settings_path, "r", encoding='utf-8') as reader:
65 | settings = json.loads(reader.read())
66 | self.items = settings
--------------------------------------------------------------------------------
/gui/images/svg_icons/active_menu.svg:
--------------------------------------------------------------------------------
1 |
2 |
80 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_heart.svg:
--------------------------------------------------------------------------------
1 |
2 |
63 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_folder_open.svg:
--------------------------------------------------------------------------------
1 |
2 |
64 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_add_user.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_send.svg:
--------------------------------------------------------------------------------
1 |
2 |
79 |
--------------------------------------------------------------------------------
/gui/widgets/py_line_edit/py_line_edit.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | # STYLE
22 | # ///////////////////////////////////////////////////////////////
23 | style = '''
24 | QLineEdit {{
25 | background-color: {_bg_color};
26 | border-radius: {_radius}px;
27 | border: {_border_size}px solid transparent;
28 | padding-left: 10px;
29 | padding-right: 10px;
30 | selection-color: {_selection_color};
31 | selection-background-color: {_context_color};
32 | color: {_color};
33 | }}
34 | QLineEdit:focus {{
35 | border: {_border_size}px solid {_context_color};
36 | background-color: {_bg_color_active};
37 | }}
38 | '''
39 |
40 | # PY PUSH BUTTON
41 | # ///////////////////////////////////////////////////////////////
42 | class PyLineEdit(QLineEdit):
43 | def __init__(
44 | self,
45 | text = "",
46 | place_holder_text = "",
47 | radius = 8,
48 | border_size = 2,
49 | color = "#FFF",
50 | selection_color = "#FFF",
51 | bg_color = "#333",
52 | bg_color_active = "#222",
53 | context_color = "#00ABE8"
54 | ):
55 | super().__init__()
56 |
57 | # PARAMETERS
58 | if text:
59 | self.setText(text)
60 | if place_holder_text:
61 | self.setPlaceholderText(place_holder_text)
62 |
63 | # SET STYLESHEET
64 | self.set_stylesheet(
65 | radius,
66 | border_size,
67 | color,
68 | selection_color,
69 | bg_color,
70 | bg_color_active,
71 | context_color
72 | )
73 |
74 | # SET STYLESHEET
75 | def set_stylesheet(
76 | self,
77 | radius,
78 | border_size,
79 | color,
80 | selection_color,
81 | bg_color,
82 | bg_color_active,
83 | context_color
84 | ):
85 | # APPLY STYLESHEET
86 | style_format = style.format(
87 | _radius = radius,
88 | _border_size = border_size,
89 | _color = color,
90 | _selection_color = selection_color,
91 | _bg_color = bg_color,
92 | _bg_color_active = bg_color_active,
93 | _context_color = context_color
94 | )
95 | self.setStyleSheet(style_format)
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_save.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_widgets.svg:
--------------------------------------------------------------------------------
1 |
2 |
102 |
--------------------------------------------------------------------------------
/gui/widgets/py_toggle/py_toggle.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | class PyToggle(QCheckBox):
22 | def __init__(
23 | self,
24 | width = 50,
25 | bg_color = "#777",
26 | circle_color = "#DDD",
27 | active_color = "#00BCFF",
28 | animation_curve = QEasingCurve.OutBounce
29 | ):
30 | QCheckBox.__init__(self)
31 | self.setFixedSize(width, 28)
32 | self.setCursor(Qt.PointingHandCursor)
33 |
34 | # COLORS
35 | self._bg_color = bg_color
36 | self._circle_color = circle_color
37 | self._active_color = active_color
38 |
39 | self._position = 3
40 | self.animation = QPropertyAnimation(self, b"position")
41 | self.animation.setEasingCurve(animation_curve)
42 | self.animation.setDuration(500)
43 | self.stateChanged.connect(self.setup_animation)
44 |
45 | @Property(float)
46 | def position(self):
47 | return self._position
48 |
49 | @position.setter
50 | def position(self, pos):
51 | self._position = pos
52 | self.update()
53 |
54 | # START STOP ANIMATION
55 | def setup_animation(self, value):
56 | self.animation.stop()
57 | if value:
58 | self.animation.setEndValue(self.width() - 26)
59 | else:
60 | self.animation.setEndValue(4)
61 | self.animation.start()
62 |
63 | def hitButton(self, pos: QPoint):
64 | return self.contentsRect().contains(pos)
65 |
66 | def paintEvent(self, e):
67 | p = QPainter(self)
68 | p.setRenderHint(QPainter.Antialiasing)
69 | p.setFont(QFont("Segoe UI", 9))
70 |
71 | # SET PEN
72 | p.setPen(Qt.NoPen)
73 |
74 | # DRAW RECT
75 | rect = QRect(0, 0, self.width(), self.height())
76 |
77 | if not self.isChecked():
78 | p.setBrush(QColor(self._bg_color))
79 | p.drawRoundedRect(0,0,rect.width(), 28, 14, 14)
80 | p.setBrush(QColor(self._circle_color))
81 | p.drawEllipse(self._position, 3, 22, 22)
82 | else:
83 | p.setBrush(QColor(self._active_color))
84 | p.drawRoundedRect(0,0,rect.width(), 28, 14, 14)
85 | p.setBrush(QColor(self._circle_color))
86 | p.drawEllipse(self._position, 3, 22, 22)
87 |
88 | p.end()
--------------------------------------------------------------------------------
/gui/widgets/py_table_widget/py_table_widget.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | # IMPORT STYLE
22 | # ///////////////////////////////////////////////////////////////
23 | from . style import *
24 |
25 | # PY PUSH BUTTON
26 | # ///////////////////////////////////////////////////////////////
27 | class PyTableWidget(QTableWidget):
28 | def __init__(
29 | self,
30 | radius = 8,
31 | color = "#FFF",
32 | bg_color = "#444",
33 | selection_color = "#FFF",
34 | header_horizontal_color = "#333",
35 | header_vertical_color = "#444",
36 | bottom_line_color = "#555",
37 | grid_line_color = "#555",
38 | scroll_bar_bg_color = "#FFF",
39 | scroll_bar_btn_color = "#3333",
40 | context_color = "#00ABE8"
41 | ):
42 | super().__init__()
43 |
44 | # PARAMETERS
45 |
46 | # SET STYLESHEET
47 | self.set_stylesheet(
48 | radius,
49 | color,
50 | bg_color,
51 | header_horizontal_color,
52 | header_vertical_color,
53 | selection_color,
54 | bottom_line_color,
55 | grid_line_color,
56 | scroll_bar_bg_color,
57 | scroll_bar_btn_color,
58 | context_color
59 | )
60 |
61 | # SET STYLESHEET
62 | def set_stylesheet(
63 | self,
64 | radius,
65 | color,
66 | bg_color,
67 | header_horizontal_color,
68 | header_vertical_color,
69 | selection_color,
70 | bottom_line_color,
71 | grid_line_color,
72 | scroll_bar_bg_color,
73 | scroll_bar_btn_color,
74 | context_color
75 | ):
76 | # APPLY STYLESHEET
77 | style_format = style.format(
78 | _radius = radius,
79 | _color = color,
80 | _bg_color = bg_color,
81 | _header_horizontal_color = header_horizontal_color,
82 | _header_vertical_color = header_vertical_color,
83 | _selection_color = selection_color,
84 | _bottom_line_color = bottom_line_color,
85 | _grid_line_color = grid_line_color,
86 | _scroll_bar_bg_color = scroll_bar_bg_color,
87 | _scroll_bar_btn_color = scroll_bar_btn_color,
88 | _context_color = context_color
89 | )
90 | self.setStyleSheet(style_format)
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_info.svg:
--------------------------------------------------------------------------------
1 |
2 |
79 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/no_icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
61 |
--------------------------------------------------------------------------------
/gui/widgets/py_credits_bar/py_credits.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | # PY CREDITS BAR AND VERSION
22 | # ///////////////////////////////////////////////////////////////
23 | class PyCredits(QWidget):
24 | def __init__(
25 | self,
26 | copyright,
27 | version,
28 | bg_two,
29 | font_family,
30 | text_size,
31 | text_description_color,
32 | radius = 8,
33 | padding = 10
34 | ):
35 | super().__init__()
36 |
37 | # PROPERTIES
38 | self._copyright = copyright
39 | self._version = version
40 | self._bg_two = bg_two
41 | self._font_family = font_family
42 | self._text_size = text_size
43 | self._text_description_color = text_description_color
44 | self._radius = radius
45 | self._padding = padding
46 |
47 | # SETUP UI
48 | self.setup_ui()
49 |
50 | def setup_ui(self):
51 | # ADD LAYOUT
52 | self.widget_layout = QHBoxLayout(self)
53 | self.widget_layout.setContentsMargins(0,0,0,0)
54 |
55 | # BG STYLE
56 | style = f"""
57 | #bg_frame {{
58 | border-radius: {self._radius}px;
59 | background-color: {self._bg_two};
60 | }}
61 | .QLabel {{
62 | font: {self._text_size}pt "{self._font_family}";
63 | color: {self._text_description_color};
64 | padding-left: {self._padding}px;
65 | padding-right: {self._padding}px;
66 | }}
67 | """
68 |
69 | # BG FRAME
70 | self.bg_frame = QFrame()
71 | self.bg_frame.setObjectName("bg_frame")
72 | self.bg_frame.setStyleSheet(style)
73 |
74 | # ADD TO LAYOUT
75 | self.widget_layout.addWidget(self.bg_frame)
76 |
77 | # ADD BG LAYOUT
78 | self.bg_layout = QHBoxLayout(self.bg_frame)
79 | self.bg_layout.setContentsMargins(0,0,0,0)
80 |
81 | # ADD COPYRIGHT TEXT
82 | self.copyright_label = QLabel(self._copyright)
83 | self.copyright_label.setAlignment(Qt.AlignVCenter)
84 |
85 | # ADD VERSION TEXT
86 | self.version_label = QLabel(self._version)
87 | self.version_label.setAlignment(Qt.AlignVCenter)
88 |
89 | # SEPARATOR
90 | self.separator = QSpacerItem(20, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
91 |
92 | # ADD TO LAYOUT
93 | self.bg_layout.addWidget(self.copyright_label)
94 | self.bg_layout.addSpacerItem(self.separator)
95 | self.bg_layout.addWidget(self.version_label)
96 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_home.svg:
--------------------------------------------------------------------------------
1 |
2 |
67 |
--------------------------------------------------------------------------------
/gui/widgets/py_slider/py_slider.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | style = """
22 | /* HORIZONTAL */
23 | QSlider {{ margin: {_margin}px; }}
24 | QSlider::groove:horizontal {{
25 | border-radius: {_bg_radius}px;
26 | height: {_bg_size}px;
27 | margin: 0px;
28 | background-color: {_bg_color};
29 | }}
30 | QSlider::groove:horizontal:hover {{ background-color: {_bg_color_hover}; }}
31 | QSlider::handle:horizontal {{
32 | border: none;
33 | height: {_handle_size}px;
34 | width: {_handle_size}px;
35 | margin: {_handle_margin}px;
36 | border-radius: {_handle_radius}px;
37 | background-color: {_handle_color};
38 | }}
39 | QSlider::handle:horizontal:hover {{ background-color: {_handle_color_hover}; }}
40 | QSlider::handle:horizontal:pressed {{ background-color: {_handle_color_pressed}; }}
41 |
42 | /* VERTICAL */
43 | QSlider::groove:vertical {{
44 | border-radius: {_bg_radius}px;
45 | width: {_bg_size}px;
46 | margin: 0px;
47 | background-color: {_bg_color};
48 | }}
49 | QSlider::groove:vertical:hover {{ background-color: {_bg_color_hover}; }}
50 | QSlider::handle:vertical {{
51 | border: none;
52 | height: {_handle_size}px;
53 | width: {_handle_size}px;
54 | margin: {_handle_margin}px;
55 | border-radius: {_handle_radius}px;
56 | background-color: {_handle_color};
57 | }}
58 | QSlider::handle:vertical:hover {{ background-color: {_handle_color_hover}; }}
59 | QSlider::handle:vertical:pressed {{ background-color: {_handle_color_pressed}; }}
60 | """
61 |
62 | class PySlider(QSlider):
63 | def __init__(
64 | self,
65 | margin = 0,
66 | bg_size = 20,
67 | bg_radius = 10,
68 | bg_color = "#1b1e23",
69 | bg_color_hover = "#1e2229",
70 | handle_margin = 2,
71 | handle_size = 16,
72 | handle_radius = 8,
73 | handle_color = "#568af2",
74 | handle_color_hover = "#6c99f4",
75 | handle_color_pressed = "#3f6fd1"
76 | ):
77 | super(PySlider, self).__init__()
78 |
79 | # FORMAT STYLE
80 | # ///////////////////////////////////////////////////////////////
81 | adjust_style = style.format(
82 | _margin = margin,
83 | _bg_size = bg_size,
84 | _bg_radius = bg_radius,
85 | _bg_color = bg_color,
86 | _bg_color_hover = bg_color_hover,
87 | _handle_margin = handle_margin,
88 | _handle_size = handle_size,
89 | _handle_radius = handle_radius,
90 | _handle_color = handle_color,
91 | _handle_color_hover = handle_color_hover,
92 | _handle_color_pressed = handle_color_pressed
93 | )
94 |
95 | # APPLY CUSTOM STYLE
96 | # ///////////////////////////////////////////////////////////////
97 | self.setStyleSheet(adjust_style)
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_attachment.svg:
--------------------------------------------------------------------------------
1 |
2 |
79 |
--------------------------------------------------------------------------------
/gui/uis/columns/right_column.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | RightColumn
4 |
5 |
6 |
7 | 0
8 | 0
9 | 240
10 | 600
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | 0
19 |
20 |
21 | 5
22 |
23 |
24 | 5
25 |
26 |
27 | 5
28 |
29 |
30 | 5
31 |
32 | -
33 |
34 |
35 | 0
36 |
37 |
38 |
39 |
40 | 5
41 |
42 |
43 | 5
44 |
45 |
46 | 5
47 |
48 |
49 | 5
50 |
51 |
52 | 5
53 |
54 |
-
55 |
56 |
57 |
58 | 16
59 |
60 |
61 |
62 | font-size: 16pt
63 |
64 |
65 | Menu 1 - Right Menu
66 |
67 |
68 | Qt::AlignCenter
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | 5
78 |
79 |
80 | 5
81 |
82 |
83 | 5
84 |
85 |
86 | 5
87 |
88 |
89 | 5
90 |
91 | -
92 |
93 |
94 |
95 | 16
96 |
97 |
98 |
99 | font-size: 16pt
100 |
101 |
102 | Menu 2 - Right Menu
103 |
104 |
105 | Qt::AlignCenter
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_more_options.svg:
--------------------------------------------------------------------------------
1 |
2 |
79 |
--------------------------------------------------------------------------------
/gui/widgets/py_table_widget/style.py:
--------------------------------------------------------------------------------
1 | # STYLE
2 | # ///////////////////////////////////////////////////////////////
3 | style = '''
4 | /* /////////////////////////////////////////////////////////////////////////////////////////////////
5 | QTableWidget */
6 |
7 | QTableWidget {{
8 | background-color: {_bg_color};
9 | padding: 5px;
10 | border-radius: {_radius}px;
11 | gridline-color: {_grid_line_color};
12 | color: {_color};
13 | }}
14 | QTableWidget::item{{
15 | border-color: none;
16 | padding-left: 5px;
17 | padding-right: 5px;
18 | gridline-color: rgb(44, 49, 60);
19 | border-bottom: 1px solid {_bottom_line_color};
20 | }}
21 | QTableWidget::item:selected{{
22 | background-color: {_selection_color};
23 | }}
24 | QHeaderView::section{{
25 | background-color: rgb(33, 37, 43);
26 | max-width: 30px;
27 | border: 1px solid rgb(44, 49, 58);
28 | border-style: none;
29 | border-bottom: 1px solid rgb(44, 49, 60);
30 | border-right: 1px solid rgb(44, 49, 60);
31 | }}
32 | QTableWidget::horizontalHeader {{
33 | background-color: rgb(33, 37, 43);
34 | }}
35 | QTableWidget QTableCornerButton::section {{
36 | border: none;
37 | background-color: {_header_horizontal_color};
38 | padding: 3px;
39 | border-top-left-radius: {_radius}px;
40 | }}
41 | QHeaderView::section:horizontal
42 | {{
43 | border: none;
44 | background-color: {_header_horizontal_color};
45 | padding: 3px;
46 | }}
47 | QHeaderView::section:vertical
48 | {{
49 | border: none;
50 | background-color: {_header_vertical_color};
51 | padding-left: 5px;
52 | padding-right: 5px;
53 | border-bottom: 1px solid {_bottom_line_color};
54 | margin-bottom: 1px;
55 | }}
56 |
57 |
58 | /* /////////////////////////////////////////////////////////////////////////////////////////////////
59 | ScrollBars */
60 | QScrollBar:horizontal {{
61 | border: none;
62 | background: {_scroll_bar_bg_color};
63 | height: 8px;
64 | margin: 0px 21px 0 21px;
65 | border-radius: 0px;
66 | }}
67 | QScrollBar::handle:horizontal {{
68 | background: {_context_color};
69 | min-width: 25px;
70 | border-radius: 4px
71 | }}
72 | QScrollBar::add-line:horizontal {{
73 | border: none;
74 | background: {_scroll_bar_btn_color};
75 | width: 20px;
76 | border-top-right-radius: 4px;
77 | border-bottom-right-radius: 4px;
78 | subcontrol-position: right;
79 | subcontrol-origin: margin;
80 | }}
81 | QScrollBar::sub-line:horizontal {{
82 | border: none;
83 | background: {_scroll_bar_btn_color};
84 | width: 20px;
85 | border-top-left-radius: 4px;
86 | border-bottom-left-radius: 4px;
87 | subcontrol-position: left;
88 | subcontrol-origin: margin;
89 | }}
90 | QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal
91 | {{
92 | background: none;
93 | }}
94 | QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal
95 | {{
96 | background: none;
97 | }}
98 | QScrollBar:vertical {{
99 | border: none;
100 | background: {_scroll_bar_bg_color};
101 | width: 8px;
102 | margin: 21px 0 21px 0;
103 | border-radius: 0px;
104 | }}
105 | QScrollBar::handle:vertical {{
106 | background: {_context_color};
107 | min-height: 25px;
108 | border-radius: 4px
109 | }}
110 | QScrollBar::add-line:vertical {{
111 | border: none;
112 | background: {_scroll_bar_btn_color};
113 | height: 20px;
114 | border-bottom-left-radius: 4px;
115 | border-bottom-right-radius: 4px;
116 | subcontrol-position: bottom;
117 | subcontrol-origin: margin;
118 | }}
119 | QScrollBar::sub-line:vertical {{
120 | border: none;
121 | background: {_scroll_bar_btn_color};
122 | height: 20px;
123 | border-top-left-radius: 4px;
124 | border-top-right-radius: 4px;
125 | subcontrol-position: top;
126 | subcontrol-origin: margin;
127 | }}
128 | QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {{
129 | background: none;
130 | }}
131 |
132 | QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {{
133 | background: none;
134 | }}
135 | '''
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_search.svg:
--------------------------------------------------------------------------------
1 |
2 |
61 |
--------------------------------------------------------------------------------
/gui/widgets/py_circular_progress/py_circular_progress.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | class PyCircularProgress(QWidget):
22 | def __init__(
23 | self,
24 | value = 0,
25 | progress_width = 10,
26 | is_rounded = True,
27 | max_value = 100,
28 | progress_color = "#ff79c6",
29 | enable_text = True,
30 | font_family = "Segoe UI",
31 | font_size = 12,
32 | suffix = "%",
33 | text_color = "#ff79c6",
34 | enable_bg = True,
35 | bg_color = "#44475a"
36 | ):
37 | QWidget.__init__(self)
38 |
39 | # CUSTOM PROPERTIES
40 | self.value = value
41 | self.progress_width = progress_width
42 | self.progress_rounded_cap = is_rounded
43 | self.max_value = max_value
44 | self.progress_color = progress_color
45 | # Text
46 | self.enable_text = enable_text
47 | self.font_family = font_family
48 | self.font_size = font_size
49 | self.suffix = suffix
50 | self.text_color = text_color
51 | # BG
52 | self.enable_bg = enable_bg
53 | self.bg_color = bg_color
54 |
55 | # ADD DROPSHADOW
56 | def add_shadow(self, enable):
57 | if enable:
58 | self.shadow = QGraphicsDropShadowEffect(self)
59 | self.shadow.setBlurRadius(15)
60 | self.shadow.setXOffset(0)
61 | self.shadow.setYOffset(0)
62 | self.shadow.setColor(QColor(0, 0, 0, 80))
63 | self.setGraphicsEffect(self.shadow)
64 |
65 | # SET VALUE
66 | def set_value(self, value):
67 | self.value = value
68 | self.repaint() # Render progress bar after change value
69 |
70 |
71 | # PAINT EVENT (DESIGN YOUR CIRCULAR PROGRESS HERE)
72 | def paintEvent(self, e):
73 | # SET PROGRESS PARAMETERS
74 | width = self.width() - self.progress_width
75 | height = self.height() - self.progress_width
76 | margin = self.progress_width / 2
77 | value = self.value * 360 / self.max_value
78 |
79 | # PAINTER
80 | paint = QPainter()
81 | paint.begin(self)
82 | paint.setRenderHint(QPainter.Antialiasing) # remove pixelated edges
83 | paint.setFont(QFont(self.font_family, self.font_size))
84 |
85 | # CREATE RECTANGLE
86 | rect = QRect(0, 0, self.width(), self.height())
87 | paint.setPen(Qt.NoPen)
88 |
89 | # PEN
90 | pen = QPen()
91 | pen.setWidth(self.progress_width)
92 | # Set Round Cap
93 | if self.progress_rounded_cap:
94 | pen.setCapStyle(Qt.RoundCap)
95 |
96 | # ENABLE BG
97 | if self.enable_bg:
98 | pen.setColor(QColor(self.bg_color))
99 | paint.setPen(pen)
100 | paint.drawArc(margin, margin, width, height, 0, 360 * 16)
101 |
102 | # CREATE ARC / CIRCULAR PROGRESS
103 | pen.setColor(QColor(self.progress_color))
104 | paint.setPen(pen)
105 | paint.drawArc(margin, margin, width, height, -90 * 16, -value * 16)
106 |
107 | # CREATE TEXT
108 | if self.enable_text:
109 | pen.setColor(QColor(self.text_color))
110 | paint.setPen(pen)
111 | paint.drawText(rect, Qt.AlignCenter, f"{self.value}{self.suffix}")
112 |
113 | # END
114 | paint.end()
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_emoticons.svg:
--------------------------------------------------------------------------------
1 |
2 |
79 |
--------------------------------------------------------------------------------
/gui/uis/columns/ui_right_column.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 |
22 | class Ui_RightColumn(object):
23 | def setupUi(self, RightColumn):
24 | if not RightColumn.objectName():
25 | RightColumn.setObjectName(u"RightColumn")
26 | RightColumn.resize(240, 600)
27 | self.main_pages_layout = QVBoxLayout(RightColumn)
28 | self.main_pages_layout.setSpacing(0)
29 | self.main_pages_layout.setObjectName(u"main_pages_layout")
30 | self.main_pages_layout.setContentsMargins(5, 5, 5, 5)
31 | self.menus = QStackedWidget(RightColumn)
32 | self.menus.setObjectName(u"menus")
33 | self.menu_1 = QWidget()
34 | self.menu_1.setObjectName(u"menu_1")
35 | self.verticalLayout = QVBoxLayout(self.menu_1)
36 | self.verticalLayout.setSpacing(5)
37 | self.verticalLayout.setObjectName(u"verticalLayout")
38 | self.verticalLayout.setContentsMargins(5, 5, 5, 5)
39 | self.btn_1_widget = QWidget(self.menu_1)
40 | self.btn_1_widget.setObjectName(u"btn_1_widget")
41 | self.btn_1_widget.setMinimumSize(QSize(0, 40))
42 | self.btn_1_widget.setMaximumSize(QSize(16777215, 40))
43 | self.btn_1_layout = QVBoxLayout(self.btn_1_widget)
44 | self.btn_1_layout.setSpacing(0)
45 | self.btn_1_layout.setObjectName(u"btn_1_layout")
46 | self.btn_1_layout.setContentsMargins(0, 0, 0, 0)
47 |
48 | self.verticalLayout.addWidget(self.btn_1_widget)
49 |
50 | self.label_1 = QLabel(self.menu_1)
51 | self.label_1.setObjectName(u"label_1")
52 | font = QFont()
53 | font.setPointSize(16)
54 | self.label_1.setFont(font)
55 | self.label_1.setStyleSheet(u"font-size: 16pt")
56 | self.label_1.setAlignment(Qt.AlignCenter)
57 |
58 | self.verticalLayout.addWidget(self.label_1)
59 |
60 | self.menus.addWidget(self.menu_1)
61 | self.menu_2 = QWidget()
62 | self.menu_2.setObjectName(u"menu_2")
63 | self.verticalLayout_2 = QVBoxLayout(self.menu_2)
64 | self.verticalLayout_2.setSpacing(5)
65 | self.verticalLayout_2.setObjectName(u"verticalLayout_2")
66 | self.verticalLayout_2.setContentsMargins(5, 5, 5, 5)
67 | self.btn_2_widget = QWidget(self.menu_2)
68 | self.btn_2_widget.setObjectName(u"btn_2_widget")
69 | self.btn_2_widget.setMinimumSize(QSize(0, 40))
70 | self.btn_2_widget.setMaximumSize(QSize(16777215, 40))
71 | self.btn_2_layout = QVBoxLayout(self.btn_2_widget)
72 | self.btn_2_layout.setSpacing(0)
73 | self.btn_2_layout.setObjectName(u"btn_2_layout")
74 | self.btn_2_layout.setContentsMargins(0, 0, 0, 0)
75 |
76 | self.verticalLayout_2.addWidget(self.btn_2_widget)
77 |
78 | self.label_2 = QLabel(self.menu_2)
79 | self.label_2.setObjectName(u"label_2")
80 | self.label_2.setFont(font)
81 | self.label_2.setStyleSheet(u"font-size: 16pt")
82 | self.label_2.setAlignment(Qt.AlignCenter)
83 |
84 | self.verticalLayout_2.addWidget(self.label_2)
85 |
86 | self.label_3 = QLabel(self.menu_2)
87 | self.label_3.setObjectName(u"label_3")
88 | font1 = QFont()
89 | font1.setPointSize(9)
90 | self.label_3.setFont(font1)
91 | self.label_3.setStyleSheet(u"font-size: 9pt")
92 | self.label_3.setAlignment(Qt.AlignCenter)
93 | self.label_3.setWordWrap(True)
94 |
95 | self.verticalLayout_2.addWidget(self.label_3)
96 |
97 | self.menus.addWidget(self.menu_2)
98 |
99 | self.main_pages_layout.addWidget(self.menus)
100 |
101 |
102 | self.retranslateUi(RightColumn)
103 |
104 | self.menus.setCurrentIndex(1)
105 |
106 |
107 | QMetaObject.connectSlotsByName(RightColumn)
108 | # setupUi
109 |
110 | def retranslateUi(self, RightColumn):
111 | RightColumn.setWindowTitle(QCoreApplication.translate("RightColumn", u"Form", None))
112 | self.label_1.setText(QCoreApplication.translate("RightColumn", u"Menu 1 - Right Menu", None))
113 | self.label_2.setText(QCoreApplication.translate("RightColumn", u"Menu 2 - Right Menu", None))
114 | self.label_3.setText(QCoreApplication.translate("RightColumn", u"This is just an example menu.\n"
115 | "Add Qt Widgets or your custom widgets here.", None))
116 | # retranslateUi
117 |
118 |
--------------------------------------------------------------------------------
/gui/widgets/py_window/py_window.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT PACKAGES AND MODULES
18 | # ///////////////////////////////////////////////////////////////
19 |
20 | # IMPORT QT CORE
21 | # ///////////////////////////////////////////////////////////////
22 | from qt_core import *
23 |
24 | # IMPORT SETTINGS
25 | # ///////////////////////////////////////////////////////////////
26 | from gui.core.json_settings import Settings
27 |
28 | # IMPORT STYLES
29 | # ///////////////////////////////////////////////////////////////
30 | from . styles import Styles
31 |
32 | # PY WINDOW
33 | # ///////////////////////////////////////////////////////////////
34 | class PyWindow(QFrame):
35 | def __init__(
36 | self,
37 | parent,
38 | layout = Qt.Vertical,
39 | margin = 0,
40 | spacing = 2,
41 | bg_color = "#2c313c",
42 | text_color = "#fff",
43 | text_font = "9pt 'Segoe UI'",
44 | border_radius = 10,
45 | border_size = 2,
46 | border_color = "#343b48",
47 | enable_shadow = True
48 | ):
49 | super().__init__()
50 |
51 | # LOAD SETTINGS
52 | # ///////////////////////////////////////////////////////////////
53 | settings = Settings()
54 | self.settings = settings.items
55 |
56 | # PROPERTIES
57 | # ///////////////////////////////////////////////////////////////
58 | self.parent = parent
59 | self.layout = layout
60 | self.margin = margin
61 | self.bg_color = bg_color
62 | self.text_color = text_color
63 | self.text_font = text_font
64 | self.border_radius = border_radius
65 | self.border_size = border_size
66 | self.border_color = border_color
67 | self.enable_shadow = enable_shadow
68 |
69 | # OBJECT NAME
70 | # ///////////////////////////////////////////////////////////////
71 | self.setObjectName("pod_bg_app")
72 |
73 | # APPLY STYLESHEET
74 | # ///////////////////////////////////////////////////////////////
75 | self.set_stylesheet()
76 |
77 | # ADD LAYOUT
78 | # ///////////////////////////////////////////////////////////////
79 | if layout == Qt.Vertical:
80 | # VERTICAL LAYOUT
81 | self.layout = QHBoxLayout(self)
82 | else:
83 | # HORIZONTAL LAYOUT
84 | self.layout = QHBoxLayout(self)
85 | self.layout.setContentsMargins(margin, margin, margin, margin)
86 | self.layout.setSpacing(spacing)
87 |
88 | # ADD DROP SHADOW
89 | # ///////////////////////////////////////////////////////////////
90 | if self.settings["custom_title_bar"]:
91 | if enable_shadow:
92 | self.shadow = QGraphicsDropShadowEffect()
93 | self.shadow.setBlurRadius(20)
94 | self.shadow.setXOffset(0)
95 | self.shadow.setYOffset(0)
96 | self.shadow.setColor(QColor(0, 0, 0, 160))
97 | self.setGraphicsEffect(self.shadow)
98 |
99 | # APPLY AND UPDATE STYLESHEET
100 | # ///////////////////////////////////////////////////////////////
101 | def set_stylesheet(
102 | self,
103 | bg_color = None,
104 | border_radius = None,
105 | border_size = None,
106 | border_color = None,
107 | text_color = None,
108 | text_font = None
109 | ):
110 | # CHECK BG COLOR
111 | if bg_color != None: internal_bg_color = bg_color
112 | else: internal_bg_color = self.bg_color
113 |
114 | # CHECK BORDER RADIUS
115 | if border_radius != None: internal_border_radius = border_radius
116 | else: internal_border_radius = self.border_radius
117 |
118 | # CHECK BORDER SIZE
119 | if border_size != None: internal_border_size = border_size
120 | else: internal_border_size = self.border_size
121 |
122 | # CHECK BORDER COLOR
123 | if text_color != None: internal_text_color = text_color
124 | else: internal_text_color = self.text_color
125 |
126 | # CHECK TEXT COLOR
127 | if border_color != None: internal_border_color = border_color
128 | else: internal_border_color = self.border_color
129 |
130 | # CHECK TEXT COLOR
131 | if text_font != None: internal_text_font = text_font
132 | else: internal_text_font = self.text_font
133 |
134 | self.setStyleSheet(Styles.bg_style.format(
135 | _bg_color = internal_bg_color,
136 | _border_radius = internal_border_radius,
137 | _border_size = internal_border_size,
138 | _border_color = internal_border_color,
139 | _text_color = internal_text_color,
140 | _text_font = internal_text_font
141 | ))
142 |
--------------------------------------------------------------------------------
/gui/uis/windows/main_window/functions_main_window.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT PACKAGES AND MODULES
18 | # ///////////////////////////////////////////////////////////////
19 | import sys
20 |
21 | # IMPORT QT CORE
22 | # ///////////////////////////////////////////////////////////////
23 | from qt_core import *
24 |
25 | # LOAD UI MAIN
26 | # ///////////////////////////////////////////////////////////////
27 | from . ui_main import *
28 |
29 | # FUNCTIONS
30 | class MainFunctions():
31 | def __init__(self):
32 | super().__init__()
33 | # SETUP MAIN WINDOw
34 | # Load widgets from "gui\uis\main_window\ui_main.py"
35 | # ///////////////////////////////////////////////////////////////
36 | self.ui = UI_MainWindow()
37 | self.ui.setup_ui(self)
38 |
39 | # SET MAIN WINDOW PAGES
40 | # ///////////////////////////////////////////////////////////////
41 | def set_page(self, page):
42 | self.ui.load_pages.pages.setCurrentWidget(page)
43 |
44 | # SET LEFT COLUMN PAGES
45 | # ///////////////////////////////////////////////////////////////
46 | def set_left_column_menu(
47 | self,
48 | menu,
49 | title,
50 | icon_path
51 | ):
52 | self.ui.left_column.menus.menus.setCurrentWidget(menu)
53 | self.ui.left_column.title_label.setText(title)
54 | self.ui.left_column.icon.set_icon(icon_path)
55 |
56 | # RETURN IF LEFT COLUMN IS VISIBLE
57 | # ///////////////////////////////////////////////////////////////
58 | def left_column_is_visible(self):
59 | width = self.ui.left_column_frame.width()
60 | if width == 0:
61 | return False
62 | else:
63 | return True
64 |
65 | # RETURN IF RIGHT COLUMN IS VISIBLE
66 | # ///////////////////////////////////////////////////////////////
67 | def right_column_is_visible(self):
68 | width = self.ui.right_column_frame.width()
69 | if width == 0:
70 | return False
71 | else:
72 | return True
73 |
74 | # SET RIGHT COLUMN PAGES
75 | # ///////////////////////////////////////////////////////////////
76 | def set_right_column_menu(self, menu):
77 | self.ui.right_column.menus.setCurrentWidget(menu)
78 |
79 | # GET TITLE BUTTON BY OBJECT NAME
80 | # ///////////////////////////////////////////////////////////////
81 | def get_title_bar_btn(self, object_name):
82 | return self.ui.title_bar_frame.findChild(QPushButton, object_name)
83 |
84 | # GET TITLE BUTTON BY OBJECT NAME
85 | # ///////////////////////////////////////////////////////////////
86 | def get_left_menu_btn(self, object_name):
87 | return self.ui.left_menu.findChild(QPushButton, object_name)
88 |
89 | # LEDT AND RIGHT COLUMNS / SHOW / HIDE
90 | # ///////////////////////////////////////////////////////////////
91 | def toggle_left_column(self):
92 | # GET ACTUAL CLUMNS SIZE
93 | width = self.ui.left_column_frame.width()
94 | right_column_width = self.ui.right_column_frame.width()
95 |
96 | MainFunctions.start_box_animation(self, width, right_column_width, "left")
97 |
98 | def toggle_right_column(self):
99 | # GET ACTUAL CLUMNS SIZE
100 | left_column_width = self.ui.left_column_frame.width()
101 | width = self.ui.right_column_frame.width()
102 |
103 | MainFunctions.start_box_animation(self, left_column_width, width, "right")
104 |
105 | def start_box_animation(self, left_box_width, right_box_width, direction):
106 | right_width = 0
107 | left_width = 0
108 | time_animation = self.ui.settings["time_animation"]
109 | minimum_left = self.ui.settings["left_column_size"]["minimum"]
110 | maximum_left = self.ui.settings["left_column_size"]["maximum"]
111 | minimum_right = self.ui.settings["right_column_size"]["minimum"]
112 | maximum_right = self.ui.settings["right_column_size"]["maximum"]
113 |
114 | # Check Left Values
115 | if left_box_width == minimum_left and direction == "left":
116 | left_width = maximum_left
117 | else:
118 | left_width = minimum_left
119 |
120 | # Check Right values
121 | if right_box_width == minimum_right and direction == "right":
122 | right_width = maximum_right
123 | else:
124 | right_width = minimum_right
125 |
126 | # ANIMATION LEFT BOX
127 | self.left_box = QPropertyAnimation(self.ui.left_column_frame, b"minimumWidth")
128 | self.left_box.setDuration(time_animation)
129 | self.left_box.setStartValue(left_box_width)
130 | self.left_box.setEndValue(left_width)
131 | self.left_box.setEasingCurve(QEasingCurve.InOutQuart)
132 |
133 | # ANIMATION RIGHT BOX
134 | self.right_box = QPropertyAnimation(self.ui.right_column_frame, b"minimumWidth")
135 | self.right_box.setDuration(time_animation)
136 | self.right_box.setStartValue(right_box_width)
137 | self.right_box.setEndValue(right_width)
138 | self.right_box.setEasingCurve(QEasingCurve.InOutQuart)
139 |
140 | # GROUP ANIMATION
141 | self.group = QParallelAnimationGroup()
142 | self.group.stop()
143 | self.group.addAnimation(self.left_box)
144 | self.group.addAnimation(self.right_box)
145 | self.group.start()
--------------------------------------------------------------------------------
/gui/uis/columns/ui_left_column.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 |
22 | class Ui_LeftColumn(object):
23 | def setupUi(self, LeftColumn):
24 | if not LeftColumn.objectName():
25 | LeftColumn.setObjectName(u"LeftColumn")
26 | LeftColumn.resize(240, 600)
27 | self.main_pages_layout = QVBoxLayout(LeftColumn)
28 | self.main_pages_layout.setSpacing(0)
29 | self.main_pages_layout.setObjectName(u"main_pages_layout")
30 | self.main_pages_layout.setContentsMargins(5, 5, 5, 5)
31 | self.menus = QStackedWidget(LeftColumn)
32 | self.menus.setObjectName(u"menus")
33 | self.menu_1 = QWidget()
34 | self.menu_1.setObjectName(u"menu_1")
35 | self.verticalLayout = QVBoxLayout(self.menu_1)
36 | self.verticalLayout.setSpacing(5)
37 | self.verticalLayout.setObjectName(u"verticalLayout")
38 | self.verticalLayout.setContentsMargins(5, 5, 5, 5)
39 | self.btn_1_widget = QWidget(self.menu_1)
40 | self.btn_1_widget.setObjectName(u"btn_1_widget")
41 | self.btn_1_widget.setMinimumSize(QSize(0, 40))
42 | self.btn_1_widget.setMaximumSize(QSize(16777215, 40))
43 | self.btn_1_layout = QVBoxLayout(self.btn_1_widget)
44 | self.btn_1_layout.setSpacing(0)
45 | self.btn_1_layout.setObjectName(u"btn_1_layout")
46 | self.btn_1_layout.setContentsMargins(0, 0, 0, 0)
47 |
48 | self.verticalLayout.addWidget(self.btn_1_widget)
49 |
50 | self.btn_2_widget = QWidget(self.menu_1)
51 | self.btn_2_widget.setObjectName(u"btn_2_widget")
52 | self.btn_2_widget.setMinimumSize(QSize(0, 40))
53 | self.btn_2_widget.setMaximumSize(QSize(16777215, 40))
54 | self.btn_2_layout = QVBoxLayout(self.btn_2_widget)
55 | self.btn_2_layout.setSpacing(0)
56 | self.btn_2_layout.setObjectName(u"btn_2_layout")
57 | self.btn_2_layout.setContentsMargins(0, 0, 0, 0)
58 |
59 | self.verticalLayout.addWidget(self.btn_2_widget)
60 |
61 | self.btn_3_widget = QWidget(self.menu_1)
62 | self.btn_3_widget.setObjectName(u"btn_3_widget")
63 | self.btn_3_widget.setMinimumSize(QSize(0, 40))
64 | self.btn_3_widget.setMaximumSize(QSize(16777215, 40))
65 | self.btn_3_layout = QVBoxLayout(self.btn_3_widget)
66 | self.btn_3_layout.setSpacing(0)
67 | self.btn_3_layout.setObjectName(u"btn_3_layout")
68 | self.btn_3_layout.setContentsMargins(0, 0, 0, 0)
69 |
70 | self.verticalLayout.addWidget(self.btn_3_widget)
71 |
72 | self.label_1 = QLabel(self.menu_1)
73 | self.label_1.setObjectName(u"label_1")
74 | font = QFont()
75 | font.setPointSize(16)
76 | self.label_1.setFont(font)
77 | self.label_1.setStyleSheet(u"font-size: 16pt")
78 | self.label_1.setAlignment(Qt.AlignCenter)
79 |
80 | self.verticalLayout.addWidget(self.label_1)
81 |
82 | self.menus.addWidget(self.menu_1)
83 | self.menu_2 = QWidget()
84 | self.menu_2.setObjectName(u"menu_2")
85 | self.verticalLayout_2 = QVBoxLayout(self.menu_2)
86 | self.verticalLayout_2.setSpacing(5)
87 | self.verticalLayout_2.setObjectName(u"verticalLayout_2")
88 | self.verticalLayout_2.setContentsMargins(5, 5, 5, 5)
89 | self.btn_4_widget = QWidget(self.menu_2)
90 | self.btn_4_widget.setObjectName(u"btn_4_widget")
91 | self.btn_4_widget.setMinimumSize(QSize(0, 40))
92 | self.btn_4_widget.setMaximumSize(QSize(16777215, 40))
93 | self.btn_4_layout = QVBoxLayout(self.btn_4_widget)
94 | self.btn_4_layout.setSpacing(0)
95 | self.btn_4_layout.setObjectName(u"btn_4_layout")
96 | self.btn_4_layout.setContentsMargins(0, 0, 0, 0)
97 |
98 | self.verticalLayout_2.addWidget(self.btn_4_widget)
99 |
100 | self.label_2 = QLabel(self.menu_2)
101 | self.label_2.setObjectName(u"label_2")
102 | self.label_2.setFont(font)
103 | self.label_2.setStyleSheet(u"font-size: 16pt")
104 | self.label_2.setAlignment(Qt.AlignCenter)
105 |
106 | self.verticalLayout_2.addWidget(self.label_2)
107 |
108 | self.label_3 = QLabel(self.menu_2)
109 | self.label_3.setObjectName(u"label_3")
110 | font1 = QFont()
111 | font1.setPointSize(9)
112 | self.label_3.setFont(font1)
113 | self.label_3.setStyleSheet(u"font-size: 9pt")
114 | self.label_3.setAlignment(Qt.AlignCenter)
115 | self.label_3.setWordWrap(True)
116 |
117 | self.verticalLayout_2.addWidget(self.label_3)
118 |
119 | self.menus.addWidget(self.menu_2)
120 |
121 | self.main_pages_layout.addWidget(self.menus)
122 |
123 |
124 | self.retranslateUi(LeftColumn)
125 |
126 | self.menus.setCurrentIndex(0)
127 |
128 |
129 | QMetaObject.connectSlotsByName(LeftColumn)
130 | # setupUi
131 |
132 | def retranslateUi(self, LeftColumn):
133 | LeftColumn.setWindowTitle(QCoreApplication.translate("LeftColumn", u"Form", None))
134 | self.label_1.setText(QCoreApplication.translate("LeftColumn", u"Menu 1 - Left Menu", None))
135 | self.label_2.setText(QCoreApplication.translate("LeftColumn", u"Menu 2 - Left Menu", None))
136 | self.label_3.setText(QCoreApplication.translate("LeftColumn", u"This is just an example menu.\n"
137 | "Add Qt Widgets or your custom widgets here.", None))
138 | # retranslateUi
139 |
140 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_settings.svg:
--------------------------------------------------------------------------------
1 |
2 |
79 |
--------------------------------------------------------------------------------
/gui/images/svg_icons/icon_signal.svg:
--------------------------------------------------------------------------------
1 |
2 |
79 |
--------------------------------------------------------------------------------
/gui/widgets/py_left_column/py_left_column.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 | # IMPORT CLOSE BUTTON
22 | # ///////////////////////////////////////////////////////////////
23 | from . py_left_button import *
24 |
25 | # IMPORT ICON
26 | # ///////////////////////////////////////////////////////////////
27 | from . py_icon import *
28 |
29 | # IMPORT LEFT COLUMN
30 | # ///////////////////////////////////////////////////////////////
31 | from gui.uis.columns.ui_left_column import Ui_LeftColumn
32 |
33 | class PyLeftColumn(QWidget):
34 | # SIGNALS
35 | clicked = Signal(object)
36 | released = Signal(object)
37 |
38 | def __init__(
39 | self,
40 | parent,
41 | app_parent,
42 | text_title,
43 | text_title_size,
44 | text_title_color,
45 | dark_one,
46 | bg_color,
47 | btn_color,
48 | btn_color_hover,
49 | btn_color_pressed,
50 | icon_path,
51 | icon_color,
52 | icon_color_hover,
53 | icon_color_pressed,
54 | context_color,
55 | icon_close_path,
56 | radius = 8
57 | ):
58 | super().__init__()
59 |
60 | # PARAMETERS
61 | self._parent = parent
62 | self._app_parent = app_parent
63 | self._text_title = text_title
64 | self._text_title_size = text_title_size
65 | self._text_title_color = text_title_color
66 | self._icon_path = icon_path
67 | self._dark_one = dark_one
68 | self._bg_color = bg_color
69 | self._btn_color = btn_color
70 | self._btn_color_hover = btn_color_hover
71 | self._btn_color_pressed = btn_color_pressed
72 | self._icon_color = icon_color
73 | self._icon_color_hover = icon_color_hover
74 | self._icon_color_pressed = icon_color_pressed
75 | self._context_color = context_color
76 | self._icon_close_path = icon_close_path
77 | self._radius = radius
78 |
79 | # SETUP UI
80 | self.setup_ui()
81 |
82 | # ADD LEFT COLUMN TO BG FRAME
83 | self.menus = Ui_LeftColumn()
84 | self.menus.setupUi(self.content_frame)
85 |
86 | # CONNECT SIGNALS
87 | self.btn_close.clicked.connect(self.btn_clicked)
88 | self.btn_close.released.connect(self.btn_released)
89 |
90 | # TITLE LEFT COLUMN EMIT SIGNALS
91 | # ///////////////////////////////////////////////////////////////
92 | def btn_clicked(self):
93 | self.clicked.emit(self.btn_close)
94 |
95 | def btn_released(self):
96 | self.released.emit(self.btn_close)
97 |
98 | # WIDGETS
99 | # ///////////////////////////////////////////////////////////////
100 | def setup_ui(self):
101 | # BASE LAYOUT
102 | self.base_layout = QVBoxLayout(self)
103 | self.base_layout.setContentsMargins(0,0,0,0)
104 | self.base_layout.setSpacing(0)
105 |
106 | # TITLE FRAME
107 | # ///////////////////////////////////////////////////////////////
108 | self.title_frame = QFrame()
109 | self.title_frame.setMaximumHeight(47)
110 | self.title_frame.setMinimumHeight(47)
111 |
112 | # TITLE BASE LAYOUT
113 | self.title_base_layout = QVBoxLayout(self.title_frame)
114 | self.title_base_layout.setContentsMargins(5,3,5,3)
115 |
116 | # TITLE BG
117 | self.title_bg_frame = QFrame()
118 | self.title_bg_frame.setObjectName("title_bg_frame")
119 | self.title_bg_frame.setStyleSheet(f'''
120 | #title_bg_frame {{
121 | background-color: {self._bg_color};
122 | border-radius: {self._radius}px;
123 | }}
124 | ''')
125 |
126 | # LAYOUT TITLE BG
127 | self.title_bg_layout = QHBoxLayout(self.title_bg_frame)
128 | self.title_bg_layout.setContentsMargins(5,5,5,5)
129 | self.title_bg_layout.setSpacing(3)
130 |
131 | # ICON
132 | self.icon_frame = QFrame()
133 | self.icon_frame.setFixedSize(30,30)
134 | self.icon_frame.setStyleSheet("background: none;")
135 | self.icon_layout = QVBoxLayout(self.icon_frame)
136 | self.icon_layout.setContentsMargins(0,0,0,0)
137 | self.icon_layout.setSpacing(5)
138 | self.icon = PyIcon(self._icon_path, self._icon_color)
139 | self.icon_layout.addWidget(self.icon, Qt.AlignCenter, Qt.AlignCenter)
140 |
141 | # LABEL
142 | self.title_label = QLabel(self._text_title)
143 | self.title_label.setObjectName("title_label")
144 | self.title_label.setStyleSheet(f'''
145 | #title_label {{
146 | font-size: {self._text_title_size}pt;
147 | color: {self._text_title_color};
148 | padding-bottom: 2px;
149 | background: none;
150 | }}
151 | ''')
152 |
153 | # BTN FRAME
154 | self.btn_frame = QFrame()
155 | self.btn_frame.setFixedSize(30,30)
156 | self.btn_frame.setStyleSheet("background: none;")
157 | # CLOSE BUTTON
158 | self.btn_close = PyLeftButton(
159 | self._parent,
160 | self._app_parent,
161 | tooltip_text = "Hide",
162 | dark_one = self._dark_one,
163 | bg_color = self._btn_color,
164 | bg_color_hover = self._btn_color_hover,
165 | bg_color_pressed = self._btn_color_pressed,
166 | icon_color = self._icon_color,
167 | icon_color_hover = self._icon_color_hover,
168 | icon_color_pressed = self._icon_color_pressed,
169 | icon_color_active = self._icon_color_pressed,
170 | context_color = self._context_color,
171 | text_foreground = self._text_title_color,
172 | icon_path = self._icon_close_path,
173 | radius = 6,
174 | )
175 | self.btn_close.setParent(self.btn_frame)
176 | self.btn_close.setObjectName("btn_close_left_column")
177 |
178 | # ADD TO TITLE LAYOUT
179 | self.title_bg_layout.addWidget(self.icon_frame)
180 | self.title_bg_layout.addWidget(self.title_label)
181 | self.title_bg_layout.addWidget(self.btn_frame)
182 |
183 | # ADD TITLE BG TO LAYOUT
184 | self.title_base_layout.addWidget(self.title_bg_frame)
185 |
186 | # CONTENT FRAME
187 | # ///////////////////////////////////////////////////////////////
188 | self.content_frame = QFrame()
189 | self.content_frame.setStyleSheet("background: none")
190 |
191 | # ADD TO LAYOUT
192 | # ///////////////////////////////////////////////////////////////
193 | self.base_layout.addWidget(self.title_frame)
194 | self.base_layout.addWidget(self.content_frame)
195 |
--------------------------------------------------------------------------------
/gui/uis/pages/ui_main_pages.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT QT CORE
18 | # ///////////////////////////////////////////////////////////////
19 | from qt_core import *
20 |
21 |
22 | class Ui_MainPages(object):
23 | def setupUi(self, MainPages):
24 | if not MainPages.objectName():
25 | MainPages.setObjectName(u"MainPages")
26 | MainPages.resize(860, 600)
27 | self.main_pages_layout = QVBoxLayout(MainPages)
28 | self.main_pages_layout.setSpacing(0)
29 | self.main_pages_layout.setObjectName(u"main_pages_layout")
30 | self.main_pages_layout.setContentsMargins(5, 5, 5, 5)
31 | self.pages = QStackedWidget(MainPages)
32 | self.pages.setObjectName(u"pages")
33 | self.page_1 = QWidget()
34 | self.page_1.setObjectName(u"page_1")
35 | self.page_1.setStyleSheet(u"font-size: 14pt")
36 | self.page_1_layout = QVBoxLayout(self.page_1)
37 | self.page_1_layout.setSpacing(5)
38 | self.page_1_layout.setObjectName(u"page_1_layout")
39 | self.page_1_layout.setContentsMargins(5, 5, 5, 5)
40 | self.welcome_base = QFrame(self.page_1)
41 | self.welcome_base.setObjectName(u"welcome_base")
42 | self.welcome_base.setMinimumSize(QSize(300, 150))
43 | self.welcome_base.setMaximumSize(QSize(300, 150))
44 | self.welcome_base.setFrameShape(QFrame.NoFrame)
45 | self.welcome_base.setFrameShadow(QFrame.Raised)
46 | self.center_page_layout = QVBoxLayout(self.welcome_base)
47 | self.center_page_layout.setSpacing(10)
48 | self.center_page_layout.setObjectName(u"center_page_layout")
49 | self.center_page_layout.setContentsMargins(0, 0, 0, 0)
50 | self.logo = QFrame(self.welcome_base)
51 | self.logo.setObjectName(u"logo")
52 | self.logo.setMinimumSize(QSize(300, 120))
53 | self.logo.setMaximumSize(QSize(300, 120))
54 | self.logo.setFrameShape(QFrame.NoFrame)
55 | self.logo.setFrameShadow(QFrame.Raised)
56 | self.logo_layout = QVBoxLayout(self.logo)
57 | self.logo_layout.setSpacing(0)
58 | self.logo_layout.setObjectName(u"logo_layout")
59 | self.logo_layout.setContentsMargins(0, 0, 0, 0)
60 |
61 | self.center_page_layout.addWidget(self.logo)
62 |
63 | self.label = QLabel(self.welcome_base)
64 | self.label.setObjectName(u"label")
65 | self.label.setAlignment(Qt.AlignCenter)
66 |
67 | self.center_page_layout.addWidget(self.label)
68 |
69 |
70 | self.page_1_layout.addWidget(self.welcome_base, 0, Qt.AlignHCenter)
71 |
72 | self.pages.addWidget(self.page_1)
73 | self.page_2 = QWidget()
74 | self.page_2.setObjectName(u"page_2")
75 | self.page_2_layout = QVBoxLayout(self.page_2)
76 | self.page_2_layout.setSpacing(5)
77 | self.page_2_layout.setObjectName(u"page_2_layout")
78 | self.page_2_layout.setContentsMargins(5, 5, 5, 5)
79 | self.scroll_area = QScrollArea(self.page_2)
80 | self.scroll_area.setObjectName(u"scroll_area")
81 | self.scroll_area.setStyleSheet(u"background: transparent;")
82 | self.scroll_area.setFrameShape(QFrame.NoFrame)
83 | self.scroll_area.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
84 | self.scroll_area.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
85 | self.scroll_area.setWidgetResizable(True)
86 | self.contents = QWidget()
87 | self.contents.setObjectName(u"contents")
88 | self.contents.setGeometry(QRect(0, 0, 840, 580))
89 | self.contents.setStyleSheet(u"background: transparent;")
90 | self.verticalLayout = QVBoxLayout(self.contents)
91 | self.verticalLayout.setSpacing(15)
92 | self.verticalLayout.setObjectName(u"verticalLayout")
93 | self.verticalLayout.setContentsMargins(5, 5, 5, 5)
94 | self.title_label = QLabel(self.contents)
95 | self.title_label.setObjectName(u"title_label")
96 | self.title_label.setMaximumSize(QSize(16777215, 40))
97 | font = QFont()
98 | font.setPointSize(16)
99 | self.title_label.setFont(font)
100 | self.title_label.setStyleSheet(u"font-size: 16pt")
101 | self.title_label.setAlignment(Qt.AlignCenter)
102 |
103 | self.verticalLayout.addWidget(self.title_label)
104 |
105 | self.description_label = QLabel(self.contents)
106 | self.description_label.setObjectName(u"description_label")
107 | self.description_label.setAlignment(Qt.AlignHCenter|Qt.AlignTop)
108 | self.description_label.setWordWrap(True)
109 |
110 | self.verticalLayout.addWidget(self.description_label)
111 |
112 | self.row_1_layout = QHBoxLayout()
113 | self.row_1_layout.setObjectName(u"row_1_layout")
114 |
115 | self.verticalLayout.addLayout(self.row_1_layout)
116 |
117 | self.row_2_layout = QHBoxLayout()
118 | self.row_2_layout.setObjectName(u"row_2_layout")
119 |
120 | self.verticalLayout.addLayout(self.row_2_layout)
121 |
122 | self.row_3_layout = QHBoxLayout()
123 | self.row_3_layout.setObjectName(u"row_3_layout")
124 |
125 | self.verticalLayout.addLayout(self.row_3_layout)
126 |
127 | self.row_4_layout = QVBoxLayout()
128 | self.row_4_layout.setObjectName(u"row_4_layout")
129 |
130 | self.verticalLayout.addLayout(self.row_4_layout)
131 |
132 | self.row_5_layout = QVBoxLayout()
133 | self.row_5_layout.setObjectName(u"row_5_layout")
134 |
135 | self.verticalLayout.addLayout(self.row_5_layout)
136 |
137 | self.scroll_area.setWidget(self.contents)
138 |
139 | self.page_2_layout.addWidget(self.scroll_area)
140 |
141 | self.pages.addWidget(self.page_2)
142 | self.page_3 = QWidget()
143 | self.page_3.setObjectName(u"page_3")
144 | self.page_3.setStyleSheet(u"QFrame {\n"
145 | " font-size: 16pt;\n"
146 | "}")
147 | self.page_3_layout = QVBoxLayout(self.page_3)
148 | self.page_3_layout.setObjectName(u"page_3_layout")
149 | self.empty_page_label = QLabel(self.page_3)
150 | self.empty_page_label.setObjectName(u"empty_page_label")
151 | self.empty_page_label.setFont(font)
152 | self.empty_page_label.setAlignment(Qt.AlignCenter)
153 |
154 | self.page_3_layout.addWidget(self.empty_page_label)
155 |
156 | self.pages.addWidget(self.page_3)
157 |
158 | self.main_pages_layout.addWidget(self.pages)
159 |
160 |
161 | self.retranslateUi(MainPages)
162 |
163 | self.pages.setCurrentIndex(0)
164 |
165 |
166 | QMetaObject.connectSlotsByName(MainPages)
167 | # setupUi
168 |
169 | def retranslateUi(self, MainPages):
170 | MainPages.setWindowTitle(QCoreApplication.translate("MainPages", u"Form", None))
171 | self.label.setText(QCoreApplication.translate("MainPages", u"Welcome To PyOneDark GUI", None))
172 | self.title_label.setText(QCoreApplication.translate("MainPages", u"Custom Widgets Page", None))
173 | self.description_label.setText(QCoreApplication.translate("MainPages", u"Here will be all the custom widgets, they will be added over time on this page.\n"
174 | "I will try to always record a new tutorial when adding a new Widget and updating the project on Patreon before launching on GitHub and GitHub after the public release.", None))
175 | self.empty_page_label.setText(QCoreApplication.translate("MainPages", u"Empty Page", None))
176 | # retranslateUi
177 |
178 |
--------------------------------------------------------------------------------
/gui/uis/columns/left_column.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | LeftColumn
4 |
5 |
6 |
7 | 0
8 | 0
9 | 240
10 | 600
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | 0
19 |
20 |
21 | 5
22 |
23 |
24 | 5
25 |
26 |
27 | 5
28 |
29 |
30 | 5
31 |
32 | -
33 |
34 |
35 | 0
36 |
37 |
38 |
39 |
40 | 5
41 |
42 |
43 | 5
44 |
45 |
46 | 5
47 |
48 |
49 | 5
50 |
51 |
52 | 5
53 |
54 |
-
55 |
56 |
57 |
58 | 0
59 | 40
60 |
61 |
62 |
63 |
64 | 16777215
65 | 40
66 |
67 |
68 |
69 |
70 | 0
71 |
72 |
73 | 0
74 |
75 |
76 | 0
77 |
78 |
79 | 0
80 |
81 |
82 | 0
83 |
84 |
85 |
86 |
87 | -
88 |
89 |
90 |
91 | 0
92 | 40
93 |
94 |
95 |
96 |
97 | 16777215
98 | 40
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | 0
107 |
108 |
109 | 0
110 |
111 |
112 | 0
113 |
114 |
115 | 0
116 |
117 |
118 |
119 |
120 | -
121 |
122 |
123 |
124 | 0
125 | 40
126 |
127 |
128 |
129 |
130 | 16777215
131 | 40
132 |
133 |
134 |
135 |
136 | 0
137 |
138 |
139 | 0
140 |
141 |
142 | 0
143 |
144 |
145 | 0
146 |
147 |
148 | 0
149 |
150 |
151 |
152 |
153 | -
154 |
155 |
156 |
157 | 16
158 |
159 |
160 |
161 | font-size: 16pt
162 |
163 |
164 | Menu 1 - Left Menu
165 |
166 |
167 | Qt::AlignCenter
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 | 5
177 |
178 |
179 | 5
180 |
181 |
182 | 5
183 |
184 |
185 | 5
186 |
187 |
188 | 5
189 |
190 | -
191 |
192 |
193 |
194 | 0
195 | 40
196 |
197 |
198 |
199 |
200 | 16777215
201 | 40
202 |
203 |
204 |
205 |
206 | 0
207 |
208 |
209 | 0
210 |
211 |
212 | 0
213 |
214 |
215 | 0
216 |
217 |
218 | 0
219 |
220 |
221 |
222 |
223 | -
224 |
225 |
226 |
227 | 16
228 |
229 |
230 |
231 | font-size: 16pt
232 |
233 |
234 | Menu 2 - Left Menu
235 |
236 |
237 | Qt::AlignCenter
238 |
239 |
240 |
241 | -
242 |
243 |
244 |
245 | 9
246 |
247 |
248 |
249 | font-size: 9pt
250 |
251 |
252 | This is just an example menu.
253 | Add Qt Widgets or your custom widgets here.
254 |
255 |
256 | Qt::AlignCenter
257 |
258 |
259 | true
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | # ///////////////////////////////////////////////////////////////
2 | #
3 | # BY: WANDERSON M.PIMENTA
4 | # PROJECT MADE WITH: Qt Designer and PySide6
5 | # V: 1.0.0
6 | #
7 | # This project can be used freely for all uses, as long as they maintain the
8 | # respective credits only in the Python scripts, any information in the visual
9 | # interface (GUI) can be modified without any implication.
10 | #
11 | # There are limitations on Qt licenses if you want to use your products
12 | # commercially, I recommend reading them on the official website:
13 | # https://doc.qt.io/qtforpython/licenses.html
14 | #
15 | # ///////////////////////////////////////////////////////////////
16 |
17 | # IMPORT PACKAGES AND MODULES
18 | # ///////////////////////////////////////////////////////////////
19 | from gui.uis.windows.main_window.functions_main_window import *
20 | import sys
21 | import os
22 |
23 | # IMPORT QT CORE
24 | # ///////////////////////////////////////////////////////////////
25 | from qt_core import *
26 |
27 | # IMPORT SETTINGS
28 | # ///////////////////////////////////////////////////////////////
29 | from gui.core.json_settings import Settings
30 |
31 | # IMPORT PY ONE DARK WINDOWS
32 | # ///////////////////////////////////////////////////////////////
33 | # MAIN WINDOW
34 | from gui.uis.windows.main_window import *
35 |
36 | # IMPORT PY ONE DARK WIDGETS
37 | # ///////////////////////////////////////////////////////////////
38 | from gui.widgets import *
39 |
40 | # ADJUST QT FONT DPI FOR HIGHT SCALE AN 4K MONITOR
41 | # ///////////////////////////////////////////////////////////////
42 | os.environ["QT_FONT_DPI"] = "96"
43 | # IF IS 4K MONITOR ENABLE 'os.environ["QT_SCALE_FACTOR"] = "2"'
44 |
45 | # MAIN WINDOW
46 | # ///////////////////////////////////////////////////////////////
47 | class MainWindow(QMainWindow):
48 | def __init__(self):
49 | super().__init__()
50 |
51 | # SETUP MAIN WINDOw
52 | # Load widgets from "gui\uis\main_window\ui_main.py"
53 | # ///////////////////////////////////////////////////////////////
54 | self.ui = UI_MainWindow()
55 | self.ui.setup_ui(self)
56 |
57 | # LOAD SETTINGS
58 | # ///////////////////////////////////////////////////////////////
59 | settings = Settings()
60 | self.settings = settings.items
61 |
62 | # SETUP MAIN WINDOW
63 | # ///////////////////////////////////////////////////////////////
64 | self.hide_grips = True # Show/Hide resize grips
65 | SetupMainWindow.setup_gui(self)
66 |
67 | # SHOW MAIN WINDOW
68 | # ///////////////////////////////////////////////////////////////
69 | self.show()
70 |
71 | # LEFT MENU BTN IS CLICKED
72 | # Run function when btn is clicked
73 | # Check funtion by object name / btn_id
74 | # ///////////////////////////////////////////////////////////////
75 | def btn_clicked(self):
76 | # GET BT CLICKED
77 | btn = SetupMainWindow.setup_btns(self)
78 |
79 | # Remove Selection If Clicked By "btn_close_left_column"
80 | if btn.objectName() != "btn_settings":
81 | self.ui.left_menu.deselect_all_tab()
82 |
83 | # Get Title Bar Btn And Reset Active
84 | top_settings = MainFunctions.get_title_bar_btn(self, "btn_top_settings")
85 | top_settings.set_active(False)
86 |
87 | # LEFT MENU
88 | # ///////////////////////////////////////////////////////////////
89 |
90 | # HOME BTN
91 | if btn.objectName() == "btn_home":
92 | # Select Menu
93 | self.ui.left_menu.select_only_one(btn.objectName())
94 |
95 | # Load Page 1
96 | MainFunctions.set_page(self, self.ui.load_pages.page_1)
97 |
98 | # WIDGETS BTN
99 | if btn.objectName() == "btn_widgets":
100 | # Select Menu
101 | self.ui.left_menu.select_only_one(btn.objectName())
102 |
103 | # Load Page 2
104 | MainFunctions.set_page(self, self.ui.load_pages.page_2)
105 |
106 | # LOAD USER PAGE
107 | if btn.objectName() == "btn_add_user":
108 | # Select Menu
109 | self.ui.left_menu.select_only_one(btn.objectName())
110 |
111 | # Load Page 3
112 | MainFunctions.set_page(self, self.ui.load_pages.page_3)
113 |
114 | # BOTTOM INFORMATION
115 | if btn.objectName() == "btn_info":
116 | # CHECK IF LEFT COLUMN IS VISIBLE
117 | if not MainFunctions.left_column_is_visible(self):
118 | self.ui.left_menu.select_only_one_tab(btn.objectName())
119 |
120 | # Show / Hide
121 | MainFunctions.toggle_left_column(self)
122 | self.ui.left_menu.select_only_one_tab(btn.objectName())
123 | else:
124 | if btn.objectName() == "btn_close_left_column":
125 | self.ui.left_menu.deselect_all_tab()
126 | # Show / Hide
127 | MainFunctions.toggle_left_column(self)
128 |
129 | self.ui.left_menu.select_only_one_tab(btn.objectName())
130 |
131 | # Change Left Column Menu
132 | if btn.objectName() != "btn_close_left_column":
133 | MainFunctions.set_left_column_menu(
134 | self,
135 | menu = self.ui.left_column.menus.menu_2,
136 | title = "Info tab",
137 | icon_path = Functions.set_svg_icon("icon_info.svg")
138 | )
139 |
140 | # SETTINGS LEFT
141 | if btn.objectName() == "btn_settings" or btn.objectName() == "btn_close_left_column":
142 | # CHECK IF LEFT COLUMN IS VISIBLE
143 | if not MainFunctions.left_column_is_visible(self):
144 | # Show / Hide
145 | MainFunctions.toggle_left_column(self)
146 | self.ui.left_menu.select_only_one_tab(btn.objectName())
147 | else:
148 | if btn.objectName() == "btn_close_left_column":
149 | self.ui.left_menu.deselect_all_tab()
150 | # Show / Hide
151 | MainFunctions.toggle_left_column(self)
152 | self.ui.left_menu.select_only_one_tab(btn.objectName())
153 |
154 | # Change Left Column Menu
155 | if btn.objectName() != "btn_close_left_column":
156 | MainFunctions.set_left_column_menu(
157 | self,
158 | menu = self.ui.left_column.menus.menu_1,
159 | title = "Settings Left Column",
160 | icon_path = Functions.set_svg_icon("icon_settings.svg")
161 | )
162 |
163 | # TITLE BAR MENU
164 | # ///////////////////////////////////////////////////////////////
165 |
166 | # SETTINGS TITLE BAR
167 | if btn.objectName() == "btn_top_settings":
168 | # Toogle Active
169 | if not MainFunctions.right_column_is_visible(self):
170 | btn.set_active(True)
171 |
172 | # Show / Hide
173 | MainFunctions.toggle_right_column(self)
174 | else:
175 | btn.set_active(False)
176 |
177 | # Show / Hide
178 | MainFunctions.toggle_right_column(self)
179 |
180 | # Get Left Menu Btn
181 | top_settings = MainFunctions.get_left_menu_btn(self, "btn_settings")
182 | top_settings.set_active_tab(False)
183 |
184 | # DEBUG
185 | print(f"Button {btn.objectName()}, clicked!")
186 |
187 | # LEFT MENU BTN IS RELEASED
188 | # Run function when btn is released
189 | # Check funtion by object name / btn_id
190 | # ///////////////////////////////////////////////////////////////
191 | def btn_released(self):
192 | # GET BT CLICKED
193 | btn = SetupMainWindow.setup_btns(self)
194 |
195 | # DEBUG
196 | print(f"Button {btn.objectName()}, released!")
197 |
198 | # RESIZE EVENT
199 | # ///////////////////////////////////////////////////////////////
200 | def resizeEvent(self, event):
201 | SetupMainWindow.resize_grips(self)
202 |
203 | # MOUSE CLICK EVENTS
204 | # ///////////////////////////////////////////////////////////////
205 | def mousePressEvent(self, event):
206 | # SET DRAG POS WINDOW
207 | self.dragPos = event.globalPos()
208 |
209 |
210 | # SETTINGS WHEN TO START
211 | # Set the initial class and also additional parameters of the "QApplication" class
212 | # ///////////////////////////////////////////////////////////////
213 | if __name__ == "__main__":
214 | # APPLICATION
215 | # ///////////////////////////////////////////////////////////////
216 | app = QApplication(sys.argv)
217 | app.setWindowIcon(QIcon("icon.ico"))
218 | window = MainWindow()
219 |
220 | # EXEC APP
221 | # ///////////////////////////////////////////////////////////////
222 | sys.exit(app.exec_())
--------------------------------------------------------------------------------