mirror of
https://github.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI.git
synced 2026-02-17 07:53:57 +00:00
28/05/2021
This commit is contained in:
72
.qt_for_python/uic/left_column.py
Normal file
72
.qt_for_python/uic/left_column.py
Normal file
@@ -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
|
||||
|
||||
72
.qt_for_python/uic/right_column.py
Normal file
72
.qt_for_python/uic/right_column.py
Normal file
@@ -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
|
||||
|
||||
87
gui/uis/columns/left_column.ui
Normal file
87
gui/uis/columns/left_column.ui
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>LeftColumn</class>
|
||||
<widget class="QWidget" name="LeftColumn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>240</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="main_pages_layout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="pages">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="menu_1">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: lightgreen; font-size: 16pt</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Page 1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="menu_2">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: lightblue; font-size: 16pt</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Page 2</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
87
gui/uis/columns/right_column.ui
Normal file
87
gui/uis/columns/right_column.ui
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>RightColumn</class>
|
||||
<widget class="QWidget" name="RightColumn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>240</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="main_pages_layout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="pages">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="menu_1">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: lightgreen; font-size: 16pt</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Page 1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="menu_2">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: lightblue; font-size: 16pt</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Page 2</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
72
gui/uis/columns/ui_left_column.py
Normal file
72
gui/uis/columns/ui_left_column.py
Normal file
@@ -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
|
||||
|
||||
72
gui/uis/columns/ui_right_column.py
Normal file
72
gui/uis/columns/ui_right_column.py
Normal file
@@ -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
|
||||
|
||||
@@ -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
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -32,7 +32,7 @@ class PyCredits(QWidget):
|
||||
radius = 8,
|
||||
padding = 10
|
||||
):
|
||||
super(PyCredits, self).__init__()
|
||||
super().__init__()
|
||||
|
||||
# PROPERTIES
|
||||
self._copyright = copyright
|
||||
|
||||
@@ -29,7 +29,7 @@ class PyGrips(QWidget):
|
||||
|
||||
# SETUP UI
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
QWidget.__init__(self)
|
||||
super().__init__()
|
||||
self.parent = parent
|
||||
self.setParent(parent)
|
||||
self.wi = Widgets()
|
||||
|
||||
20
gui/widgets/py_left_column/__init__.py
Normal file
20
gui/widgets/py_left_column/__init__.py
Normal file
@@ -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
|
||||
78
gui/widgets/py_left_column/py_left_column.py
Normal file
78
gui/widgets/py_left_column/py_left_column.py
Normal file
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
@@ -58,7 +58,7 @@ class PyLeftMenu(QWidget):
|
||||
toggle_text = "Hide Menu",
|
||||
toggle_tooltip = "Show menu"
|
||||
):
|
||||
super(PyLeftMenu, self).__init__()
|
||||
super().__init__()
|
||||
|
||||
# PROPERTIES
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -46,7 +46,7 @@ class PyWindow(QFrame):
|
||||
border_color = "#343b48",
|
||||
enable_shadow = True
|
||||
):
|
||||
super(PyWindow, self).__init__()
|
||||
super().__init__()
|
||||
|
||||
# LOAD SETTINGS
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user