-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig_window.py
More file actions
88 lines (55 loc) · 2.93 KB
/
config_window.py
File metadata and controls
88 lines (55 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
'''
Created on Jul 7, 2018
@author: rg012f
'''
import sys
from PySide.QtGui import *
from PySide.QtCore import *
from PySide import QtGui
from PySide import QtCore
class ConfigWindow:
wind_close_flg = False
def __init__(self,last_parent):
self.last_parent = last_parent
self.main_widget = QWidget()
self.main_widget.setMaximumHeight(400)
self.parent_layout = QVBoxLayout()
#self.last_parent.right_base_layout_v
self.progress_bar_layout = QHBoxLayout() #to incorporate the progress bar and the buttons
self.secondary_progress_layout = QVBoxLayout() #just the progress bar
self.control_button_layout = QGridLayout() #cancel,close,open valid / invalid file
self.config_layout = QVBoxLayout()
self.config_textbox = QPlainTextEdit()
self.config_textbox.setFont(QtGui.QFont("Verdana", 10, QtGui.QFont.Bold))
self.config_textbox.setReadOnly(True)
self.config_layout.addWidget(self.config_textbox)
self.progress_bar_layout.addLayout(self.secondary_progress_layout)
self.progress_bar_layout.addLayout(self.control_button_layout)
self.parent_layout.addLayout(self.config_layout)
self.parent_layout.addLayout(self.progress_bar_layout)
self.progressBar = QtGui.QProgressBar()
self.progressLabel = QtGui.QLabel("Configuration process is in progress .... Please wait until the log file is generated...!")
self.cancel_button = QtGui.QPushButton("Cancel")
self.progressBar.setProperty("Current status", 0)
self.progressBar.setObjectName("progressBar")
self.progressBar.setMaximumHeight(15)
self.progressBar.setTextVisible(True)
self.progressBar.setValue(0)
self.progressLabel.setFont(QtGui.QFont("verdana", 9, QtGui.QFont.Normal))
self.secondary_progress_layout.addWidget(self.progressBar)
self.secondary_progress_layout.addWidget(self.progressLabel)
self.progress_bar_layout.addWidget(self.cancel_button)
# self.last_parent.msgBox.information(,'Job status!',"Ping logs process has been closed.!", QtGui.QMessageBox.Ok)
self.main_widget.setLayout(self.parent_layout)
self.last_parent.right_base_layout_v.addWidget(self.main_widget)
self.main_widget.hide()
def prepare_window(self,):
print("i have reached prepare window for configs")
self.progressBar.show()
self.progressLabel.show()
self.cancel_button.show()
#Container Widget
self.config_textbox.clear()
self.main_widget.show()
def closeEvent(self,event):
self.wind_close_flg = True