mirror of
https://github.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI.git
synced 2026-08-25 00:23:19 +00:00
09/06/2021
This commit is contained in:
@@ -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>
|
||||
|
||||
+42
-108
@@ -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)
|
||||
|
||||
+116
-19
@@ -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
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user