-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.py
executable file
·255 lines (247 loc) · 14.2 KB
/
mainwindow.py
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.setWindowModality(QtCore.Qt.WindowModal)
MainWindow.resize(1148, 785)
MainWindow.setMaximumSize(QtCore.QSize(323232, 323232))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Icons/images/app.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
self.horizontalLayout.setObjectName("horizontalLayout")
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setBaseSize(QtCore.QSize(0, 0))
self.tabWidget.setObjectName("tabWidget")
self.tab = QtWidgets.QWidget()
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tab.sizePolicy().hasHeightForWidth())
self.tab.setSizePolicy(sizePolicy)
self.tab.setObjectName("tab")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.tab)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.splitter_3 = QtWidgets.QSplitter(self.tab)
self.splitter_3.setOrientation(QtCore.Qt.Horizontal)
self.splitter_3.setObjectName("splitter_3")
self.splitter_2 = QtWidgets.QSplitter(self.splitter_3)
self.splitter_2.setOrientation(QtCore.Qt.Horizontal)
self.splitter_2.setObjectName("splitter_2")
self.packetTreeWidget = QtWidgets.QTreeWidget(self.splitter_2)
self.packetTreeWidget.setMinimumSize(QtCore.QSize(0, 0))
self.packetTreeWidget.setMaximumSize(QtCore.QSize(1000000, 16777215))
self.packetTreeWidget.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
self.packetTreeWidget.setWordWrap(False)
self.packetTreeWidget.setObjectName("packetTreeWidget")
self.packetTreeWidget.headerItem().setText(0, "Timestamp")
self.splitter = QtWidgets.QSplitter(self.splitter_3)
self.splitter.setOrientation(QtCore.Qt.Vertical)
self.splitter.setObjectName("splitter")
self.paramTreeWidget = QtWidgets.QTreeWidget(self.splitter)
self.paramTreeWidget.setAutoExpandDelay(-1)
self.paramTreeWidget.setUniformRowHeights(True)
self.paramTreeWidget.setObjectName("paramTreeWidget")
self.paramTreeWidget.headerItem().setText(0, "Name")
self.paramTreeWidget.header().setCascadingSectionResizes(False)
self.paramTreeWidget.header().setDefaultSectionSize(170)
self.paramTreeWidget.header().setHighlightSections(True)
self.horizontalLayout_2.addWidget(self.splitter_3)
self.tabWidget.addTab(self.tab, "")
self.tab_2 = QtWidgets.QWidget()
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tab_2.sizePolicy().hasHeightForWidth())
self.tab_2.setSizePolicy(sizePolicy)
self.tab_2.setObjectName("tab_2")
self.verticalLayout = QtWidgets.QVBoxLayout(self.tab_2)
self.verticalLayout.setObjectName("verticalLayout")
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
self.xaxisComboBox = QtWidgets.QComboBox(self.tab_2)
self.xaxisComboBox.setObjectName("xaxisComboBox")
self.xaxisComboBox.addItem("")
self.xaxisComboBox.addItem("")
self.xaxisComboBox.addItem("")
self.gridLayout.addWidget(self.xaxisComboBox, 0, 1, 1, 1)
self.label = QtWidgets.QLabel(self.tab_2)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 2, 1, 1)
self.label_2 = QtWidgets.QLabel(self.tab_2)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 0, 4, 1, 1)
self.styleEdit = QtWidgets.QLineEdit(self.tab_2)
self.styleEdit.setMaximumSize(QtCore.QSize(40, 16777215))
self.styleEdit.setObjectName("styleEdit")
self.gridLayout.addWidget(self.styleEdit, 0, 9, 1, 1)
spacerItem = QtWidgets.QSpacerItem(25, 17, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem, 0, 10, 1, 1)
self.label_4 = QtWidgets.QLabel(self.tab_2)
self.label_4.setObjectName("label_4")
self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1)
self.paramNameEdit = QtWidgets.QLineEdit(self.tab_2)
self.paramNameEdit.setMaximumSize(QtCore.QSize(150, 16777215))
self.paramNameEdit.setObjectName("paramNameEdit")
self.gridLayout.addWidget(self.paramNameEdit, 0, 3, 1, 1)
self.comboBox = QtWidgets.QComboBox(self.tab_2)
self.comboBox.setMinimumSize(QtCore.QSize(120, 0))
self.comboBox.setMaximumSize(QtCore.QSize(150, 16777215))
self.comboBox.setModelColumn(0)
self.comboBox.setObjectName("comboBox")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.gridLayout.addWidget(self.comboBox, 0, 5, 1, 1)
self.descLabel = QtWidgets.QLabel(self.tab_2)
self.descLabel.setMinimumSize(QtCore.QSize(0, 0))
self.descLabel.setMaximumSize(QtCore.QSize(0, 16777215))
self.descLabel.setText("")
self.descLabel.setObjectName("descLabel")
self.gridLayout.addWidget(self.descLabel, 0, 6, 1, 1)
self.label_3 = QtWidgets.QLabel(self.tab_2)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 0, 8, 1, 1)
self.plotButton = QtWidgets.QPushButton(self.tab_2)
self.plotButton.setMaximumSize(QtCore.QSize(100, 16777215))
self.plotButton.setObjectName("plotButton")
self.gridLayout.addWidget(self.plotButton, 0, 11, 1, 1)
self.savePlotButton = QtWidgets.QPushButton(self.tab_2)
self.savePlotButton.setMaximumSize(QtCore.QSize(100, 16777215))
self.savePlotButton.setObjectName("savePlotButton")
self.gridLayout.addWidget(self.savePlotButton, 0, 12, 1, 1)
self.dataTypeComboBox = QtWidgets.QComboBox(self.tab_2)
self.dataTypeComboBox.setObjectName("dataTypeComboBox")
self.dataTypeComboBox.addItem("")
self.dataTypeComboBox.addItem("")
self.gridLayout.addWidget(self.dataTypeComboBox, 0, 7, 1, 1)
self.exportButton = QtWidgets.QPushButton(self.tab_2)
self.exportButton.setObjectName("exportButton")
self.gridLayout.addWidget(self.exportButton, 0, 13, 1, 1)
self.verticalLayout.addLayout(self.gridLayout)
self.tabWidget.addTab(self.tab_2, "")
self.horizontalLayout.addWidget(self.tabWidget)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1148, 22))
self.menubar.setObjectName("menubar")
self.menu_File = QtWidgets.QMenu(self.menubar)
self.menu_File.setObjectName("menu_File")
self.menu_Help = QtWidgets.QMenu(self.menubar)
self.menu_Help.setObjectName("menu_Help")
self.menuAction = QtWidgets.QMenu(self.menubar)
self.menuAction.setObjectName("menuAction")
self.menu_Tools = QtWidgets.QMenu(self.menubar)
self.menu_Tools.setObjectName("menu_Tools")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.toolBar = QtWidgets.QToolBar(MainWindow)
self.toolBar.setObjectName("toolBar")
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.action_Open = QtWidgets.QAction(MainWindow)
self.action_Open.setObjectName("action_Open")
self.actionExit = QtWidgets.QAction(MainWindow)
self.actionExit.setObjectName("actionExit")
self.actionAbout = QtWidgets.QAction(MainWindow)
self.actionAbout.setObjectName("actionAbout")
self.actionPrevious = QtWidgets.QAction(MainWindow)
self.actionPrevious.setMenuRole(QtWidgets.QAction.AboutQtRole)
self.actionPrevious.setObjectName("actionPrevious")
self.actionNext = QtWidgets.QAction(MainWindow)
self.actionNext.setObjectName("actionNext")
self.actionSet_IDB = QtWidgets.QAction(MainWindow)
self.actionSet_IDB.setObjectName("actionSet_IDB")
self.actionSave = QtWidgets.QAction(MainWindow)
self.actionSave.setObjectName("actionSave")
self.actionLog = QtWidgets.QAction(MainWindow)
self.actionLog.setObjectName("actionLog")
self.action_Plot = QtWidgets.QAction(MainWindow)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/Icons/images/graph.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Plot.setIcon(icon1)
self.action_Plot.setObjectName("action_Plot")
self.actionPaste = QtWidgets.QAction(MainWindow)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/Icons/images/paste.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionPaste.setIcon(icon2)
self.actionPaste.setObjectName("actionPaste")
self.actionLoad_mongodb = QtWidgets.QAction(MainWindow)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/Icons/images/mongodb.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionLoad_mongodb.setIcon(icon3)
self.actionLoad_mongodb.setObjectName("actionLoad_mongodb")
self.menu_File.addAction(self.actionLoad_mongodb)
self.menu_File.addAction(self.actionSave)
self.menu_File.addAction(self.actionExit)
self.menu_Help.addAction(self.actionAbout)
self.menuAction.addAction(self.actionPrevious)
self.menuAction.addAction(self.actionNext)
self.menu_Tools.addAction(self.action_Plot)
self.menubar.addAction(self.menu_File.menuAction())
self.menubar.addAction(self.menuAction.menuAction())
self.menubar.addAction(self.menu_Tools.menuAction())
self.menubar.addAction(self.menu_Help.menuAction())
self.toolBar.addAction(self.actionLoad_mongodb)
self.toolBar.addAction(self.actionSave)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionPrevious)
self.toolBar.addAction(self.actionNext)
self.toolBar.addSeparator()
self.toolBar.addAction(self.action_Plot)
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "STIX Mongodb viewer"))
self.packetTreeWidget.headerItem().setText(1, _translate("MainWindow", "Description"))
self.paramTreeWidget.headerItem().setText(1, _translate("MainWindow", "Description"))
self.paramTreeWidget.headerItem().setText(2, _translate("MainWindow", "Raw"))
self.paramTreeWidget.headerItem().setText(3, _translate("MainWindow", "Eng. Value"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Packets"))
self.tab_2.setToolTip(_translate("MainWindow", "plot parameters\n"
""))
self.xaxisComboBox.setItemText(0, _translate("MainWindow", "Parameter order as X"))
self.xaxisComboBox.setItemText(1, _translate("MainWindow", "Timestamps as X"))
#self.xaxisComboBox.setItemText(2, _translate("MainWindow", "Histogram"))
self.label.setText(_translate("MainWindow", "Data source:"))
self.label_2.setText(_translate("MainWindow", "In"))
self.styleEdit.setText(_translate("MainWindow", "-"))
self.label_4.setText(_translate("MainWindow", "Type:"))
self.comboBox.setItemText(0, _translate("MainWindow", "the same packet"))
self.comboBox.setItemText(1, _translate("MainWindow", "all packets"))
self.label_3.setText(_translate("MainWindow", "Curve Style:"))
self.plotButton.setText(_translate("MainWindow", "Plot"))
self.savePlotButton.setText(_translate("MainWindow", "Save"))
self.dataTypeComboBox.setItemText(0, _translate("MainWindow", "Raw values"))
self.dataTypeComboBox.setItemText(1, _translate("MainWindow", "Engineering values"))
self.exportButton.setText(_translate("MainWindow", "Export data"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Plot"))
self.menu_File.setTitle(_translate("MainWindow", "&File"))
self.menu_Help.setTitle(_translate("MainWindow", "&Help"))
self.menuAction.setTitle(_translate("MainWindow", "&View"))
self.menu_Tools.setTitle(_translate("MainWindow", "&Tools"))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar"))
self.action_Open.setText(_translate("MainWindow", "&Open"))
self.actionExit.setText(_translate("MainWindow", "&Exit"))
self.actionAbout.setText(_translate("MainWindow", "About"))
self.actionPrevious.setText(_translate("MainWindow", "Previous"))
self.actionNext.setText(_translate("MainWindow", "Next"))
self.actionSet_IDB.setText(_translate("MainWindow", "Set &IDB"))
self.actionSave.setText(_translate("MainWindow", "Sa&ve"))
self.actionLog.setText(_translate("MainWindow", "Show Log"))
self.action_Plot.setText(_translate("MainWindow", "&Plot"))
self.actionPaste.setText(_translate("MainWindow", "Paste"))
self.actionPaste.setToolTip(_translate("MainWindow", "Read raw data from the clipboard"))
self.actionLoad_mongodb.setText(_translate("MainWindow", "Connect"))
self.actionLoad_mongodb.setToolTip(_translate("MainWindow", "Connect to Mongodb"))
import mainwindow_rc5