diff --git a/.qt_for_python/uic/left_column.py b/.qt_for_python/uic/left_column.py new file mode 100644 index 0000000..3abd8e1 --- /dev/null +++ b/.qt_for_python/uic/left_column.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'left_column.ui' +## +## Created by: Qt User Interface Compiler version 6.0.2 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * + + +class Ui_LeftColumn(object): + def setupUi(self, LeftColumn): + if not LeftColumn.objectName(): + LeftColumn.setObjectName(u"LeftColumn") + LeftColumn.resize(240, 600) + self.main_pages_layout = QVBoxLayout(LeftColumn) + self.main_pages_layout.setSpacing(0) + self.main_pages_layout.setObjectName(u"main_pages_layout") + self.main_pages_layout.setContentsMargins(5, 5, 5, 5) + self.pages = QStackedWidget(LeftColumn) + self.pages.setObjectName(u"pages") + self.menu_1 = QWidget() + self.menu_1.setObjectName(u"menu_1") + self.menu_1.setStyleSheet(u"background: lightgreen; font-size: 16pt") + self.verticalLayout = QVBoxLayout(self.menu_1) + self.verticalLayout.setObjectName(u"verticalLayout") + self.label_1 = QLabel(self.menu_1) + self.label_1.setObjectName(u"label_1") + font = QFont() + font.setPointSize(16) + self.label_1.setFont(font) + self.label_1.setAlignment(Qt.AlignCenter) + + self.verticalLayout.addWidget(self.label_1) + + self.pages.addWidget(self.menu_1) + self.menu_2 = QWidget() + self.menu_2.setObjectName(u"menu_2") + self.menu_2.setStyleSheet(u"background: lightblue; font-size: 16pt") + self.verticalLayout_2 = QVBoxLayout(self.menu_2) + self.verticalLayout_2.setObjectName(u"verticalLayout_2") + self.label_2 = QLabel(self.menu_2) + self.label_2.setObjectName(u"label_2") + self.label_2.setFont(font) + self.label_2.setAlignment(Qt.AlignCenter) + + self.verticalLayout_2.addWidget(self.label_2) + + self.pages.addWidget(self.menu_2) + + self.main_pages_layout.addWidget(self.pages) + + + self.retranslateUi(LeftColumn) + + self.pages.setCurrentIndex(1) + + + QMetaObject.connectSlotsByName(LeftColumn) + # setupUi + + def retranslateUi(self, LeftColumn): + LeftColumn.setWindowTitle(QCoreApplication.translate("LeftColumn", u"Form", None)) + self.label_1.setText(QCoreApplication.translate("LeftColumn", u"Page 1", None)) + self.label_2.setText(QCoreApplication.translate("LeftColumn", u"Page 2", None)) + # retranslateUi + diff --git a/.qt_for_python/uic/right_column.py b/.qt_for_python/uic/right_column.py new file mode 100644 index 0000000..54dbc2f --- /dev/null +++ b/.qt_for_python/uic/right_column.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'right_column.ui' +## +## Created by: Qt User Interface Compiler version 6.0.2 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * + + +class Ui_RightColumn(object): + def setupUi(self, RightColumn): + if not RightColumn.objectName(): + RightColumn.setObjectName(u"RightColumn") + RightColumn.resize(240, 600) + self.main_pages_layout = QVBoxLayout(RightColumn) + self.main_pages_layout.setSpacing(0) + self.main_pages_layout.setObjectName(u"main_pages_layout") + self.main_pages_layout.setContentsMargins(5, 5, 5, 5) + self.pages = QStackedWidget(RightColumn) + self.pages.setObjectName(u"pages") + self.menu_1 = QWidget() + self.menu_1.setObjectName(u"menu_1") + self.menu_1.setStyleSheet(u"background: lightgreen; font-size: 16pt") + self.verticalLayout = QVBoxLayout(self.menu_1) + self.verticalLayout.setObjectName(u"verticalLayout") + self.label_1 = QLabel(self.menu_1) + self.label_1.setObjectName(u"label_1") + font = QFont() + font.setPointSize(16) + self.label_1.setFont(font) + self.label_1.setAlignment(Qt.AlignCenter) + + self.verticalLayout.addWidget(self.label_1) + + self.pages.addWidget(self.menu_1) + self.menu_2 = QWidget() + self.menu_2.setObjectName(u"menu_2") + self.menu_2.setStyleSheet(u"background: lightblue; font-size: 16pt") + self.verticalLayout_2 = QVBoxLayout(self.menu_2) + self.verticalLayout_2.setObjectName(u"verticalLayout_2") + self.label_2 = QLabel(self.menu_2) + self.label_2.setObjectName(u"label_2") + self.label_2.setFont(font) + self.label_2.setAlignment(Qt.AlignCenter) + + self.verticalLayout_2.addWidget(self.label_2) + + self.pages.addWidget(self.menu_2) + + self.main_pages_layout.addWidget(self.pages) + + + self.retranslateUi(RightColumn) + + self.pages.setCurrentIndex(1) + + + QMetaObject.connectSlotsByName(RightColumn) + # setupUi + + def retranslateUi(self, RightColumn): + RightColumn.setWindowTitle(QCoreApplication.translate("RightColumn", u"Form", None)) + self.label_1.setText(QCoreApplication.translate("RightColumn", u"Page 1", None)) + self.label_2.setText(QCoreApplication.translate("RightColumn", u"Page 2", None)) + # retranslateUi + diff --git a/gui/uis/columns/left_column.ui b/gui/uis/columns/left_column.ui new file mode 100644 index 0000000..63bf588 --- /dev/null +++ b/gui/uis/columns/left_column.ui @@ -0,0 +1,87 @@ + + + LeftColumn + + + + 0 + 0 + 240 + 600 + + + + Form + + + + 0 + + + 5 + + + 5 + + + 5 + + + 5 + + + + + 1 + + + + background: lightgreen; font-size: 16pt + + + + + + + 16 + + + + Page 1 + + + Qt::AlignCenter + + + + + + + + background: lightblue; font-size: 16pt + + + + + + + 16 + + + + Page 2 + + + Qt::AlignCenter + + + + + + + + + + + + diff --git a/gui/uis/columns/right_column.ui b/gui/uis/columns/right_column.ui new file mode 100644 index 0000000..7bc15e2 --- /dev/null +++ b/gui/uis/columns/right_column.ui @@ -0,0 +1,87 @@ + + + RightColumn + + + + 0 + 0 + 240 + 600 + + + + Form + + + + 0 + + + 5 + + + 5 + + + 5 + + + 5 + + + + + 1 + + + + background: lightgreen; font-size: 16pt + + + + + + + 16 + + + + Page 1 + + + Qt::AlignCenter + + + + + + + + background: lightblue; font-size: 16pt + + + + + + + 16 + + + + Page 2 + + + Qt::AlignCenter + + + + + + + + + + + + diff --git a/gui/uis/columns/ui_left_column.py b/gui/uis/columns/ui_left_column.py new file mode 100644 index 0000000..07a9511 --- /dev/null +++ b/gui/uis/columns/ui_left_column.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'left_columnoRCxDO.ui' +## +## Created by: Qt User Interface Compiler version 6.0.2 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * + + +class Ui_LeftColumn(object): + def setupUi(self, LeftColumn): + if not LeftColumn.objectName(): + LeftColumn.setObjectName(u"LeftColumn") + LeftColumn.resize(240, 600) + self.main_pages_layout = QVBoxLayout(LeftColumn) + self.main_pages_layout.setSpacing(0) + self.main_pages_layout.setObjectName(u"main_pages_layout") + self.main_pages_layout.setContentsMargins(5, 5, 5, 5) + self.pages = QStackedWidget(LeftColumn) + self.pages.setObjectName(u"pages") + self.menu_1 = QWidget() + self.menu_1.setObjectName(u"menu_1") + self.menu_1.setStyleSheet(u"background: lightgreen; font-size: 16pt") + self.verticalLayout = QVBoxLayout(self.menu_1) + self.verticalLayout.setObjectName(u"verticalLayout") + self.label_1 = QLabel(self.menu_1) + self.label_1.setObjectName(u"label_1") + font = QFont() + font.setPointSize(16) + self.label_1.setFont(font) + self.label_1.setAlignment(Qt.AlignCenter) + + self.verticalLayout.addWidget(self.label_1) + + self.pages.addWidget(self.menu_1) + self.menu_2 = QWidget() + self.menu_2.setObjectName(u"menu_2") + self.menu_2.setStyleSheet(u"background: lightblue; font-size: 16pt") + self.verticalLayout_2 = QVBoxLayout(self.menu_2) + self.verticalLayout_2.setObjectName(u"verticalLayout_2") + self.label_2 = QLabel(self.menu_2) + self.label_2.setObjectName(u"label_2") + self.label_2.setFont(font) + self.label_2.setAlignment(Qt.AlignCenter) + + self.verticalLayout_2.addWidget(self.label_2) + + self.pages.addWidget(self.menu_2) + + self.main_pages_layout.addWidget(self.pages) + + + self.retranslateUi(LeftColumn) + + self.pages.setCurrentIndex(1) + + + QMetaObject.connectSlotsByName(LeftColumn) + # setupUi + + def retranslateUi(self, LeftColumn): + LeftColumn.setWindowTitle(QCoreApplication.translate("LeftColumn", u"Form", None)) + self.label_1.setText(QCoreApplication.translate("LeftColumn", u"Page 1", None)) + self.label_2.setText(QCoreApplication.translate("LeftColumn", u"Page 2", None)) + # retranslateUi + diff --git a/gui/uis/columns/ui_right_column.py b/gui/uis/columns/ui_right_column.py new file mode 100644 index 0000000..4ef4f91 --- /dev/null +++ b/gui/uis/columns/ui_right_column.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'right_columnNzhEBW.ui' +## +## Created by: Qt User Interface Compiler version 6.0.2 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * + + +class Ui_RightColumn(object): + def setupUi(self, RightColumn): + if not RightColumn.objectName(): + RightColumn.setObjectName(u"RightColumn") + RightColumn.resize(240, 600) + self.main_pages_layout = QVBoxLayout(RightColumn) + self.main_pages_layout.setSpacing(0) + self.main_pages_layout.setObjectName(u"main_pages_layout") + self.main_pages_layout.setContentsMargins(5, 5, 5, 5) + self.pages = QStackedWidget(RightColumn) + self.pages.setObjectName(u"pages") + self.menu_1 = QWidget() + self.menu_1.setObjectName(u"menu_1") + self.menu_1.setStyleSheet(u"background: lightgreen; font-size: 16pt") + self.verticalLayout = QVBoxLayout(self.menu_1) + self.verticalLayout.setObjectName(u"verticalLayout") + self.label_1 = QLabel(self.menu_1) + self.label_1.setObjectName(u"label_1") + font = QFont() + font.setPointSize(16) + self.label_1.setFont(font) + self.label_1.setAlignment(Qt.AlignCenter) + + self.verticalLayout.addWidget(self.label_1) + + self.pages.addWidget(self.menu_1) + self.menu_2 = QWidget() + self.menu_2.setObjectName(u"menu_2") + self.menu_2.setStyleSheet(u"background: lightblue; font-size: 16pt") + self.verticalLayout_2 = QVBoxLayout(self.menu_2) + self.verticalLayout_2.setObjectName(u"verticalLayout_2") + self.label_2 = QLabel(self.menu_2) + self.label_2.setObjectName(u"label_2") + self.label_2.setFont(font) + self.label_2.setAlignment(Qt.AlignCenter) + + self.verticalLayout_2.addWidget(self.label_2) + + self.pages.addWidget(self.menu_2) + + self.main_pages_layout.addWidget(self.pages) + + + self.retranslateUi(RightColumn) + + self.pages.setCurrentIndex(1) + + + QMetaObject.connectSlotsByName(RightColumn) + # setupUi + + def retranslateUi(self, RightColumn): + RightColumn.setWindowTitle(QCoreApplication.translate("RightColumn", u"Form", None)) + self.label_1.setText(QCoreApplication.translate("RightColumn", u"Page 1", None)) + self.label_2.setText(QCoreApplication.translate("RightColumn", u"Page 2", None)) + # retranslateUi + diff --git a/gui/uis/windows/main_window/ui_main.py b/gui/uis/windows/main_window/ui_main.py index 0b43ad9..f768b0e 100644 --- a/gui/uis/windows/main_window/ui_main.py +++ b/gui/uis/windows/main_window/ui_main.py @@ -141,6 +141,18 @@ class UI_MainWindow(object): self.left_column_frame.setMinimumSize(left_column_minimum, 0) self.left_column_frame.setStyleSheet(f"background: {self.themes['app_color']['bg_two']}") + # ADD LAYOUT TO LEFT COLUMN + self.left_column_layout = QVBoxLayout(self.left_column_frame) + self.left_column_layout.setContentsMargins(0,0,0,0) + + # ADD CUSTOM LEFT MENU WIDGET + self.left_column = PyLeftColumn( + text_title = "Custom Column", + icon = "teste", + bg_color = self.themes['app_color']['context_color'] + ) + self.left_column_layout.addWidget(self.left_column) + # ADD RIGHT WIDGETS # Add here the right widgets # /////////////////////////////////////////////////////////////// diff --git a/gui/widgets/__init__.py b/gui/widgets/__init__.py index b702eed..087aed5 100644 --- a/gui/widgets/__init__.py +++ b/gui/widgets/__init__.py @@ -30,6 +30,10 @@ from . py_grips import PyGrips # /////////////////////////////////////////////////////////////// from . py_left_menu import PyLeftMenu +# PY LEFT COLUMN +# /////////////////////////////////////////////////////////////// +from . py_left_column import PyLeftColumn + # PY TITLE BAR # /////////////////////////////////////////////////////////////// from . py_title_bar import PyTitleBar diff --git a/gui/widgets/py_credits_bar/py_credits.py b/gui/widgets/py_credits_bar/py_credits.py index 8a8b966..8593e7f 100644 --- a/gui/widgets/py_credits_bar/py_credits.py +++ b/gui/widgets/py_credits_bar/py_credits.py @@ -32,7 +32,7 @@ class PyCredits(QWidget): radius = 8, padding = 10 ): - super(PyCredits, self).__init__() + super().__init__() # PROPERTIES self._copyright = copyright diff --git a/gui/widgets/py_grips/py_grips.py b/gui/widgets/py_grips/py_grips.py index fbb465b..7e6d7c2 100644 --- a/gui/widgets/py_grips/py_grips.py +++ b/gui/widgets/py_grips/py_grips.py @@ -29,7 +29,7 @@ class PyGrips(QWidget): # SETUP UI # /////////////////////////////////////////////////////////////// - QWidget.__init__(self) + super().__init__() self.parent = parent self.setParent(parent) self.wi = Widgets() diff --git a/gui/widgets/py_left_column/__init__.py b/gui/widgets/py_left_column/__init__.py new file mode 100644 index 0000000..d2015d4 --- /dev/null +++ b/gui/widgets/py_left_column/__init__.py @@ -0,0 +1,20 @@ +# /////////////////////////////////////////////////////////////// +# +# BY: WANDERSON M.PIMENTA +# PROJECT MADE WITH: Qt Designer and PySide6 +# V: 1.0.0 +# +# This project can be used freely for all uses, as long as they maintain the +# respective credits only in the Python scripts, any information in the visual +# interface (GUI) can be modified without any implication. +# +# There are limitations on Qt licenses if you want to use your products +# commercially, I recommend reading them on the official website: +# https://doc.qt.io/qtforpython/licenses.html +# +# /////////////////////////////////////////////////////////////// + +# PY LEFT COLUMN +# Left column with custom widgets +# /////////////////////////////////////////////////////////////// +from . py_left_column import PyLeftColumn \ No newline at end of file diff --git a/gui/widgets/py_left_column/py_left_column.py b/gui/widgets/py_left_column/py_left_column.py new file mode 100644 index 0000000..d9cd02a --- /dev/null +++ b/gui/widgets/py_left_column/py_left_column.py @@ -0,0 +1,78 @@ +# /////////////////////////////////////////////////////////////// +# +# BY: WANDERSON M.PIMENTA +# PROJECT MADE WITH: Qt Designer and PySide6 +# V: 1.0.0 +# +# This project can be used freely for all uses, as long as they maintain the +# respective credits only in the Python scripts, any information in the visual +# interface (GUI) can be modified without any implication. +# +# There are limitations on Qt licenses if you want to use your products +# commercially, I recommend reading them on the official website: +# https://doc.qt.io/qtforpython/licenses.html +# +# /////////////////////////////////////////////////////////////// + +# IMPORT QT CORE +# /////////////////////////////////////////////////////////////// +from qt_core import * + +class PyLeftColumn(QWidget): + def __init__( + self, + text_title, + icon, + bg_color + ): + super().__init__() + + # PARAMETERS + self._text_title = text_title + self._icon = icon + self._bg_color = bg_color + + # SETUP UI + self.setup_ui() + + # ADD LEFT COLUMN TO BG FRAME + + + def setup_ui(self): + # BASE LAYOUT + self.base_layout = QVBoxLayout(self) + self.base_layout.setContentsMargins(0,0,0,0) + self.base_layout.setSpacing(8) + + # TITLE FRAME + # /////////////////////////////////////////////////////////////// + self.title_frame = QFrame() + self.title_frame.setMaximumHeight(48) + self.title_frame.setMinimumHeight(48) + + # TITLE BASE LAYOUT + self.title_base_layout = QVBoxLayout(self.title_frame) + self.title_base_layout.setContentsMargins(5,3,5,3) + + # TITLE BG + self.title_bg_frame = QFrame() + self.title_bg_frame.setObjectName("title_bg_frame") + self.title_bg_frame.setStyleSheet(f''' + #title_bg_frame {{ + background: {self._bg_color}; + border-radius: 8px; + }} + ''') + + # ADD TITLE BG TO LAYOUT + self.title_base_layout.addWidget(self.title_bg_frame) + + # CONTENT FRAME + # /////////////////////////////////////////////////////////////// + self.content_frame = QFrame() + self.content_frame.setStyleSheet("background: transparent") + + # ADD TO LAYOUT + # /////////////////////////////////////////////////////////////// + self.base_layout.addWidget(self.title_frame) + self.base_layout.addWidget(self.content_frame) diff --git a/gui/widgets/py_left_menu/py_div.py b/gui/widgets/py_left_menu/py_div.py index 4976760..71c686a 100644 --- a/gui/widgets/py_left_menu/py_div.py +++ b/gui/widgets/py_left_menu/py_div.py @@ -22,7 +22,7 @@ from qt_core import * # /////////////////////////////////////////////////////////////// class PyDiv(QWidget): def __init__(self, color): - super(PyDiv, self).__init__() + super().__init__() self.layout = QHBoxLayout(self) self.layout.setContentsMargins(5,0,5,0) diff --git a/gui/widgets/py_left_menu/py_left_menu.py b/gui/widgets/py_left_menu/py_left_menu.py index 9f49b64..bbce9dd 100644 --- a/gui/widgets/py_left_menu/py_left_menu.py +++ b/gui/widgets/py_left_menu/py_left_menu.py @@ -58,7 +58,7 @@ class PyLeftMenu(QWidget): toggle_text = "Hide Menu", toggle_tooltip = "Show menu" ): - super(PyLeftMenu, self).__init__() + super().__init__() # PROPERTIES # /////////////////////////////////////////////////////////////// diff --git a/gui/widgets/py_left_menu/py_left_menu_button.py b/gui/widgets/py_left_menu/py_left_menu_button.py index f08b34c..3651aff 100644 --- a/gui/widgets/py_left_menu/py_left_menu_button.py +++ b/gui/widgets/py_left_menu/py_left_menu_button.py @@ -52,7 +52,7 @@ class PyLeftMenuButton(QPushButton): is_active = False, is_toggle_active = False ): - super(PyLeftMenuButton, self).__init__() + super().__init__() self.setText(text) self.setCursor(Qt.PointingHandCursor) self.setMaximumHeight(50) diff --git a/gui/widgets/py_title_bar/py_div.py b/gui/widgets/py_title_bar/py_div.py index c450a9b..86b5762 100644 --- a/gui/widgets/py_title_bar/py_div.py +++ b/gui/widgets/py_title_bar/py_div.py @@ -22,7 +22,7 @@ from qt_core import * # /////////////////////////////////////////////////////////////// class PyDiv(QWidget): def __init__(self, color): - super(PyDiv, self).__init__() + super().__init__() self.layout = QHBoxLayout(self) self.layout.setContentsMargins(0,5,0,5) diff --git a/gui/widgets/py_title_bar/py_title_bar.py b/gui/widgets/py_title_bar/py_title_bar.py index 53ec5c0..c2f0c9b 100644 --- a/gui/widgets/py_title_bar/py_title_bar.py +++ b/gui/widgets/py_title_bar/py_title_bar.py @@ -72,7 +72,7 @@ class PyTitleBar(QWidget): title_size = 10, is_custom_title_bar = True, ): - super(PyTitleBar, self).__init__() + super().__init__() settings = Settings() self.settings = settings.items diff --git a/gui/widgets/py_title_bar/py_title_button.py b/gui/widgets/py_title_bar/py_title_button.py index 76ca722..dcc949f 100644 --- a/gui/widgets/py_title_bar/py_title_button.py +++ b/gui/widgets/py_title_bar/py_title_button.py @@ -43,7 +43,7 @@ class PyTitleButton(QPushButton): text_foreground = "#8a95aa", is_active = False ): - super(PyTitleButton, self).__init__() + super().__init__() # SET DEFAULT PARAMETERS self.setFixedSize(width, height) diff --git a/gui/widgets/py_window/py_window.py b/gui/widgets/py_window/py_window.py index 8d0ab17..9376175 100644 --- a/gui/widgets/py_window/py_window.py +++ b/gui/widgets/py_window/py_window.py @@ -46,7 +46,7 @@ class PyWindow(QFrame): border_color = "#343b48", enable_shadow = True ): - super(PyWindow, self).__init__() + super().__init__() # LOAD SETTINGS # ///////////////////////////////////////////////////////////////