Skip to content

Commit

Permalink
Client Improvement
Browse files Browse the repository at this point in the history
1. [GUI] Add result editing functionality to the dataset generation tool
2. [GUI] Add menus to the multifunction button on all of the tool parameter settings interface
3. [GUI] Set update mechanism to no longer force push, but to ask in a pop-up window whether to update
4. [GUI] Fix issue where theme sttings could not be saved correctly
5. [GUI] Fix the display abnormalities for pop-up windows
6. [GUI] Fix an issue with homepage image scaling
7. [GUI] Widget library update (see details in 'QSimpleWidget' repo)
  • Loading branch information
Spr-Aachen committed Apr 25, 2024
1 parent 325970a commit 7f0d78d
Show file tree
Hide file tree
Showing 11 changed files with 2,451 additions and 1,843 deletions.
73 changes: 71 additions & 2 deletions EVT_GUI/Components.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,14 @@ def SetValue(self, Params: list = [['%Path%', '%Namex%', '%Sim%'], ], ComboItems
ComboItems.append(ComboItem) if ComboItem not in ComboItems else None
for Param in Params:
QApplication.processEvents()
self.AddRow(Param, ComboItems)
self.AddRow(Param, ComboItems + [''])

def GetValue(self):
ValueDict = {}
for RowCount in range(self.rowCount()):
try:
Key = Function_GetText(self.cellWidget(RowCount, 0).findChild(QLabel))
Value = self.cellWidget(RowCount, 1).findChild(QComboBox).currentText()
Value = self.cellWidget(RowCount, 1).findChild(ComboBoxBase).currentText()
ValueDict[Key] = Value
except:
pass
Expand Down Expand Up @@ -449,4 +449,73 @@ def GetValue(self):
pass
return ValueDict


class Table_DATResult(TableBase):
'''
'''
def __init__(self, parent: QWidget = None):
super().__init__(parent)

self.setRowCount(0)
self.setColumnCount(2)
self.SetIndexHeaderVisible(True)
self.verticalHeader().setSectionResizeMode(QHeaderView.Fixed)

def setStyleSheet(self, StyleSheet: str):
super().setStyleSheet(StyleSheet + '''
QHeaderView::section, QTableView, QTableView::item {
border-radius:0px;
}
'''
)

def AddRow(self, Param: tuple):
RowHeight = 30
def SetColumnLayout(ColumnLayout):
ColumnLayout.setContentsMargins(0, 0, 0, 0)
ColumnLayout.setSpacing(0)

LineEdit = LineEditBase()
LineEdit.ClearDefaultStyleSheet()
LineEdit.setStyleSheet(LineEdit.styleSheet() + 'LineEditBase {border-radius: 0px;}')
LineEdit.RemoveFileDialogButton()
Function_SetText(LineEdit, Param[1], SetPlaceholderText = True)
Column0Layout = QHBoxLayout()
SetColumnLayout(Column0Layout)
Column0Layout.addWidget(LineEdit)

PlayerWidget = MediaPlayerBase()
PlayerWidget.setStyleSheet(PlayerWidget.styleSheet() + 'border-radius: 0px;')
PlayerWidget.SetMediaPlayer(Param[0])
PlayerWidget.layout().setContentsMargins(6, 6, 6, 6)
PlayerWidget.Slider.hide()
Column1Layout = QHBoxLayout()
SetColumnLayout(Column1Layout)
Column1Layout.addWidget(PlayerWidget)

super().AddRow(
[Column0Layout, Column1Layout],
[QHeaderView.Stretch, QHeaderView.Fixed],
[None, RowHeight],
RowHeight
)

def SetValue(self, Params: dict = {'%Path%': '%Data%'}):
self.ClearRows()
ParamDict = ToIterable(Params)
for Key, Value in ParamDict.items():
QApplication.processEvents()
Param = (Key, Value)
self.AddRow(Param)

def GetValue(self):
ValueList = []
for RowCount in range(self.rowCount()):
try:
Value = Function_GetText(self.cellWidget(RowCount, 0).findChild(QLineEdit))
ValueList.append(Value)
except:
pass
return ValueList

##############################################################################################################################
Loading

0 comments on commit 7f0d78d

Please sign in to comment.