mirror of
https://github.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI.git
synced 2026-02-17 07:53:57 +00:00
09/06/2021
This commit is contained in:
133
.qt_for_python/uic/left_column.py
Normal file
133
.qt_for_python/uic/left_column.py
Normal file
@@ -0,0 +1,133 @@
|
||||
# -*- 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.menus = QStackedWidget(LeftColumn)
|
||||
self.menus.setObjectName(u"menus")
|
||||
self.menu_1 = QWidget()
|
||||
self.menu_1.setObjectName(u"menu_1")
|
||||
self.verticalLayout = QVBoxLayout(self.menu_1)
|
||||
self.verticalLayout.setSpacing(5)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.verticalLayout.setContentsMargins(5, 5, 5, 5)
|
||||
self.btn_1_widget = QWidget(self.menu_1)
|
||||
self.btn_1_widget.setObjectName(u"btn_1_widget")
|
||||
self.btn_1_widget.setMinimumSize(QSize(0, 40))
|
||||
self.btn_1_widget.setMaximumSize(QSize(16777215, 40))
|
||||
self.btn_1_layout = QVBoxLayout(self.btn_1_widget)
|
||||
self.btn_1_layout.setSpacing(0)
|
||||
self.btn_1_layout.setObjectName(u"btn_1_layout")
|
||||
self.btn_1_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.verticalLayout.addWidget(self.btn_1_widget)
|
||||
|
||||
self.btn_2_widget = QWidget(self.menu_1)
|
||||
self.btn_2_widget.setObjectName(u"btn_2_widget")
|
||||
self.btn_2_widget.setMinimumSize(QSize(0, 40))
|
||||
self.btn_2_widget.setMaximumSize(QSize(16777215, 40))
|
||||
self.btn_2_layout = QVBoxLayout(self.btn_2_widget)
|
||||
self.btn_2_layout.setSpacing(0)
|
||||
self.btn_2_layout.setObjectName(u"btn_2_layout")
|
||||
self.btn_2_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.verticalLayout.addWidget(self.btn_2_widget)
|
||||
|
||||
self.btn_3_widget = QWidget(self.menu_1)
|
||||
self.btn_3_widget.setObjectName(u"btn_3_widget")
|
||||
self.btn_3_widget.setMinimumSize(QSize(0, 40))
|
||||
self.btn_3_widget.setMaximumSize(QSize(16777215, 40))
|
||||
self.btn_3_layout = QVBoxLayout(self.btn_3_widget)
|
||||
self.btn_3_layout.setSpacing(0)
|
||||
self.btn_3_layout.setObjectName(u"btn_3_layout")
|
||||
self.btn_3_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.verticalLayout.addWidget(self.btn_3_widget)
|
||||
|
||||
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.setStyleSheet(u"font-size: 16pt")
|
||||
self.label_1.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout.addWidget(self.label_1)
|
||||
|
||||
self.menus.addWidget(self.menu_1)
|
||||
self.menu_2 = QWidget()
|
||||
self.menu_2.setObjectName(u"menu_2")
|
||||
self.verticalLayout_2 = QVBoxLayout(self.menu_2)
|
||||
self.verticalLayout_2.setSpacing(5)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.verticalLayout_2.setContentsMargins(5, 5, 5, 5)
|
||||
self.btn_4_widget = QWidget(self.menu_2)
|
||||
self.btn_4_widget.setObjectName(u"btn_4_widget")
|
||||
self.btn_4_widget.setMinimumSize(QSize(0, 40))
|
||||
self.btn_4_widget.setMaximumSize(QSize(16777215, 40))
|
||||
self.btn_4_layout = QVBoxLayout(self.btn_4_widget)
|
||||
self.btn_4_layout.setSpacing(0)
|
||||
self.btn_4_layout.setObjectName(u"btn_4_layout")
|
||||
self.btn_4_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.btn_4_widget)
|
||||
|
||||
self.label_2 = QLabel(self.menu_2)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setStyleSheet(u"font-size: 16pt")
|
||||
self.label_2.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.label_2)
|
||||
|
||||
self.label_3 = QLabel(self.menu_2)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
font1 = QFont()
|
||||
font1.setPointSize(9)
|
||||
self.label_3.setFont(font1)
|
||||
self.label_3.setStyleSheet(u"font-size: 9pt")
|
||||
self.label_3.setAlignment(Qt.AlignCenter)
|
||||
self.label_3.setWordWrap(True)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.label_3)
|
||||
|
||||
self.menus.addWidget(self.menu_2)
|
||||
|
||||
self.main_pages_layout.addWidget(self.menus)
|
||||
|
||||
|
||||
self.retranslateUi(LeftColumn)
|
||||
|
||||
self.menus.setCurrentIndex(0)
|
||||
|
||||
|
||||
QMetaObject.connectSlotsByName(LeftColumn)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, LeftColumn):
|
||||
LeftColumn.setWindowTitle(QCoreApplication.translate("LeftColumn", u"Form", None))
|
||||
self.label_1.setText(QCoreApplication.translate("LeftColumn", u"Menu 1 - Left Menu", None))
|
||||
self.label_2.setText(QCoreApplication.translate("LeftColumn", u"Menu 2 - Left Menu", None))
|
||||
self.label_3.setText(QCoreApplication.translate("LeftColumn", u"This is just an example menu.\n"
|
||||
"Add Qt Widgets or your custom widgets here.", None))
|
||||
# retranslateUi
|
||||
|
||||
163
.qt_for_python/uic/main_pages.py
Normal file
163
.qt_for_python/uic/main_pages.py
Normal file
@@ -0,0 +1,163 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'main_pages.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_MainPages(object):
|
||||
def setupUi(self, MainPages):
|
||||
if not MainPages.objectName():
|
||||
MainPages.setObjectName(u"MainPages")
|
||||
MainPages.resize(860, 600)
|
||||
self.main_pages_layout = QVBoxLayout(MainPages)
|
||||
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(MainPages)
|
||||
self.pages.setObjectName(u"pages")
|
||||
self.page_1 = QWidget()
|
||||
self.page_1.setObjectName(u"page_1")
|
||||
self.page_1.setStyleSheet(u"font-size: 14pt")
|
||||
self.page_1_layout = QVBoxLayout(self.page_1)
|
||||
self.page_1_layout.setSpacing(5)
|
||||
self.page_1_layout.setObjectName(u"page_1_layout")
|
||||
self.page_1_layout.setContentsMargins(5, 5, 5, 5)
|
||||
self.welcome_base = QFrame(self.page_1)
|
||||
self.welcome_base.setObjectName(u"welcome_base")
|
||||
self.welcome_base.setMinimumSize(QSize(300, 150))
|
||||
self.welcome_base.setMaximumSize(QSize(300, 150))
|
||||
self.welcome_base.setFrameShape(QFrame.NoFrame)
|
||||
self.welcome_base.setFrameShadow(QFrame.Raised)
|
||||
self.center_page_layout = QVBoxLayout(self.welcome_base)
|
||||
self.center_page_layout.setSpacing(10)
|
||||
self.center_page_layout.setObjectName(u"center_page_layout")
|
||||
self.center_page_layout.setContentsMargins(0, 0, 0, 0)
|
||||
self.logo = QFrame(self.welcome_base)
|
||||
self.logo.setObjectName(u"logo")
|
||||
self.logo.setMinimumSize(QSize(300, 120))
|
||||
self.logo.setMaximumSize(QSize(300, 120))
|
||||
self.logo.setFrameShape(QFrame.NoFrame)
|
||||
self.logo.setFrameShadow(QFrame.Raised)
|
||||
self.logo_layout = QVBoxLayout(self.logo)
|
||||
self.logo_layout.setSpacing(0)
|
||||
self.logo_layout.setObjectName(u"logo_layout")
|
||||
self.logo_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.center_page_layout.addWidget(self.logo)
|
||||
|
||||
self.label = QLabel(self.welcome_base)
|
||||
self.label.setObjectName(u"label")
|
||||
self.label.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.center_page_layout.addWidget(self.label)
|
||||
|
||||
|
||||
self.page_1_layout.addWidget(self.welcome_base, 0, Qt.AlignHCenter)
|
||||
|
||||
self.pages.addWidget(self.page_1)
|
||||
self.page_2 = QWidget()
|
||||
self.page_2.setObjectName(u"page_2")
|
||||
self.page_2_layout = QVBoxLayout(self.page_2)
|
||||
self.page_2_layout.setSpacing(5)
|
||||
self.page_2_layout.setObjectName(u"page_2_layout")
|
||||
self.page_2_layout.setContentsMargins(5, 5, 5, 5)
|
||||
self.scroll_area = QScrollArea(self.page_2)
|
||||
self.scroll_area.setObjectName(u"scroll_area")
|
||||
self.scroll_area.setStyleSheet(u"background: transparent;")
|
||||
self.scroll_area.setFrameShape(QFrame.NoFrame)
|
||||
self.scroll_area.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.scroll_area.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.scroll_area.setWidgetResizable(True)
|
||||
self.contents = QWidget()
|
||||
self.contents.setObjectName(u"contents")
|
||||
self.contents.setGeometry(QRect(0, 0, 840, 580))
|
||||
self.contents.setStyleSheet(u"background: transparent;")
|
||||
self.verticalLayout = QVBoxLayout(self.contents)
|
||||
self.verticalLayout.setSpacing(15)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.verticalLayout.setContentsMargins(5, 5, 5, 5)
|
||||
self.title_label = QLabel(self.contents)
|
||||
self.title_label.setObjectName(u"title_label")
|
||||
self.title_label.setMaximumSize(QSize(16777215, 40))
|
||||
font = QFont()
|
||||
font.setPointSize(16)
|
||||
self.title_label.setFont(font)
|
||||
self.title_label.setStyleSheet(u"font-size: 16pt")
|
||||
self.title_label.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout.addWidget(self.title_label)
|
||||
|
||||
self.description_label = QLabel(self.contents)
|
||||
self.description_label.setObjectName(u"description_label")
|
||||
self.description_label.setAlignment(Qt.AlignHCenter|Qt.AlignTop)
|
||||
self.description_label.setWordWrap(True)
|
||||
|
||||
self.verticalLayout.addWidget(self.description_label)
|
||||
|
||||
self.row_1_layout = QHBoxLayout()
|
||||
self.row_1_layout.setObjectName(u"row_1_layout")
|
||||
|
||||
self.verticalLayout.addLayout(self.row_1_layout)
|
||||
|
||||
self.row_2_layout = QHBoxLayout()
|
||||
self.row_2_layout.setObjectName(u"row_2_layout")
|
||||
|
||||
self.verticalLayout.addLayout(self.row_2_layout)
|
||||
|
||||
self.row_3_layout = QHBoxLayout()
|
||||
self.row_3_layout.setObjectName(u"row_3_layout")
|
||||
|
||||
self.verticalLayout.addLayout(self.row_3_layout)
|
||||
|
||||
self.scroll_area.setWidget(self.contents)
|
||||
|
||||
self.page_2_layout.addWidget(self.scroll_area)
|
||||
|
||||
self.pages.addWidget(self.page_2)
|
||||
self.page_3 = QWidget()
|
||||
self.page_3.setObjectName(u"page_3")
|
||||
self.page_3.setStyleSheet(u"QFrame {\n"
|
||||
" background: lightgreen;\n"
|
||||
" font-size: 16pt;\n"
|
||||
" border-radius: 8px;\n"
|
||||
"}")
|
||||
self.page_3_layout = QVBoxLayout(self.page_3)
|
||||
self.page_3_layout.setObjectName(u"page_3_layout")
|
||||
self.empty_page_label = QLabel(self.page_3)
|
||||
self.empty_page_label.setObjectName(u"empty_page_label")
|
||||
self.empty_page_label.setFont(font)
|
||||
self.empty_page_label.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.page_3_layout.addWidget(self.empty_page_label)
|
||||
|
||||
self.pages.addWidget(self.page_3)
|
||||
|
||||
self.main_pages_layout.addWidget(self.pages)
|
||||
|
||||
|
||||
self.retranslateUi(MainPages)
|
||||
|
||||
self.pages.setCurrentIndex(1)
|
||||
|
||||
|
||||
QMetaObject.connectSlotsByName(MainPages)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, MainPages):
|
||||
MainPages.setWindowTitle(QCoreApplication.translate("MainPages", u"Form", None))
|
||||
self.label.setText(QCoreApplication.translate("MainPages", u"Welcome To PyOneDark GUI", None))
|
||||
self.title_label.setText(QCoreApplication.translate("MainPages", u"Custom Widgets Page", None))
|
||||
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"
|
||||
"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))
|
||||
self.empty_page_label.setText(QCoreApplication.translate("MainPages", u"Empty Page", None))
|
||||
# retranslateUi
|
||||
|
||||
111
.qt_for_python/uic/right_column.py
Normal file
111
.qt_for_python/uic/right_column.py
Normal file
@@ -0,0 +1,111 @@
|
||||
# -*- 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.menus = QStackedWidget(RightColumn)
|
||||
self.menus.setObjectName(u"menus")
|
||||
self.menu_1 = QWidget()
|
||||
self.menu_1.setObjectName(u"menu_1")
|
||||
self.verticalLayout = QVBoxLayout(self.menu_1)
|
||||
self.verticalLayout.setSpacing(5)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.verticalLayout.setContentsMargins(5, 5, 5, 5)
|
||||
self.btn_1_widget = QWidget(self.menu_1)
|
||||
self.btn_1_widget.setObjectName(u"btn_1_widget")
|
||||
self.btn_1_widget.setMinimumSize(QSize(0, 40))
|
||||
self.btn_1_widget.setMaximumSize(QSize(16777215, 40))
|
||||
self.btn_1_layout = QVBoxLayout(self.btn_1_widget)
|
||||
self.btn_1_layout.setSpacing(0)
|
||||
self.btn_1_layout.setObjectName(u"btn_1_layout")
|
||||
self.btn_1_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.verticalLayout.addWidget(self.btn_1_widget)
|
||||
|
||||
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.setStyleSheet(u"font-size: 16pt")
|
||||
self.label_1.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout.addWidget(self.label_1)
|
||||
|
||||
self.menus.addWidget(self.menu_1)
|
||||
self.menu_2 = QWidget()
|
||||
self.menu_2.setObjectName(u"menu_2")
|
||||
self.verticalLayout_2 = QVBoxLayout(self.menu_2)
|
||||
self.verticalLayout_2.setSpacing(5)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.verticalLayout_2.setContentsMargins(5, 5, 5, 5)
|
||||
self.btn_2_widget = QWidget(self.menu_2)
|
||||
self.btn_2_widget.setObjectName(u"btn_2_widget")
|
||||
self.btn_2_widget.setMinimumSize(QSize(0, 40))
|
||||
self.btn_2_widget.setMaximumSize(QSize(16777215, 40))
|
||||
self.btn_2_layout = QVBoxLayout(self.btn_2_widget)
|
||||
self.btn_2_layout.setSpacing(0)
|
||||
self.btn_2_layout.setObjectName(u"btn_2_layout")
|
||||
self.btn_2_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.btn_2_widget)
|
||||
|
||||
self.label_2 = QLabel(self.menu_2)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setStyleSheet(u"font-size: 16pt")
|
||||
self.label_2.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.label_2)
|
||||
|
||||
self.label_3 = QLabel(self.menu_2)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
font1 = QFont()
|
||||
font1.setPointSize(9)
|
||||
self.label_3.setFont(font1)
|
||||
self.label_3.setStyleSheet(u"font-size: 9pt")
|
||||
self.label_3.setAlignment(Qt.AlignCenter)
|
||||
self.label_3.setWordWrap(True)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.label_3)
|
||||
|
||||
self.menus.addWidget(self.menu_2)
|
||||
|
||||
self.main_pages_layout.addWidget(self.menus)
|
||||
|
||||
|
||||
self.retranslateUi(RightColumn)
|
||||
|
||||
self.menus.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"Menu 1 - Right Menu", None))
|
||||
self.label_2.setText(QCoreApplication.translate("RightColumn", u"Menu 2 - Right Menu", None))
|
||||
self.label_3.setText(QCoreApplication.translate("RightColumn", u"This is just an example menu.\n"
|
||||
"Add Qt Widgets or your custom widgets here.", None))
|
||||
# retranslateUi
|
||||
|
||||
61
gui/images/svg_icons/icon_arrow_left.svg
Normal file
61
gui/images/svg_icons/icon_arrow_left.svg
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 3.7041666 3.7041667"
|
||||
version="1.1"
|
||||
id="svg1112"
|
||||
inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
|
||||
sodipodi:docname="icon_arrow_left.svg">
|
||||
<defs
|
||||
id="defs1106" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="23.434943"
|
||||
inkscape:cx="-0.27228179"
|
||||
inkscape:cy="9.2969808"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-rotation="0"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1057"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata1109">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
id="path1686"
|
||||
style="fill:#c3ccdf;fill-opacity:1;stroke-width:0.014809"
|
||||
d="M 0.74083338,1.8520834 2.5929167,3.7041667 2.9633333,3.3337501 1.4816666,1.8520834 2.9633333,0.37041667 2.5929167,0 Z"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
61
gui/images/svg_icons/icon_arrow_right.svg
Normal file
61
gui/images/svg_icons/icon_arrow_right.svg
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="14"
|
||||
height="14"
|
||||
viewBox="0 0 3.7041666 3.7041667"
|
||||
version="1.1"
|
||||
id="svg1112"
|
||||
inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
|
||||
sodipodi:docname="icon_arrow_right.svg">
|
||||
<defs
|
||||
id="defs1106" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="23.434943"
|
||||
inkscape:cx="-0.27228179"
|
||||
inkscape:cy="9.2969808"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-rotation="0"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1057"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata1109">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
id="path1686"
|
||||
style="fill:#c3ccdf;fill-opacity:1;stroke-width:0.014809"
|
||||
d="M 2.9633333,1.8520834 1.11125,3.7041667 0.74083338,3.3337501 2.2225001,1.8520834 0.74083338,0.37041667 1.11125,0 Z"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
78
gui/images/svg_icons/icon_info.svg
Normal file
78
gui/images/svg_icons/icon_info.svg
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="18"
|
||||
height="18"
|
||||
viewBox="0 0 4.7624998 4.7625002"
|
||||
version="1.1"
|
||||
id="svg1123"
|
||||
inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
|
||||
sodipodi:docname="icon_info.svg">
|
||||
<defs
|
||||
id="defs1117">
|
||||
<inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect845"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
satellites_param="F,0,1,1,0,0.26458333,0,1 @ F,0,1,1,0,0.26458333,0,1 @ F,0,1,1,0,0.26458333,0,1 @ F,0,1,1,0,0.26458333,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
|
||||
unit="px"
|
||||
method="auto"
|
||||
mode="F"
|
||||
radius="1"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="true"
|
||||
hide_knots="false" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="47.163271"
|
||||
inkscape:cx="7.9999996"
|
||||
inkscape:cy="11.367157"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-rotation="0"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1027"
|
||||
inkscape:window-x="1912"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata1120">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
id="path831"
|
||||
style="fill:#c3ccdf;stroke-width:3.40858;stroke-linecap:round"
|
||||
d="M 2.38125,0 A 2.3812499,2.3812499 0 0 0 0,2.38125 2.3812499,2.3812499 0 0 0 2.38125,4.7625 2.3812499,2.3812499 0 0 0 4.7625,2.38125 2.3812499,2.3812499 0 0 0 2.38125,0 Z m 0,0.67030791 c 0.2262168,0 0.4098587,0.18422327 0.4098587,0.41044009 0,0.2262168 -0.1836419,0.4098587 -0.4098587,0.4098587 -0.2262168,0 -0.4098587,-0.1836419 -0.4098587,-0.4098587 0,-0.22621682 0.1836419,-0.41044009 0.4098587,-0.41044009 z M 2.3254395,1.8016342 h 0.111621 A 0.29765625,0.29765625 0 0 1 2.7347168,2.0992905 V 3.7945359 A 0.29765625,0.29765625 0 0 1 2.4370605,4.0921921 H 2.3254395 A 0.29765625,0.29765625 0 0 1 2.0277832,3.7945359 V 2.0992905 A 0.29765625,0.29765625 0 0 1 2.3254395,1.8016342 Z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -18,6 +18,9 @@
|
||||
"text_title" : "#dce1ec",
|
||||
"text_foreground" : "#8a95aa",
|
||||
"text_description" : "#4f5b6e",
|
||||
"text_active" : "#dce1ec"
|
||||
"text_active" : "#dce1ec",
|
||||
"white" : "#f5f6f9",
|
||||
"pink" : "#ff007f",
|
||||
"green" : "#00ff7f"
|
||||
}
|
||||
}
|
||||
@@ -30,14 +30,11 @@
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="pages">
|
||||
<widget class="QStackedWidget" name="menus">
|
||||
<property name="currentIndex">
|
||||
<number>0</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">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
@@ -160,6 +157,9 @@
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-size: 16pt</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Menu 1 - Left Menu</string>
|
||||
</property>
|
||||
@@ -171,9 +171,6 @@
|
||||
</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">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
@@ -230,6 +227,9 @@
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-size: 16pt</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Menu 2 - Left Menu</string>
|
||||
</property>
|
||||
|
||||
@@ -30,14 +30,11 @@
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="pages">
|
||||
<widget class="QStackedWidget" name="menus">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<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">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
@@ -87,6 +84,43 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-size: 16pt</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Menu 1 - Right Menu</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="menu_2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>5</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="QWidget" name="btn_2_widget" native="true">
|
||||
<property name="minimumSize">
|
||||
@@ -120,109 +154,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="btn_3_widget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="btn_3_layout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Menu 1 - Right Menu</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">
|
||||
<property name="spacing">
|
||||
<number>5</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="QWidget" name="btn_4_widget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="btn_4_layout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
@@ -230,6 +161,9 @@
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-size: 16pt</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Menu 2 - Right Menu</string>
|
||||
</property>
|
||||
|
||||
@@ -28,11 +28,10 @@ class Ui_LeftColumn(object):
|
||||
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.menus = QStackedWidget(LeftColumn)
|
||||
self.menus.setObjectName(u"menus")
|
||||
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.setSpacing(5)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
@@ -75,14 +74,14 @@ class Ui_LeftColumn(object):
|
||||
font = QFont()
|
||||
font.setPointSize(16)
|
||||
self.label_1.setFont(font)
|
||||
self.label_1.setStyleSheet(u"font-size: 16pt")
|
||||
self.label_1.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout.addWidget(self.label_1)
|
||||
|
||||
self.pages.addWidget(self.menu_1)
|
||||
self.menus.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.setSpacing(5)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
@@ -101,6 +100,7 @@ class Ui_LeftColumn(object):
|
||||
self.label_2 = QLabel(self.menu_2)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setStyleSheet(u"font-size: 16pt")
|
||||
self.label_2.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.label_2)
|
||||
@@ -116,14 +116,14 @@ class Ui_LeftColumn(object):
|
||||
|
||||
self.verticalLayout_2.addWidget(self.label_3)
|
||||
|
||||
self.pages.addWidget(self.menu_2)
|
||||
self.menus.addWidget(self.menu_2)
|
||||
|
||||
self.main_pages_layout.addWidget(self.pages)
|
||||
self.main_pages_layout.addWidget(self.menus)
|
||||
|
||||
|
||||
self.retranslateUi(LeftColumn)
|
||||
|
||||
self.pages.setCurrentIndex(0)
|
||||
self.menus.setCurrentIndex(0)
|
||||
|
||||
|
||||
QMetaObject.connectSlotsByName(LeftColumn)
|
||||
|
||||
@@ -28,11 +28,10 @@ class Ui_RightColumn(object):
|
||||
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.menus = QStackedWidget(RightColumn)
|
||||
self.menus.setObjectName(u"menus")
|
||||
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.setSpacing(5)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
@@ -48,7 +47,24 @@ class Ui_RightColumn(object):
|
||||
|
||||
self.verticalLayout.addWidget(self.btn_1_widget)
|
||||
|
||||
self.btn_2_widget = QWidget(self.menu_1)
|
||||
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.setStyleSheet(u"font-size: 16pt")
|
||||
self.label_1.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout.addWidget(self.label_1)
|
||||
|
||||
self.menus.addWidget(self.menu_1)
|
||||
self.menu_2 = QWidget()
|
||||
self.menu_2.setObjectName(u"menu_2")
|
||||
self.verticalLayout_2 = QVBoxLayout(self.menu_2)
|
||||
self.verticalLayout_2.setSpacing(5)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.verticalLayout_2.setContentsMargins(5, 5, 5, 5)
|
||||
self.btn_2_widget = QWidget(self.menu_2)
|
||||
self.btn_2_widget.setObjectName(u"btn_2_widget")
|
||||
self.btn_2_widget.setMinimumSize(QSize(0, 40))
|
||||
self.btn_2_widget.setMaximumSize(QSize(16777215, 40))
|
||||
@@ -57,50 +73,12 @@ class Ui_RightColumn(object):
|
||||
self.btn_2_layout.setObjectName(u"btn_2_layout")
|
||||
self.btn_2_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.verticalLayout.addWidget(self.btn_2_widget)
|
||||
|
||||
self.btn_3_widget = QWidget(self.menu_1)
|
||||
self.btn_3_widget.setObjectName(u"btn_3_widget")
|
||||
self.btn_3_widget.setMinimumSize(QSize(0, 40))
|
||||
self.btn_3_widget.setMaximumSize(QSize(16777215, 40))
|
||||
self.btn_3_layout = QVBoxLayout(self.btn_3_widget)
|
||||
self.btn_3_layout.setSpacing(0)
|
||||
self.btn_3_layout.setObjectName(u"btn_3_layout")
|
||||
self.btn_3_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.verticalLayout.addWidget(self.btn_3_widget)
|
||||
|
||||
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.setSpacing(5)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.verticalLayout_2.setContentsMargins(5, 5, 5, 5)
|
||||
self.btn_4_widget = QWidget(self.menu_2)
|
||||
self.btn_4_widget.setObjectName(u"btn_4_widget")
|
||||
self.btn_4_widget.setMinimumSize(QSize(0, 40))
|
||||
self.btn_4_widget.setMaximumSize(QSize(16777215, 40))
|
||||
self.btn_4_layout = QVBoxLayout(self.btn_4_widget)
|
||||
self.btn_4_layout.setSpacing(0)
|
||||
self.btn_4_layout.setObjectName(u"btn_4_layout")
|
||||
self.btn_4_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.btn_4_widget)
|
||||
self.verticalLayout_2.addWidget(self.btn_2_widget)
|
||||
|
||||
self.label_2 = QLabel(self.menu_2)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setStyleSheet(u"font-size: 16pt")
|
||||
self.label_2.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.label_2)
|
||||
@@ -116,14 +94,14 @@ class Ui_RightColumn(object):
|
||||
|
||||
self.verticalLayout_2.addWidget(self.label_3)
|
||||
|
||||
self.pages.addWidget(self.menu_2)
|
||||
self.menus.addWidget(self.menu_2)
|
||||
|
||||
self.main_pages_layout.addWidget(self.pages)
|
||||
self.main_pages_layout.addWidget(self.menus)
|
||||
|
||||
|
||||
self.retranslateUi(RightColumn)
|
||||
|
||||
self.pages.setCurrentIndex(0)
|
||||
self.menus.setCurrentIndex(1)
|
||||
|
||||
|
||||
QMetaObject.connectSlotsByName(RightColumn)
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="pages">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_1">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-size: 14pt</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="page_1_layout">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
@@ -145,41 +145,138 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: lightblue; font-size: 16pt</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="page_2_layout">
|
||||
<property name="spacing">
|
||||
<number>5</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="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
<widget class="QScrollArea" name="scroll_area">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Page 2</string>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="contents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>840</width>
|
||||
<height>580</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: transparent;</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>15</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="QLabel" name="title_label">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-size: 16pt</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Custom Widgets Page</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="description_label">
|
||||
<property name="text">
|
||||
<string>Here will be all the custom widgets, they will be added over time on this page.
|
||||
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.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="row_1_layout"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="row_2_layout"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="row_3_layout"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_3">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: pink; font-size: 16pt</string>
|
||||
<string notr="true">QFrame {
|
||||
background: lightgreen;
|
||||
font-size: 16pt;
|
||||
border-radius: 8px;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<layout class="QVBoxLayout" name="page_3_layout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="empty_page_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Page 3</string>
|
||||
<string>Empty Page</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
|
||||
@@ -33,10 +33,10 @@ class Ui_MainPages(object):
|
||||
self.page_1 = QWidget()
|
||||
self.page_1.setObjectName(u"page_1")
|
||||
self.page_1.setStyleSheet(u"font-size: 14pt")
|
||||
self.verticalLayout = QVBoxLayout(self.page_1)
|
||||
self.verticalLayout.setSpacing(5)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.verticalLayout.setContentsMargins(5, 5, 5, 5)
|
||||
self.page_1_layout = QVBoxLayout(self.page_1)
|
||||
self.page_1_layout.setSpacing(5)
|
||||
self.page_1_layout.setObjectName(u"page_1_layout")
|
||||
self.page_1_layout.setContentsMargins(5, 5, 5, 5)
|
||||
self.welcome_base = QFrame(self.page_1)
|
||||
self.welcome_base.setObjectName(u"welcome_base")
|
||||
self.welcome_base.setMinimumSize(QSize(300, 150))
|
||||
@@ -67,35 +67,83 @@ class Ui_MainPages(object):
|
||||
self.center_page_layout.addWidget(self.label)
|
||||
|
||||
|
||||
self.verticalLayout.addWidget(self.welcome_base, 0, Qt.AlignHCenter)
|
||||
self.page_1_layout.addWidget(self.welcome_base, 0, Qt.AlignHCenter)
|
||||
|
||||
self.pages.addWidget(self.page_1)
|
||||
self.page_2 = QWidget()
|
||||
self.page_2.setObjectName(u"page_2")
|
||||
self.page_2.setStyleSheet(u"background: lightblue; font-size: 16pt")
|
||||
self.verticalLayout_2 = QVBoxLayout(self.page_2)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.label_2 = QLabel(self.page_2)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
self.page_2_layout = QVBoxLayout(self.page_2)
|
||||
self.page_2_layout.setSpacing(5)
|
||||
self.page_2_layout.setObjectName(u"page_2_layout")
|
||||
self.page_2_layout.setContentsMargins(5, 5, 5, 5)
|
||||
self.scroll_area = QScrollArea(self.page_2)
|
||||
self.scroll_area.setObjectName(u"scroll_area")
|
||||
self.scroll_area.setStyleSheet(u"background: transparent;")
|
||||
self.scroll_area.setFrameShape(QFrame.NoFrame)
|
||||
self.scroll_area.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.scroll_area.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.scroll_area.setWidgetResizable(True)
|
||||
self.contents = QWidget()
|
||||
self.contents.setObjectName(u"contents")
|
||||
self.contents.setGeometry(QRect(0, 0, 840, 580))
|
||||
self.contents.setStyleSheet(u"background: transparent;")
|
||||
self.verticalLayout = QVBoxLayout(self.contents)
|
||||
self.verticalLayout.setSpacing(15)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.verticalLayout.setContentsMargins(5, 5, 5, 5)
|
||||
self.title_label = QLabel(self.contents)
|
||||
self.title_label.setObjectName(u"title_label")
|
||||
self.title_label.setMaximumSize(QSize(16777215, 40))
|
||||
font = QFont()
|
||||
font.setPointSize(16)
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setAlignment(Qt.AlignCenter)
|
||||
self.title_label.setFont(font)
|
||||
self.title_label.setStyleSheet(u"font-size: 16pt")
|
||||
self.title_label.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout_2.addWidget(self.label_2)
|
||||
self.verticalLayout.addWidget(self.title_label)
|
||||
|
||||
self.description_label = QLabel(self.contents)
|
||||
self.description_label.setObjectName(u"description_label")
|
||||
self.description_label.setAlignment(Qt.AlignHCenter|Qt.AlignTop)
|
||||
self.description_label.setWordWrap(True)
|
||||
|
||||
self.verticalLayout.addWidget(self.description_label)
|
||||
|
||||
self.row_1_layout = QHBoxLayout()
|
||||
self.row_1_layout.setObjectName(u"row_1_layout")
|
||||
|
||||
self.verticalLayout.addLayout(self.row_1_layout)
|
||||
|
||||
self.row_2_layout = QHBoxLayout()
|
||||
self.row_2_layout.setObjectName(u"row_2_layout")
|
||||
|
||||
self.verticalLayout.addLayout(self.row_2_layout)
|
||||
|
||||
self.row_3_layout = QHBoxLayout()
|
||||
self.row_3_layout.setObjectName(u"row_3_layout")
|
||||
|
||||
self.verticalLayout.addLayout(self.row_3_layout)
|
||||
|
||||
self.scroll_area.setWidget(self.contents)
|
||||
|
||||
self.page_2_layout.addWidget(self.scroll_area)
|
||||
|
||||
self.pages.addWidget(self.page_2)
|
||||
self.page_3 = QWidget()
|
||||
self.page_3.setObjectName(u"page_3")
|
||||
self.page_3.setStyleSheet(u"background: pink; font-size: 16pt")
|
||||
self.verticalLayout_3 = QVBoxLayout(self.page_3)
|
||||
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
|
||||
self.label_3 = QLabel(self.page_3)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
self.label_3.setFont(font)
|
||||
self.label_3.setAlignment(Qt.AlignCenter)
|
||||
self.page_3.setStyleSheet(u"QFrame {\n"
|
||||
" background: lightgreen;\n"
|
||||
" font-size: 16pt;\n"
|
||||
" border-radius: 8px;\n"
|
||||
"}")
|
||||
self.page_3_layout = QVBoxLayout(self.page_3)
|
||||
self.page_3_layout.setObjectName(u"page_3_layout")
|
||||
self.empty_page_label = QLabel(self.page_3)
|
||||
self.empty_page_label.setObjectName(u"empty_page_label")
|
||||
self.empty_page_label.setFont(font)
|
||||
self.empty_page_label.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.verticalLayout_3.addWidget(self.label_3)
|
||||
self.page_3_layout.addWidget(self.empty_page_label)
|
||||
|
||||
self.pages.addWidget(self.page_3)
|
||||
|
||||
@@ -104,7 +152,7 @@ class Ui_MainPages(object):
|
||||
|
||||
self.retranslateUi(MainPages)
|
||||
|
||||
self.pages.setCurrentIndex(0)
|
||||
self.pages.setCurrentIndex(1)
|
||||
|
||||
|
||||
QMetaObject.connectSlotsByName(MainPages)
|
||||
@@ -113,7 +161,9 @@ class Ui_MainPages(object):
|
||||
def retranslateUi(self, MainPages):
|
||||
MainPages.setWindowTitle(QCoreApplication.translate("MainPages", u"Form", None))
|
||||
self.label.setText(QCoreApplication.translate("MainPages", u"Welcome To PyOneDark GUI", None))
|
||||
self.label_2.setText(QCoreApplication.translate("MainPages", u"Page 2", None))
|
||||
self.label_3.setText(QCoreApplication.translate("MainPages", u"Page 3", None))
|
||||
self.title_label.setText(QCoreApplication.translate("MainPages", u"Custom Widgets Page", None))
|
||||
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"
|
||||
"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))
|
||||
self.empty_page_label.setText(QCoreApplication.translate("MainPages", u"Empty Page", None))
|
||||
# retranslateUi
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class MainFunctions():
|
||||
title,
|
||||
icon_path
|
||||
):
|
||||
self.ui.left_column.menus.pages.setCurrentWidget(menu)
|
||||
self.ui.left_column.menus.menus.setCurrentWidget(menu)
|
||||
self.ui.left_column.title_label.setText(title)
|
||||
self.ui.left_column.icon.set_icon(icon_path)
|
||||
|
||||
@@ -74,7 +74,7 @@ class MainFunctions():
|
||||
# SET RIGHT COLUMN PAGES
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def set_right_column_menu(self, menu):
|
||||
self.ui.right_column.pages.setCurrentWidget(menu)
|
||||
self.ui.right_column.menus.setCurrentWidget(menu)
|
||||
|
||||
# GET TITLE BUTTON BY OBJECT NAME
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -67,7 +67,7 @@ class SetupMainWindow:
|
||||
{
|
||||
"btn_icon" : "icon_widgets.svg",
|
||||
"btn_id" : "btn_widgets",
|
||||
"btn_text" : "Open Widgets",
|
||||
"btn_text" : "Show Custom Widgets",
|
||||
"btn_tooltip" : "Show custom widgets",
|
||||
"show_top" : True,
|
||||
"is_active" : False
|
||||
@@ -105,7 +105,7 @@ class SetupMainWindow:
|
||||
"is_active" : False
|
||||
},
|
||||
{
|
||||
"btn_icon" : "icon_widgets.svg",
|
||||
"btn_icon" : "icon_info.svg",
|
||||
"btn_id" : "btn_info",
|
||||
"btn_text" : "Information",
|
||||
"btn_tooltip" : "Open informations",
|
||||
@@ -215,11 +215,291 @@ class SetupMainWindow:
|
||||
)
|
||||
MainFunctions.set_right_column_menu(self, self.ui.right_column.menu_1)
|
||||
|
||||
# ADD LOGO TO MAIN PAGE
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
# EXAMPLE CUSTOM WIDGETS
|
||||
# Here are added the custom widgets to pages and columns that
|
||||
# were created using Qt Designer.
|
||||
# This is just an example and should be deleted when creating
|
||||
# your application.
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
# LOAD SETTINGS
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
settings = Settings()
|
||||
self.settings = settings.items
|
||||
|
||||
# LOAD THEME COLOR
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
themes = Themes()
|
||||
self.themes = themes.items
|
||||
|
||||
# LEFT COLUMN
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
# BTN 1
|
||||
self.left_btn_1 = PyPushButton(
|
||||
text="Btn 1",
|
||||
radius=8,
|
||||
color=self.themes["app_color"]["text_foreground"],
|
||||
bg_color=self.themes["app_color"]["dark_one"],
|
||||
bg_color_hover=self.themes["app_color"]["dark_three"],
|
||||
bg_color_pressed=self.themes["app_color"]["dark_four"]
|
||||
)
|
||||
self.left_btn_1.setMaximumHeight(40)
|
||||
self.ui.left_column.menus.btn_1_layout.addWidget(self.left_btn_1)
|
||||
|
||||
# BTN 2
|
||||
self.left_btn_2 = PyPushButton(
|
||||
text="Btn With Icon",
|
||||
radius=8,
|
||||
color=self.themes["app_color"]["text_foreground"],
|
||||
bg_color=self.themes["app_color"]["dark_one"],
|
||||
bg_color_hover=self.themes["app_color"]["dark_three"],
|
||||
bg_color_pressed=self.themes["app_color"]["dark_four"]
|
||||
)
|
||||
self.icon = QIcon(Functions.set_svg_icon("icon_settings.svg"))
|
||||
self.left_btn_2.setIcon(self.icon)
|
||||
self.left_btn_2.setMaximumHeight(40)
|
||||
self.ui.left_column.menus.btn_2_layout.addWidget(self.left_btn_2)
|
||||
|
||||
# BTN 3 - Default QPushButton
|
||||
self.left_btn_3 = QPushButton("Default QPushButton")
|
||||
self.left_btn_3.setMaximumHeight(40)
|
||||
self.ui.left_column.menus.btn_3_layout.addWidget(self.left_btn_3)
|
||||
|
||||
# PAGES
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
# PAGE 1 - ADD LOGO TO MAIN PAGE
|
||||
self.logo_svg = QSvgWidget(Functions.set_svg_image("logo_home.svg"))
|
||||
self.ui.load_pages.logo_layout.addWidget(self.logo_svg, Qt.AlignCenter, Qt.AlignCenter)
|
||||
|
||||
# PAGE 2
|
||||
# CIRCULAR PROGRESS 1
|
||||
self.circular_progress_1 = PyCircularProgress(
|
||||
value = 80,
|
||||
progress_color = self.themes["app_color"]["context_color"],
|
||||
text_color = self.themes["app_color"]["text_title"],
|
||||
font_size = 14,
|
||||
bg_color = self.themes["app_color"]["dark_four"]
|
||||
)
|
||||
self.circular_progress_1.setFixedSize(200,200)
|
||||
|
||||
# CIRCULAR PROGRESS 2
|
||||
self.circular_progress_2 = PyCircularProgress(
|
||||
value = 45,
|
||||
progress_width = 4,
|
||||
progress_color = self.themes["app_color"]["context_color"],
|
||||
text_color = self.themes["app_color"]["context_color"],
|
||||
font_size = 14,
|
||||
bg_color = self.themes["app_color"]["bg_three"]
|
||||
)
|
||||
self.circular_progress_2.setFixedSize(160,160)
|
||||
|
||||
# CIRCULAR PROGRESS 3
|
||||
self.circular_progress_3 = PyCircularProgress(
|
||||
value = 75,
|
||||
progress_width = 2,
|
||||
progress_color = self.themes["app_color"]["pink"],
|
||||
text_color = self.themes["app_color"]["white"],
|
||||
font_size = 14,
|
||||
bg_color = self.themes["app_color"]["bg_three"]
|
||||
)
|
||||
self.circular_progress_3.setFixedSize(140,140)
|
||||
|
||||
# PY SLIDER 1
|
||||
self.vertical_slider_1 = PySlider(
|
||||
margin=8,
|
||||
bg_size=10,
|
||||
bg_radius=5,
|
||||
handle_margin=-3,
|
||||
handle_size=16,
|
||||
handle_radius=8,
|
||||
bg_color = self.themes["app_color"]["dark_three"],
|
||||
bg_color_hover = self.themes["app_color"]["dark_four"],
|
||||
handle_color = self.themes["app_color"]["context_color"],
|
||||
handle_color_hover = self.themes["app_color"]["context_hover"],
|
||||
handle_color_pressed = self.themes["app_color"]["context_pressed"]
|
||||
)
|
||||
self.vertical_slider_1.setMinimumHeight(100)
|
||||
|
||||
# PY SLIDER 2
|
||||
self.vertical_slider_2 = PySlider(
|
||||
bg_color = self.themes["app_color"]["dark_three"],
|
||||
bg_color_hover = self.themes["app_color"]["dark_three"],
|
||||
handle_color = self.themes["app_color"]["context_color"],
|
||||
handle_color_hover = self.themes["app_color"]["context_hover"],
|
||||
handle_color_pressed = self.themes["app_color"]["context_pressed"]
|
||||
)
|
||||
self.vertical_slider_2.setMinimumHeight(100)
|
||||
|
||||
# PY SLIDER 3
|
||||
self.vertical_slider_3 = PySlider(
|
||||
margin=8,
|
||||
bg_size=10,
|
||||
bg_radius=5,
|
||||
handle_margin=-3,
|
||||
handle_size=16,
|
||||
handle_radius=8,
|
||||
bg_color = self.themes["app_color"]["dark_three"],
|
||||
bg_color_hover = self.themes["app_color"]["dark_four"],
|
||||
handle_color = self.themes["app_color"]["context_color"],
|
||||
handle_color_hover = self.themes["app_color"]["context_hover"],
|
||||
handle_color_pressed = self.themes["app_color"]["context_pressed"]
|
||||
)
|
||||
self.vertical_slider_3.setOrientation(Qt.Horizontal)
|
||||
self.vertical_slider_3.setMaximumWidth(200)
|
||||
|
||||
# PY SLIDER 4
|
||||
self.vertical_slider_4 = PySlider(
|
||||
bg_color = self.themes["app_color"]["dark_three"],
|
||||
bg_color_hover = self.themes["app_color"]["dark_three"],
|
||||
handle_color = self.themes["app_color"]["context_color"],
|
||||
handle_color_hover = self.themes["app_color"]["context_hover"],
|
||||
handle_color_pressed = self.themes["app_color"]["context_pressed"]
|
||||
)
|
||||
self.vertical_slider_4.setOrientation(Qt.Horizontal)
|
||||
self.vertical_slider_4.setMaximumWidth(200)
|
||||
|
||||
# ICON BUTTON 1
|
||||
self.icon_button_1 = PyIconButton(
|
||||
icon_path = Functions.set_svg_icon("icon_heart.svg"),
|
||||
parent = self,
|
||||
app_parent = self.ui.central_widget,
|
||||
tooltip_text = "Icon button - Heart",
|
||||
width = 40,
|
||||
height = 40,
|
||||
radius = 20,
|
||||
dark_one = self.themes["app_color"]["dark_one"],
|
||||
icon_color = self.themes["app_color"]["icon_color"],
|
||||
icon_color_hover = self.themes["app_color"]["icon_hover"],
|
||||
icon_color_pressed = self.themes["app_color"]["icon_active"],
|
||||
icon_color_active = self.themes["app_color"]["icon_active"],
|
||||
bg_color = self.themes["app_color"]["dark_one"],
|
||||
bg_color_hover = self.themes["app_color"]["dark_three"],
|
||||
bg_color_pressed = self.themes["app_color"]["pink"]
|
||||
)
|
||||
|
||||
# ICON BUTTON 2
|
||||
self.icon_button_2 = PyIconButton(
|
||||
icon_path = Functions.set_svg_icon("icon_add_user.svg"),
|
||||
parent = self,
|
||||
app_parent = self.ui.central_widget,
|
||||
tooltip_text = "BTN with tooltip",
|
||||
width = 40,
|
||||
height = 40,
|
||||
radius = 8,
|
||||
dark_one = self.themes["app_color"]["dark_one"],
|
||||
icon_color = self.themes["app_color"]["icon_color"],
|
||||
icon_color_hover = self.themes["app_color"]["icon_hover"],
|
||||
icon_color_pressed = self.themes["app_color"]["white"],
|
||||
icon_color_active = self.themes["app_color"]["icon_active"],
|
||||
bg_color = self.themes["app_color"]["dark_one"],
|
||||
bg_color_hover = self.themes["app_color"]["dark_three"],
|
||||
bg_color_pressed = self.themes["app_color"]["green"],
|
||||
)
|
||||
|
||||
# ICON BUTTON 3
|
||||
self.icon_button_3 = PyIconButton(
|
||||
icon_path = Functions.set_svg_icon("icon_add_user.svg"),
|
||||
parent = self,
|
||||
app_parent = self.ui.central_widget,
|
||||
tooltip_text = "BTN actived! (is_actived = True)",
|
||||
width = 40,
|
||||
height = 40,
|
||||
radius = 8,
|
||||
dark_one = self.themes["app_color"]["dark_one"],
|
||||
icon_color = self.themes["app_color"]["icon_color"],
|
||||
icon_color_hover = self.themes["app_color"]["icon_hover"],
|
||||
icon_color_pressed = self.themes["app_color"]["white"],
|
||||
icon_color_active = self.themes["app_color"]["icon_active"],
|
||||
bg_color = self.themes["app_color"]["dark_one"],
|
||||
bg_color_hover = self.themes["app_color"]["dark_three"],
|
||||
bg_color_pressed = self.themes["app_color"]["context_color"],
|
||||
is_active = True
|
||||
)
|
||||
|
||||
# PUSH BUTTON 1
|
||||
self.push_button_1 = PyPushButton(
|
||||
text = "Button Without Icon",
|
||||
radius =8,
|
||||
color = self.themes["app_color"]["text_foreground"],
|
||||
bg_color = self.themes["app_color"]["dark_one"],
|
||||
bg_color_hover = self.themes["app_color"]["dark_three"],
|
||||
bg_color_pressed = self.themes["app_color"]["dark_four"]
|
||||
)
|
||||
self.push_button_1.setMinimumHeight(40)
|
||||
|
||||
# PUSH BUTTON 2
|
||||
self.push_button_2 = PyPushButton(
|
||||
text = "Button With Icon",
|
||||
radius = 8,
|
||||
color = self.themes["app_color"]["text_foreground"],
|
||||
bg_color = self.themes["app_color"]["dark_one"],
|
||||
bg_color_hover = self.themes["app_color"]["dark_three"],
|
||||
bg_color_pressed = self.themes["app_color"]["dark_four"]
|
||||
)
|
||||
self.icon_2 = QIcon(Functions.set_svg_icon("icon_settings.svg"))
|
||||
self.push_button_2.setMinimumHeight(40)
|
||||
self.push_button_2.setIcon(self.icon_2)
|
||||
|
||||
# ADD WIDGETS
|
||||
self.ui.load_pages.row_1_layout.addWidget(self.circular_progress_1)
|
||||
self.ui.load_pages.row_1_layout.addWidget(self.circular_progress_2)
|
||||
self.ui.load_pages.row_1_layout.addWidget(self.circular_progress_3)
|
||||
self.ui.load_pages.row_2_layout.addWidget(self.vertical_slider_1)
|
||||
self.ui.load_pages.row_2_layout.addWidget(self.vertical_slider_2)
|
||||
self.ui.load_pages.row_2_layout.addWidget(self.vertical_slider_3)
|
||||
self.ui.load_pages.row_2_layout.addWidget(self.vertical_slider_4)
|
||||
self.ui.load_pages.row_3_layout.addWidget(self.icon_button_1)
|
||||
self.ui.load_pages.row_3_layout.addWidget(self.icon_button_2)
|
||||
self.ui.load_pages.row_3_layout.addWidget(self.icon_button_3)
|
||||
self.ui.load_pages.row_3_layout.addWidget(self.push_button_1)
|
||||
self.ui.load_pages.row_3_layout.addWidget(self.push_button_2)
|
||||
|
||||
# RIGHT COLUMN
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
# BTN 1
|
||||
self.right_btn_1 = PyPushButton(
|
||||
text="Show Menu 2",
|
||||
radius=8,
|
||||
color=self.themes["app_color"]["text_foreground"],
|
||||
bg_color=self.themes["app_color"]["dark_one"],
|
||||
bg_color_hover=self.themes["app_color"]["dark_three"],
|
||||
bg_color_pressed=self.themes["app_color"]["dark_four"]
|
||||
)
|
||||
self.icon_right = QIcon(Functions.set_svg_icon("icon_arrow_right.svg"))
|
||||
self.right_btn_1.setIcon(self.icon_right)
|
||||
self.right_btn_1.setMaximumHeight(40)
|
||||
self.right_btn_1.clicked.connect(lambda: MainFunctions.set_right_column_menu(
|
||||
self,
|
||||
self.ui.right_column.menu_2
|
||||
))
|
||||
self.ui.right_column.btn_1_layout.addWidget(self.right_btn_1)
|
||||
|
||||
# BTN 2
|
||||
self.right_btn_2 = PyPushButton(
|
||||
text="Show Menu 1",
|
||||
radius=8,
|
||||
color=self.themes["app_color"]["text_foreground"],
|
||||
bg_color=self.themes["app_color"]["dark_one"],
|
||||
bg_color_hover=self.themes["app_color"]["dark_three"],
|
||||
bg_color_pressed=self.themes["app_color"]["dark_four"]
|
||||
)
|
||||
self.icon_left = QIcon(Functions.set_svg_icon("icon_arrow_left.svg"))
|
||||
self.right_btn_2.setIcon(self.icon_left)
|
||||
self.right_btn_2.setMaximumHeight(40)
|
||||
self.right_btn_2.clicked.connect(lambda: MainFunctions.set_right_column_menu(
|
||||
self,
|
||||
self.ui.right_column.menu_1
|
||||
))
|
||||
self.ui.right_column.btn_2_layout.addWidget(self.right_btn_2)
|
||||
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
# END - EXAMPLE CUSTOM WIDGETS
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
# RESIZE GRIPS AND CHANGE POSITION
|
||||
# Resize or change position when window is resized
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -40,4 +40,24 @@ from . py_title_bar import PyTitleBar
|
||||
|
||||
# PY CREDITS
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_credits_bar import PyCredits
|
||||
from . py_credits_bar import PyCredits
|
||||
|
||||
# PY PUSH BUTTON
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_push_button import PyPushButton
|
||||
|
||||
# PY TOGGLE
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_toggle import PyToggle
|
||||
|
||||
# PY SLIDER
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_slider import PySlider
|
||||
|
||||
# PY CIRCULAR PROGRESS
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_circular_progress import PyCircularProgress
|
||||
|
||||
# PY ICON BUTTON
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_icon_button import PyIconButton
|
||||
19
gui/widgets/py_circular_progress/__init__.py
Normal file
19
gui/widgets/py_circular_progress/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 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 TITLE BAR
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_circular_progress import PyCircularProgress
|
||||
114
gui/widgets/py_circular_progress/py_circular_progress.py
Normal file
114
gui/widgets/py_circular_progress/py_circular_progress.py
Normal file
@@ -0,0 +1,114 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 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 PyCircularProgress(QWidget):
|
||||
def __init__(
|
||||
self,
|
||||
value = 0,
|
||||
progress_width = 10,
|
||||
is_rounded = True,
|
||||
max_value = 100,
|
||||
progress_color = "#ff79c6",
|
||||
enable_text = True,
|
||||
font_family = "Segoe UI",
|
||||
font_size = 12,
|
||||
suffix = "%",
|
||||
text_color = "#ff79c6",
|
||||
enable_bg = True,
|
||||
bg_color = "#44475a"
|
||||
):
|
||||
QWidget.__init__(self)
|
||||
|
||||
# CUSTOM PROPERTIES
|
||||
self.value = value
|
||||
self.progress_width = progress_width
|
||||
self.progress_rounded_cap = is_rounded
|
||||
self.max_value = max_value
|
||||
self.progress_color = progress_color
|
||||
# Text
|
||||
self.enable_text = enable_text
|
||||
self.font_family = font_family
|
||||
self.font_size = font_size
|
||||
self.suffix = suffix
|
||||
self.text_color = text_color
|
||||
# BG
|
||||
self.enable_bg = enable_bg
|
||||
self.bg_color = bg_color
|
||||
|
||||
# ADD DROPSHADOW
|
||||
def add_shadow(self, enable):
|
||||
if enable:
|
||||
self.shadow = QGraphicsDropShadowEffect(self)
|
||||
self.shadow.setBlurRadius(15)
|
||||
self.shadow.setXOffset(0)
|
||||
self.shadow.setYOffset(0)
|
||||
self.shadow.setColor(QColor(0, 0, 0, 80))
|
||||
self.setGraphicsEffect(self.shadow)
|
||||
|
||||
# SET VALUE
|
||||
def set_value(self, value):
|
||||
self.value = value
|
||||
self.repaint() # Render progress bar after change value
|
||||
|
||||
|
||||
# PAINT EVENT (DESIGN YOUR CIRCULAR PROGRESS HERE)
|
||||
def paintEvent(self, e):
|
||||
# SET PROGRESS PARAMETERS
|
||||
width = self.width() - self.progress_width
|
||||
height = self.height() - self.progress_width
|
||||
margin = self.progress_width / 2
|
||||
value = self.value * 360 / self.max_value
|
||||
|
||||
# PAINTER
|
||||
paint = QPainter()
|
||||
paint.begin(self)
|
||||
paint.setRenderHint(QPainter.Antialiasing) # remove pixelated edges
|
||||
paint.setFont(QFont(self.font_family, self.font_size))
|
||||
|
||||
# CREATE RECTANGLE
|
||||
rect = QRect(0, 0, self.width(), self.height())
|
||||
paint.setPen(Qt.NoPen)
|
||||
|
||||
# PEN
|
||||
pen = QPen()
|
||||
pen.setWidth(self.progress_width)
|
||||
# Set Round Cap
|
||||
if self.progress_rounded_cap:
|
||||
pen.setCapStyle(Qt.RoundCap)
|
||||
|
||||
# ENABLE BG
|
||||
if self.enable_bg:
|
||||
pen.setColor(QColor(self.bg_color))
|
||||
paint.setPen(pen)
|
||||
paint.drawArc(margin, margin, width, height, 0, 360 * 16)
|
||||
|
||||
# CREATE ARC / CIRCULAR PROGRESS
|
||||
pen.setColor(QColor(self.progress_color))
|
||||
paint.setPen(pen)
|
||||
paint.drawArc(margin, margin, width, height, -90 * 16, -value * 16)
|
||||
|
||||
# CREATE TEXT
|
||||
if self.enable_text:
|
||||
pen.setColor(QColor(self.text_color))
|
||||
paint.setPen(pen)
|
||||
paint.drawText(rect, Qt.AlignCenter, f"{self.value}{self.suffix}")
|
||||
|
||||
# END
|
||||
paint.end()
|
||||
19
gui/widgets/py_icon_button/__init__.py
Normal file
19
gui/widgets/py_icon_button/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 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 ICON BUTTON
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_icon_button import PyIconButton
|
||||
268
gui/widgets/py_icon_button/py_icon_button.py
Normal file
268
gui/widgets/py_icon_button/py_icon_button.py
Normal file
@@ -0,0 +1,268 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 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 *
|
||||
|
||||
# PY TITLE BUTTON
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
class PyIconButton(QPushButton):
|
||||
def __init__(
|
||||
self,
|
||||
icon_path = None,
|
||||
parent = None,
|
||||
app_parent = None,
|
||||
tooltip_text = "",
|
||||
btn_id = None,
|
||||
width = 30,
|
||||
height = 30,
|
||||
radius = 8,
|
||||
bg_color = "#343b48",
|
||||
bg_color_hover = "#3c4454",
|
||||
bg_color_pressed = "#2c313c",
|
||||
icon_color = "#c3ccdf",
|
||||
icon_color_hover = "#dce1ec",
|
||||
icon_color_pressed = "#edf0f5",
|
||||
icon_color_active = "#f5f6f9",
|
||||
dark_one = "#1b1e23",
|
||||
text_foreground = "#8a95aa",
|
||||
context_color = "#568af2",
|
||||
top_margin = 40,
|
||||
is_active = False
|
||||
):
|
||||
super().__init__()
|
||||
|
||||
# SET DEFAULT PARAMETERS
|
||||
self.setFixedSize(width, height)
|
||||
self.setCursor(Qt.PointingHandCursor)
|
||||
self.setObjectName(btn_id)
|
||||
|
||||
# PROPERTIES
|
||||
self._bg_color = bg_color
|
||||
self._bg_color_hover = bg_color_hover
|
||||
self._bg_color_pressed = bg_color_pressed
|
||||
self._icon_color = icon_color
|
||||
self._icon_color_hover = icon_color_hover
|
||||
self._icon_color_pressed = icon_color_pressed
|
||||
self._icon_color_active = icon_color_active
|
||||
self._context_color = context_color
|
||||
self._top_margin = top_margin
|
||||
self._is_active = is_active
|
||||
# Set Parameters
|
||||
self._set_bg_color = bg_color
|
||||
self._set_icon_path = icon_path
|
||||
self._set_icon_color = icon_color
|
||||
self._set_border_radius = radius
|
||||
# Parent
|
||||
self._parent = parent
|
||||
self._app_parent = app_parent
|
||||
|
||||
# TOOLTIP
|
||||
self._tooltip_text = tooltip_text
|
||||
self._tooltip = _ToolTip(
|
||||
app_parent,
|
||||
tooltip_text,
|
||||
dark_one,
|
||||
text_foreground
|
||||
)
|
||||
self._tooltip.hide()
|
||||
|
||||
# SET ACTIVE MENU
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def set_active(self, is_active):
|
||||
self._is_active = is_active
|
||||
self.repaint()
|
||||
|
||||
# RETURN IF IS ACTIVE MENU
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def is_active(self):
|
||||
return self._is_active
|
||||
|
||||
# PAINT EVENT
|
||||
# painting the button and the icon
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def paintEvent(self, event):
|
||||
# PAINTER
|
||||
paint = QPainter()
|
||||
paint.begin(self)
|
||||
paint.setRenderHint(QPainter.RenderHint.Antialiasing)
|
||||
|
||||
if self._is_active:
|
||||
# BRUSH
|
||||
brush = QBrush(QColor(self._context_color))
|
||||
else:
|
||||
# BRUSH
|
||||
brush = QBrush(QColor(self._set_bg_color))
|
||||
|
||||
# CREATE RECTANGLE
|
||||
rect = QRect(0, 0, self.width(), self.height())
|
||||
paint.setPen(Qt.NoPen)
|
||||
paint.setBrush(brush)
|
||||
paint.drawRoundedRect(
|
||||
rect,
|
||||
self._set_border_radius,
|
||||
self._set_border_radius
|
||||
)
|
||||
|
||||
# DRAW ICONS
|
||||
self.icon_paint(paint, self._set_icon_path, rect)
|
||||
|
||||
# END PAINTER
|
||||
paint.end()
|
||||
|
||||
# CHANGE STYLES
|
||||
# Functions with custom styles
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def change_style(self, event):
|
||||
if event == QEvent.Enter:
|
||||
self._set_bg_color = self._bg_color_hover
|
||||
self._set_icon_color = self._icon_color_hover
|
||||
self.repaint()
|
||||
elif event == QEvent.Leave:
|
||||
self._set_bg_color = self._bg_color
|
||||
self._set_icon_color = self._icon_color
|
||||
self.repaint()
|
||||
elif event == QEvent.MouseButtonPress:
|
||||
self._set_bg_color = self._bg_color_pressed
|
||||
self._set_icon_color = self._icon_color_pressed
|
||||
self.repaint()
|
||||
elif event == QEvent.MouseButtonRelease:
|
||||
self._set_bg_color = self._bg_color_hover
|
||||
self._set_icon_color = self._icon_color_hover
|
||||
self.repaint()
|
||||
|
||||
# MOUSE OVER
|
||||
# Event triggered when the mouse is over the BTN
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def enterEvent(self, event):
|
||||
self.change_style(QEvent.Enter)
|
||||
self.move_tooltip()
|
||||
self._tooltip.show()
|
||||
|
||||
# MOUSE LEAVE
|
||||
# Event fired when the mouse leaves the BTN
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def leaveEvent(self, event):
|
||||
self.change_style(QEvent.Leave)
|
||||
self.move_tooltip()
|
||||
self._tooltip.hide()
|
||||
|
||||
# MOUSE PRESS
|
||||
# Event triggered when the left button is pressed
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def mousePressEvent(self, event):
|
||||
if event.button() == Qt.LeftButton:
|
||||
self.change_style(QEvent.MouseButtonPress)
|
||||
# SET FOCUS
|
||||
self.setFocus()
|
||||
# EMIT SIGNAL
|
||||
return self.clicked.emit()
|
||||
|
||||
# MOUSE RELEASED
|
||||
# Event triggered after the mouse button is released
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def mouseReleaseEvent(self, event):
|
||||
if event.button() == Qt.LeftButton:
|
||||
self.change_style(QEvent.MouseButtonRelease)
|
||||
# EMIT SIGNAL
|
||||
return self.released.emit()
|
||||
|
||||
# DRAW ICON WITH COLORS
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def icon_paint(self, qp, image, rect):
|
||||
icon = QPixmap(image)
|
||||
painter = QPainter(icon)
|
||||
painter.setCompositionMode(QPainter.CompositionMode_SourceIn)
|
||||
if self._is_active:
|
||||
painter.fillRect(icon.rect(), self._icon_color_active)
|
||||
else:
|
||||
painter.fillRect(icon.rect(), self._set_icon_color)
|
||||
qp.drawPixmap(
|
||||
(rect.width() - icon.width()) / 2,
|
||||
(rect.height() - icon.height()) / 2,
|
||||
icon
|
||||
)
|
||||
painter.end()
|
||||
|
||||
# SET ICON
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def set_icon(self, icon_path):
|
||||
self._set_icon_path = icon_path
|
||||
self.repaint()
|
||||
|
||||
# MOVE TOOLTIP
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
def move_tooltip(self):
|
||||
# GET MAIN WINDOW PARENT
|
||||
gp = self.mapToGlobal(QPoint(0, 0))
|
||||
|
||||
# SET WIDGET TO GET POSTION
|
||||
# Return absolute position of widget inside app
|
||||
pos = self._parent.mapFromGlobal(gp)
|
||||
|
||||
# FORMAT POSITION
|
||||
# Adjust tooltip position with offset
|
||||
pos_x = (pos.x() - (self._tooltip.width() // 2)) + (self.width() // 2)
|
||||
pos_y = pos.y() - self._top_margin
|
||||
|
||||
# SET POSITION TO WIDGET
|
||||
# Move tooltip position
|
||||
self._tooltip.move(pos_x, pos_y)
|
||||
|
||||
# TOOLTIP
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
class _ToolTip(QLabel):
|
||||
# TOOLTIP / LABEL StyleSheet
|
||||
style_tooltip = """
|
||||
QLabel {{
|
||||
background-color: {_dark_one};
|
||||
color: {_text_foreground};
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-radius: 17px;
|
||||
border: 0px solid transparent;
|
||||
font: 800 9pt "Segoe UI";
|
||||
}}
|
||||
"""
|
||||
def __init__(
|
||||
self,
|
||||
parent,
|
||||
tooltip,
|
||||
dark_one,
|
||||
text_foreground
|
||||
):
|
||||
QLabel.__init__(self)
|
||||
|
||||
# LABEL SETUP
|
||||
style = self.style_tooltip.format(
|
||||
_dark_one = dark_one,
|
||||
_text_foreground = text_foreground
|
||||
)
|
||||
self.setObjectName(u"label_tooltip")
|
||||
self.setStyleSheet(style)
|
||||
self.setMinimumHeight(34)
|
||||
self.setParent(parent)
|
||||
self.setText(tooltip)
|
||||
self.adjustSize()
|
||||
|
||||
# SET DROP SHADOW
|
||||
self.shadow = QGraphicsDropShadowEffect(self)
|
||||
self.shadow.setBlurRadius(30)
|
||||
self.shadow.setXOffset(0)
|
||||
self.shadow.setYOffset(0)
|
||||
self.shadow.setColor(QColor(0, 0, 0, 80))
|
||||
self.setGraphicsEffect(self.shadow)
|
||||
19
gui/widgets/py_push_button/__init__.py
Normal file
19
gui/widgets/py_push_button/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 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 PUSH BUTTON
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_push_button import PyPushButton
|
||||
71
gui/widgets/py_push_button/py_push_button.py
Normal file
71
gui/widgets/py_push_button/py_push_button.py
Normal file
@@ -0,0 +1,71 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 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 *
|
||||
|
||||
# STYLE
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
style = '''
|
||||
QPushButton {{
|
||||
border: none;
|
||||
padding-left: 10px;
|
||||
padding-right: 5px;
|
||||
color: {_color};
|
||||
border-radius: {_radius};
|
||||
background-color: {_bg_color};
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background-color: {_bg_color_hover};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background-color: {_bg_color_pressed};
|
||||
}}
|
||||
'''
|
||||
|
||||
# PY PUSH BUTTON
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
class PyPushButton(QPushButton):
|
||||
def __init__(
|
||||
self,
|
||||
text,
|
||||
radius,
|
||||
color,
|
||||
bg_color,
|
||||
bg_color_hover,
|
||||
bg_color_pressed,
|
||||
parent = None,
|
||||
):
|
||||
super().__init__()
|
||||
|
||||
# SET PARAMETRES
|
||||
self.setText(text)
|
||||
if parent != None:
|
||||
self.setParent(parent)
|
||||
self.setCursor(Qt.PointingHandCursor)
|
||||
|
||||
# SET STYLESHEET
|
||||
custom_style = style.format(
|
||||
_color = color,
|
||||
_radius = radius,
|
||||
_bg_color = bg_color,
|
||||
_bg_color_hover = bg_color_hover,
|
||||
_bg_color_pressed = bg_color_pressed
|
||||
)
|
||||
self.setStyleSheet(custom_style)
|
||||
|
||||
|
||||
19
gui/widgets/py_slider/__init__.py
Normal file
19
gui/widgets/py_slider/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 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 SLIDER
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_slider import PySlider
|
||||
97
gui/widgets/py_slider/py_slider.py
Normal file
97
gui/widgets/py_slider/py_slider.py
Normal file
@@ -0,0 +1,97 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 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 *
|
||||
|
||||
style = """
|
||||
/* HORIZONTAL */
|
||||
QSlider {{ margin: {_margin}px; }}
|
||||
QSlider::groove:horizontal {{
|
||||
border-radius: {_bg_radius}px;
|
||||
height: {_bg_size}px;
|
||||
margin: 0px;
|
||||
background-color: {_bg_color};
|
||||
}}
|
||||
QSlider::groove:horizontal:hover {{ background-color: {_bg_color_hover}; }}
|
||||
QSlider::handle:horizontal {{
|
||||
border: none;
|
||||
height: {_handle_size}px;
|
||||
width: {_handle_size}px;
|
||||
margin: {_handle_margin}px;
|
||||
border-radius: {_handle_radius}px;
|
||||
background-color: {_handle_color};
|
||||
}}
|
||||
QSlider::handle:horizontal:hover {{ background-color: {_handle_color_hover}; }}
|
||||
QSlider::handle:horizontal:pressed {{ background-color: {_handle_color_pressed}; }}
|
||||
|
||||
/* VERTICAL */
|
||||
QSlider::groove:vertical {{
|
||||
border-radius: {_bg_radius}px;
|
||||
width: {_bg_size}px;
|
||||
margin: 0px;
|
||||
background-color: {_bg_color};
|
||||
}}
|
||||
QSlider::groove:vertical:hover {{ background-color: {_bg_color_hover}; }}
|
||||
QSlider::handle:vertical {{
|
||||
border: none;
|
||||
height: {_handle_size}px;
|
||||
width: {_handle_size}px;
|
||||
margin: {_handle_margin}px;
|
||||
border-radius: {_handle_radius}px;
|
||||
background-color: {_handle_color};
|
||||
}}
|
||||
QSlider::handle:vertical:hover {{ background-color: {_handle_color_hover}; }}
|
||||
QSlider::handle:vertical:pressed {{ background-color: {_handle_color_pressed}; }}
|
||||
"""
|
||||
|
||||
class PySlider(QSlider):
|
||||
def __init__(
|
||||
self,
|
||||
margin = 0,
|
||||
bg_size = 20,
|
||||
bg_radius = 10,
|
||||
bg_color = "#1b1e23",
|
||||
bg_color_hover = "#1e2229",
|
||||
handle_margin = 2,
|
||||
handle_size = 16,
|
||||
handle_radius = 8,
|
||||
handle_color = "#568af2",
|
||||
handle_color_hover = "#6c99f4",
|
||||
handle_color_pressed = "#3f6fd1"
|
||||
):
|
||||
super(PySlider, self).__init__()
|
||||
|
||||
# FORMAT STYLE
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
adjust_style = style.format(
|
||||
_margin = margin,
|
||||
_bg_size = bg_size,
|
||||
_bg_radius = bg_radius,
|
||||
_bg_color = bg_color,
|
||||
_bg_color_hover = bg_color_hover,
|
||||
_handle_margin = handle_margin,
|
||||
_handle_size = handle_size,
|
||||
_handle_radius = handle_radius,
|
||||
_handle_color = handle_color,
|
||||
_handle_color_hover = handle_color_hover,
|
||||
_handle_color_pressed = handle_color_pressed
|
||||
)
|
||||
|
||||
# APPLY CUSTOM STYLE
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
self.setStyleSheet(adjust_style)
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
# IMPORT QT CORE
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from PySide6 import QtSvgWidgets
|
||||
from qt_core import *
|
||||
|
||||
# IMPORT FUNCTIONS
|
||||
|
||||
@@ -103,7 +103,7 @@ class PyTitleButton(QPushButton):
|
||||
|
||||
if self._is_active:
|
||||
# BRUSH
|
||||
brush = QBrush(QColor(self._bg_color_pressed))
|
||||
brush = QBrush(QColor(self._context_color))
|
||||
else:
|
||||
# BRUSH
|
||||
brush = QBrush(QColor(self._set_bg_color))
|
||||
@@ -188,7 +188,7 @@ class PyTitleButton(QPushButton):
|
||||
painter = QPainter(icon)
|
||||
painter.setCompositionMode(QPainter.CompositionMode_SourceIn)
|
||||
if self._is_active:
|
||||
painter.fillRect(icon.rect(), self._context_color)
|
||||
painter.fillRect(icon.rect(), self._icon_color_active)
|
||||
else:
|
||||
painter.fillRect(icon.rect(), self._set_icon_color)
|
||||
qp.drawPixmap(
|
||||
|
||||
19
gui/widgets/py_toggle/__init__.py
Normal file
19
gui/widgets/py_toggle/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 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 PUSH BUTTON
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from . py_toggle import PyToggle
|
||||
89
gui/widgets/py_toggle/py_toggle.py
Normal file
89
gui/widgets/py_toggle/py_toggle.py
Normal file
@@ -0,0 +1,89 @@
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
#
|
||||
# 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 PyToggle(QCheckBox):
|
||||
def __init__(
|
||||
self,
|
||||
width = 50,
|
||||
bg_color = "#777",
|
||||
circle_color = "#DDD",
|
||||
active_color = "#00BCFF",
|
||||
animation_curve = QEasingCurve.OutBounce
|
||||
):
|
||||
QCheckBox.__init__(self)
|
||||
self.setFixedSize(width, 28)
|
||||
self.setCursor(Qt.PointingHandCursor)
|
||||
|
||||
# COLORS
|
||||
self._bg_color = bg_color
|
||||
self._circle_color = circle_color
|
||||
self._active_color = active_color
|
||||
|
||||
self._position = 3
|
||||
self.animation = QPropertyAnimation(self, b"position")
|
||||
self.animation.setEasingCurve(animation_curve)
|
||||
self.animation.setDuration(500)
|
||||
self.stateChanged.connect(self.setup_animation)
|
||||
|
||||
@Property(float)
|
||||
def position(self):
|
||||
return self._position
|
||||
|
||||
@position.setter
|
||||
def position(self, pos):
|
||||
self._position = pos
|
||||
self.update()
|
||||
|
||||
# START STOP ANIMATION
|
||||
def setup_animation(self, value):
|
||||
self.animation.stop()
|
||||
if value:
|
||||
self.animation.setEndValue(self.width() - 26)
|
||||
else:
|
||||
self.animation.setEndValue(4)
|
||||
self.animation.start()
|
||||
print(f"Status: {self.isChecked()}")
|
||||
|
||||
def hitButton(self, pos: QPoint):
|
||||
return self.contentsRect().contains(pos)
|
||||
|
||||
def paintEvent(self, e):
|
||||
p = QPainter(self)
|
||||
p.setRenderHint(QPainter.Antialiasing)
|
||||
p.setFont(QFont("Segoe UI", 9))
|
||||
|
||||
# SET PEN
|
||||
p.setPen(Qt.NoPen)
|
||||
|
||||
# DRAW RECT
|
||||
rect = QRect(0, 0, self.width(), self.height())
|
||||
|
||||
if not self.isChecked():
|
||||
p.setBrush(QColor(self._bg_color))
|
||||
p.drawRoundedRect(0,0,rect.width(), 28, 14, 14)
|
||||
p.setBrush(QColor(self._circle_color))
|
||||
p.drawEllipse(self._position, 3, 22, 22)
|
||||
else:
|
||||
p.setBrush(QColor(self._active_color))
|
||||
p.drawRoundedRect(0,0,rect.width(), 28, 14, 14)
|
||||
p.setBrush(QColor(self._circle_color))
|
||||
p.drawEllipse(self._position, 3, 22, 22)
|
||||
|
||||
p.end()
|
||||
4
main.py
4
main.py
@@ -134,8 +134,8 @@ class MainWindow(QMainWindow):
|
||||
MainFunctions.set_left_column_menu(
|
||||
self,
|
||||
menu = self.ui.left_column.menus.menu_2,
|
||||
title = "Add Users",
|
||||
icon_path = Functions.set_svg_icon("icon_home.svg")
|
||||
title = "Info tab",
|
||||
icon_path = Functions.set_svg_icon("icon_info.svg")
|
||||
)
|
||||
|
||||
# SETTINGS LEFT
|
||||
|
||||
Reference in New Issue
Block a user