first commit
This commit is contained in:
133
ui_mainwindow.py
Normal file
133
ui_mainwindow.py
Normal file
@@ -0,0 +1,133 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from PySide6.QtCore import (QCoreApplication, QMetaObject, QRect, Qt)
|
||||
from PySide6.QtGui import (QFont, QIcon)
|
||||
from PySide6.QtWidgets import (QFrame, QLabel, QPushButton, QWidget, QTreeWidget)
|
||||
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
if not MainWindow.objectName():
|
||||
MainWindow.setObjectName(u"MainWindow")
|
||||
|
||||
# Get the absolute path of the directory where the program resides
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
ico_path = os.path.join(current_dir, "arriveico.png")
|
||||
|
||||
MainWindow.setToolButtonStyle(Qt.ToolButtonIconOnly)
|
||||
MainWindow.setAnimated(True)
|
||||
MainWindow.setDocumentMode(False)
|
||||
MainWindow.setWindowIcon(QIcon(ico_path))
|
||||
fontmain = QFont()
|
||||
fontmain.setFamilies([u"Optimism Sans"])
|
||||
fontmain.setPointSize(10)
|
||||
fontmain.setBold(True)
|
||||
|
||||
MainWindow.setFont(fontmain)
|
||||
|
||||
image_path = os.path.join(current_dir, "appbackground.jpg")
|
||||
|
||||
image_path_css = image_path.replace("\\", "/")
|
||||
|
||||
# --- Define and Apply the Style Sheet ---
|
||||
bg_style_sheet = f"""
|
||||
QWidget {{
|
||||
background-image: url("{image_path_css}");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}}
|
||||
"""
|
||||
|
||||
self.centralwidget = QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName(u"centralwidget")
|
||||
self.centralwidget.setStyleSheet(bg_style_sheet)
|
||||
self.header = QLabel(self.centralwidget)
|
||||
self.header.setObjectName(u"header")
|
||||
self.header.setGeometry(QRect(50, 35, 650, 50))
|
||||
font = QFont()
|
||||
font.setFamilies([u"Optimism Sans"])
|
||||
font.setPointSize(24)
|
||||
font.setBold(True)
|
||||
|
||||
self.header.setFont(font)
|
||||
self.header.setStyleSheet("color: #5F016F;")
|
||||
self.header.setAlignment(Qt.AlignCenter)
|
||||
|
||||
self.test_area = QFrame(self.centralwidget)
|
||||
self.test_area.setObjectName(u"test_area")
|
||||
self.test_area.setGeometry(QRect(50, 115, 924, 618))
|
||||
self.test_area.setFrameShape(QFrame.StyledPanel)
|
||||
self.test_area.setFrameShadow(QFrame.Raised)
|
||||
|
||||
button_style = """
|
||||
QPushButton {
|
||||
background-color: #FF80D4;
|
||||
border: 1px solid #FF33BB;
|
||||
border-radius: 1px;
|
||||
}
|
||||
"""
|
||||
|
||||
self.connButton = QPushButton(self.test_area)
|
||||
self.connButton.setObjectName(u"connButton")
|
||||
self.connButton.setGeometry(QRect(640, 25, 125, 25))
|
||||
self.connButton.setFont(fontmain)
|
||||
self.connButton.setStyleSheet(button_style)
|
||||
|
||||
text_label_style = """
|
||||
QLabel {
|
||||
background-image: url("");
|
||||
background-color: #FF80D4;
|
||||
border: 0px solid #FF33BB;
|
||||
border-radius: 0px;
|
||||
}
|
||||
"""
|
||||
|
||||
frame_style = """
|
||||
QFrame {
|
||||
background-image: url("");
|
||||
background-color: #FF80D4;
|
||||
border: 1px solid #FF33BB;
|
||||
border-radius: 10px;
|
||||
}
|
||||
"""
|
||||
|
||||
tree_style = """
|
||||
QHeaderView::section {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
font: 10pt 'Optimism Sans';
|
||||
}
|
||||
"""
|
||||
|
||||
self.test_area.setStyleSheet(frame_style)
|
||||
|
||||
self.tree = QTreeWidget(self.test_area)
|
||||
self.tree.header().setDefaultAlignment(Qt.AlignCenter)
|
||||
self.tree.setGeometry(QRect(25, 25, 450, 565))
|
||||
self.tree.setStyleSheet(tree_style)
|
||||
self.tree.setColumnCount(1)
|
||||
self.tree.setFont(fontmain)
|
||||
self.tree.header().setFont(fontmain)
|
||||
self.tree.setHeaderLabels(["SPRINT"])
|
||||
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.header.raise_()
|
||||
self.test_area.raise_()
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
|
||||
QMetaObject.connectSlotsByName(MainWindow)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"JIRA SPRINT EXPORTER V1.0",
|
||||
None))
|
||||
self.header.setText(QCoreApplication.translate("MainWindow", u"JIRA SPRINT EXPORTER", None))
|
||||
self.connButton.setText(QCoreApplication.translate("MainWindow", u"GENERATE", None))
|
||||
|
||||
# retranslateUi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user