
| Current Path : /home/ift/52_procpy/dataninja/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //home/ift/52_procpy/dataninja/ift_ui_frame.py |
#-*- coding:utf-8 -*-
import sys
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QWidget, QApplication, QGroupBox, QPushButton, QLabel, QHBoxLayout, QVBoxLayout, QGridLayout, QFormLayout, QLineEdit, QTextEdit,QDial
from procpy.modeler.proc_layout import ProcLayWindow
from procpy.modeler.tss_dash_board import Dashboard
from procpy.test.tss_tree_modify import TreeModify
class MainWind(QWidget):
def __init__(self):
super(MainWind,self).__init__()
self.initUi()
def initUi(self):
mainLayout = QVBoxLayout()
self.creatDashFormGroupBox()
self.creatBlockFormGroupBox()
self.creatDataFormGroupBox()
self.creatValueVboxGroupBox()
h1boxLayout = QHBoxLayout()
#h1boxLayout.addStretch()
h1boxLayout.addWidget(self.dashFormGroupBox)
h1boxLayout.addWidget(self.blockFormGroupBox)
mainLayout.addLayout(h1boxLayout)
h2boxLayout = QHBoxLayout()
#h2boxLayout.addStretch()
h2boxLayout.addWidget(self.dataFormGroupBox)
h2boxLayout.addWidget(self.vboxGroupBox)
mainLayout.addLayout(h2boxLayout)
self.setLayout(mainLayout)
def creatDataFormGroupBox(self):
self.dataFormGroupBox = QGroupBox("DataBoard")
layout = QHBoxLayout()
btn_tree = QPushButton('Tree', self)
btn_tree.move(30, 50)
btn_tree.clicked.connect(self.doTreeShow)
btn_special = QPushButton('Special', self)
#btn_special.move(30, 50)
btn_seq = QPushButton('Seq..', self)
#btn_seq.move(30, 50)
btn_reporting = QPushButton('Reporting', self)
#btn_reporting.move(30, 50)
layout.addWidget(btn_tree)
layout.addWidget(btn_special)
layout.addWidget(btn_seq)
layout.addWidget(btn_reporting)
self.dataFormGroupBox.setLayout(layout)
def doTreeShow(self):
self.treeModify=TreeModify()
self.treeModify.setGeometry(50,50,600,500)
self.treeModify.show()
def creatValueVboxGroupBox(self):
self.vboxGroupBox = QGroupBox("ValueBoard")
layout = QGridLayout()
nameLabel = QLabel("Task Name")
dataEdit1 = QLineEdit()
dataEdit1.setText("Task 1")
dataEdit2 = QLineEdit()
dataEdit2.setText("Task 2")
layout.addWidget(nameLabel, 2, 1)
layout.addWidget(dataEdit1,2,2)
layout.addWidget(dataEdit2, 2, 3)
self.vboxGroupBox.setLayout(layout)
def creatDashFormGroupBox(self):
self.dashFormGroupBox = QGroupBox("DashBoard")
layout = QFormLayout()
dial = QDial(self)
dial.setGeometry(100, 0, 60, 60)
btn_run = QPushButton('Run', self)
btn_run.move(30, 50)
btn_run.clicked.connect(self.doDashBoard)
layout.addRow(btn_run, dial)
self.dashFormGroupBox.setLayout(layout)
def doDashBoard(self):
self.dash_board=Dashboard()
self.dash_board.setGeometry(50,50,600,500)
self.dash_board.show()
def creatBlockFormGroupBox(self):
self.blockFormGroupBox = QGroupBox("BlockBoard")
layout = QFormLayout()
btn_block = QPushButton('Block', self)
btn_block.move(30, 50)
btn_block.clicked.connect(self.doProcLayout)
layout.addRow(btn_block)
self.blockFormGroupBox.setLayout(layout)
def doProcLayout(self):
self.proc=ProcLayWindow()
self.proc.setGeometry(50,50,600,500)
self.proc.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = MainWind()
ex.show()
sys.exit(app.exec_())