diff --git a/SM/settingswindow.ui b/SM/settingswindow.ui index 21ea740..c55f2dc 100644 --- a/SM/settingswindow.ui +++ b/SM/settingswindow.ui @@ -6,8 +6,8 @@ 0 0 - 800 - 641 + 1064 + 931 @@ -16,507 +16,541 @@ 600 - - - 800 - 3000 - - TelemFFB Settings Manager - - - - - true - - - - 16777215 - 100 - - - - - 50 - false - true - - - - color: #ff0000; - - - Raw value shown above. Slider ranges in the main window are multiplied by the factor value for more usable settings ranges - - - true + + + + + Qt::Vertical - - - - - - + + + + + + + 150 + 16777215 + + + + Model + + - - - PropellerAircraft - + + + + Edit Mode: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + - - - TurbopropAircraft - + + + + Clear Selection + + - - - JetAircraft - + + + + Device Scope: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + - - - GliderAircraft - + + + + Class + + - - - Helicopter - + + + + false + + + + + + + - - - HPGHelicopter - + + + + Simulator + + - - - - - - - 0 - 0 - - - - gfhjfghj - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - - - - false - - - - - + + + + + + + + + + PropellerAircraft + + + + + TurbopropAircraft + + + + + JetAircraft + + + + + GliderAircraft + + + + + Helicopter + + + + + HPGHelicopter + + + - - - - - - Qt::Vertical - - - - - - - Qt::Horizontal - - - - - - - Show Defaults - - - true - - - - - - - Qt::ScrollBarAlwaysOn - - - true - - - QAbstractItemView::SelectItems - - - false - - - false - - - false - - - false - - - - New Column - - - - - New Column - - - - - New Column - - - - - New Column - - - - - New Column - - - - - - - - Clear Selection - - - - - - - Browse... - - - - - - - Enable - - - - - - - - - - - 200 - 16777215 - - - - Update Value - - - - - - - - 200 - 16777215 - - - - QDialogButtonBox::Close - - - - - - - - 200 - 16777215 - - - - Qt::Horizontal - - - - - - - Current Aircraft: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 200 - 16777215 - - - - - 75 - true - - - - Select a Row to Edit - - - Qt::AlignCenter - - - - - - - PushButton - - - - - - - Value: - - - - - - - - 200 - 16777215 - - - - Get Current Model - - - - - - - - 9999 - 16777215 - - - - - - - - false - - - TextLabel - - - Qt::AlignCenter - - - - - - - false - - - - DCS - + + + + false + + + + DCS + + + + + IL2 + + + + + MSFS + + + + + + + + + + + Model + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + - - IL2 - + + + + + + 1 + 1 + + + + Qt::ScrollBarAlwaysOn + + + true + + + QAbstractItemView::SelectItems + + + false + + + false + + + false + + + true + + + false + + + + New Column + + + + + New Column + + + + + New Column + + + + + New Column + + + + + New Column + + + + + + + + + + Wilga 80X + + + true + + + + + + + Revert Changes + + + + + + + Create Model Setting + + + + + + + false + + + Delete User Model + + + + + + + Show Defaults + + + true + + + + + + + Current Aircraft: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + <a href="https://docs.google.com/document/d/1YL5DLkiTxlaNx_zKHEYSs25PjmGtQ6_WZDk58_SGt8Y">Read manual for details</a> + + + Qt::RichText + + + Qt::AlignCenter + + + true + + + + + + - - MSFS - + + + + + Qt::Horizontal + + + + + + + + 200 + 16777215 + + + + + true + + + + Select a Row to Edit + + + Qt::AlignCenter + + + + + + + false + + + TextLabel + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + Desc + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + Enable + + + + + + + Value: + + + + + + + + 9999 + 16777215 + + + + + + + + + 200 + 16777215 + + + + Qt::Horizontal + + + + + + + true + + + + 16777215 + 100 + + + + + false + true + + + + color: #ff0000; + + + Raw value shown above. Slider ranges in the main window are multiplied by the factor value for more usable settings ranges + + + true + + + + + + + Browse... + + + + + + + PushButton + + + + + + + + + + + 200 + 16777215 + + + + Update Value + + + + + + + Qt::Vertical + + + QSizePolicy::Preferred + + + + 150 + 300 + + + + + + + + Source checkbox must be checked + + + + + + + to allow selection and editing + + + + + + + Qt::Horizontal + + + + + + + + 200 + 16777215 + + + + Get Current Model + + + + + + + + 200 + 16777215 + + + + QDialogButtonBox::Close + + + + - - - - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - QSizePolicy::Preferred - - - - 150 - 300 - - - - - - - - Wilga 80X - - - true - - - - - - - Qt::Horizontal - - - - - - - to allow selection and editing - - - - - - - Source checkbox must be checked - - - - - - - Revert Changes - - - - - - - Create Model Setting - - - - - - - - - - Edit Mode: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 150 - 16777215 - - - - Model - - - - - - - Model - - - - - - - Simulator - - - - - - - Class - - - - - - - false - - - Delete User Model - - - - - - - <a href="https://docs.google.com/document/d/1YL5DLkiTxlaNx_zKHEYSs25PjmGtQ6_WZDk58_SGt8Y">Read manual for details</a> - - - Qt::RichText - - - Qt::AlignCenter - - - true - - - - - - - Device Scope: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + diff --git a/settingsmanager.py b/settingsmanager.py index 0a1a8e5..622d951 100644 --- a/settingsmanager.py +++ b/settingsmanager.py @@ -5,7 +5,7 @@ import shutil from PyQt5 import QtGui, QtWidgets, QtCore from PyQt5.QtWidgets import (QApplication, QTableWidgetItem, QCheckBox, QLineEdit, QDialog, QLabel, QComboBox, - QVBoxLayout, QPushButton, QFileDialog, QMessageBox) + QVBoxLayout, QPushButton, QFileDialog, QMessageBox, QHeaderView) from PyQt5.QtWidgets import QTableWidget, QTextEdit, QWidget, QSlider from datetime import datetime from PyQt5.QtCore import Qt, pyqtSignal @@ -152,7 +152,8 @@ def init_ui(self): mprint(f"init_ui") # xmlutils.create_empty_userxml_file() # Now handled by TelemFFB on startup - + self.table_widget.horizontalHeader().setStretchLastSection(True) + self.table_widget.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch) self.tb_currentmodel.setText(self.model_name) self.get_current_model('', '') diff --git a/settingswindow.py b/settingswindow.py index 008ed43..64db557 100644 --- a/settingswindow.py +++ b/settingswindow.py @@ -14,25 +14,46 @@ class Ui_SettingsWindow(object): def setupUi(self, SettingsWindow): SettingsWindow.setObjectName("SettingsWindow") - SettingsWindow.resize(800, 641) + SettingsWindow.resize(1064, 931) SettingsWindow.setMinimumSize(QtCore.QSize(800, 600)) - SettingsWindow.setMaximumSize(QtCore.QSize(800, 3000)) self.centralwidget = QtWidgets.QWidget(SettingsWindow) self.centralwidget.setObjectName("centralwidget") - self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) + self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.centralwidget) + self.verticalLayout_3.setObjectName("verticalLayout_3") + self.line = QtWidgets.QFrame(self.centralwidget) + self.line.setFrameShape(QtWidgets.QFrame.VLine) + self.line.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line.setObjectName("line") + self.verticalLayout_3.addWidget(self.line) + self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") - self.l_sliderfactor = QtWidgets.QLabel(self.centralwidget) - self.l_sliderfactor.setEnabled(True) - self.l_sliderfactor.setMaximumSize(QtCore.QSize(16777215, 100)) - font = QtGui.QFont() - font.setBold(False) - font.setWeight(50) - font.setKerning(True) - self.l_sliderfactor.setFont(font) - self.l_sliderfactor.setStyleSheet("color: #ff0000;") - self.l_sliderfactor.setWordWrap(True) - self.l_sliderfactor.setObjectName("l_sliderfactor") - self.gridLayout.addWidget(self.l_sliderfactor, 26, 12, 1, 1) + self.l_mode = QtWidgets.QLabel(self.centralwidget) + self.l_mode.setMaximumSize(QtCore.QSize(150, 16777215)) + self.l_mode.setObjectName("l_mode") + self.gridLayout.addWidget(self.l_mode, 0, 6, 1, 1) + self.label_3 = QtWidgets.QLabel(self.centralwidget) + self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_3.setObjectName("label_3") + self.gridLayout.addWidget(self.label_3, 0, 5, 1, 1) + self.pb_clear = QtWidgets.QPushButton(self.centralwidget) + self.pb_clear.setObjectName("pb_clear") + self.gridLayout.addWidget(self.pb_clear, 1, 3, 1, 1) + self.label_2 = QtWidgets.QLabel(self.centralwidget) + self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 1, 5, 1, 1) + self.label_5 = QtWidgets.QLabel(self.centralwidget) + self.label_5.setObjectName("label_5") + self.gridLayout.addWidget(self.label_5, 0, 1, 1, 1) + self.drp_models = QtWidgets.QComboBox(self.centralwidget) + self.drp_models.setEditable(False) + self.drp_models.setObjectName("drp_models") + self.drp_models.addItem("") + self.drp_models.setItemText(0, "") + self.gridLayout.addWidget(self.drp_models, 1, 2, 1, 1) + self.label_4 = QtWidgets.QLabel(self.centralwidget) + self.label_4.setObjectName("label_4") + self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1) self.drp_class = QtWidgets.QComboBox(self.centralwidget) self.drp_class.setObjectName("drp_class") self.drp_class.addItem("") @@ -43,38 +64,33 @@ def setupUi(self, SettingsWindow): self.drp_class.addItem("") self.drp_class.addItem("") self.drp_class.addItem("") - self.gridLayout.addWidget(self.drp_class, 15, 4, 1, 2) - self.t_info = QtWidgets.QLabel(self.centralwidget) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.t_info.sizePolicy().hasHeightForWidth()) - self.t_info.setSizePolicy(sizePolicy) - self.t_info.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) - self.t_info.setWordWrap(True) - self.t_info.setObjectName("t_info") - self.gridLayout.addWidget(self.t_info, 21, 12, 1, 1) - self.drp_models = QtWidgets.QComboBox(self.centralwidget) - self.drp_models.setEditable(False) - self.drp_models.setObjectName("drp_models") - self.drp_models.addItem("") - self.drp_models.setItemText(0, "") - self.gridLayout.addWidget(self.drp_models, 15, 6, 1, 1) - self.line = QtWidgets.QFrame(self.centralwidget) - self.line.setFrameShape(QtWidgets.QFrame.VLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout.addWidget(self.line, 5, 0, 1, 1) - self.line_3 = QtWidgets.QFrame(self.centralwidget) - self.line_3.setFrameShape(QtWidgets.QFrame.HLine) - self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_3.setObjectName("line_3") - self.gridLayout.addWidget(self.line_3, 17, 12, 1, 1) - self.cb_show_inherited = QtWidgets.QCheckBox(self.centralwidget) - self.cb_show_inherited.setChecked(True) - self.cb_show_inherited.setObjectName("cb_show_inherited") - self.gridLayout.addWidget(self.cb_show_inherited, 37, 0, 1, 1) + self.gridLayout.addWidget(self.drp_class, 1, 1, 1, 1) + self.drp_sim = QtWidgets.QComboBox(self.centralwidget) + self.drp_sim.setEditable(False) + self.drp_sim.setObjectName("drp_sim") + self.drp_sim.addItem("") + self.drp_sim.addItem("") + self.drp_sim.addItem("") + self.gridLayout.addWidget(self.drp_sim, 1, 0, 1, 1) + self.drp_device = QtWidgets.QComboBox(self.centralwidget) + self.drp_device.setObjectName("drp_device") + self.gridLayout.addWidget(self.drp_device, 1, 6, 1, 1) + self.label_6 = QtWidgets.QLabel(self.centralwidget) + self.label_6.setObjectName("label_6") + self.gridLayout.addWidget(self.label_6, 0, 2, 1, 1) + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout.addItem(spacerItem, 1, 4, 1, 1) + self.verticalLayout_3.addLayout(self.gridLayout) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.verticalLayout_2 = QtWidgets.QVBoxLayout() + self.verticalLayout_2.setObjectName("verticalLayout_2") self.table_widget = QtWidgets.QTableWidget(self.centralwidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.table_widget.sizePolicy().hasHeightForWidth()) + self.table_widget.setSizePolicy(sizePolicy) self.table_widget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) self.table_widget.setAlternatingRowColors(True) self.table_widget.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectItems) @@ -93,135 +109,140 @@ def setupUi(self, SettingsWindow): self.table_widget.setHorizontalHeaderItem(3, item) item = QtWidgets.QTableWidgetItem() self.table_widget.setHorizontalHeaderItem(4, item) + self.table_widget.horizontalHeader().setCascadingSectionResizes(True) self.table_widget.verticalHeader().setVisible(False) - self.gridLayout.addWidget(self.table_widget, 16, 0, 21, 11) - self.pb_clear = QtWidgets.QPushButton(self.centralwidget) - self.pb_clear.setObjectName("pb_clear") - self.gridLayout.addWidget(self.pb_clear, 15, 8, 1, 1) - self.b_browse = QtWidgets.QPushButton(self.centralwidget) - self.b_browse.setObjectName("b_browse") - self.gridLayout.addWidget(self.b_browse, 27, 12, 1, 1) - self.cb_enable = QtWidgets.QCheckBox(self.centralwidget) - self.cb_enable.setObjectName("cb_enable") - self.gridLayout.addWidget(self.cb_enable, 22, 12, 1, 1) - self.drp_valuebox = QtWidgets.QComboBox(self.centralwidget) - self.drp_valuebox.setObjectName("drp_valuebox") - self.gridLayout.addWidget(self.drp_valuebox, 29, 12, 1, 1) - self.b_update = QtWidgets.QPushButton(self.centralwidget) - self.b_update.setMaximumSize(QtCore.QSize(200, 16777215)) - self.b_update.setObjectName("b_update") - self.gridLayout.addWidget(self.b_update, 30, 12, 1, 1) - self.buttonBox = QtWidgets.QDialogButtonBox(self.centralwidget) - self.buttonBox.setMaximumSize(QtCore.QSize(200, 16777215)) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 47, 12, 1, 1) - self.slider_float = QtWidgets.QSlider(self.centralwidget) - self.slider_float.setMaximumSize(QtCore.QSize(200, 16777215)) - self.slider_float.setOrientation(QtCore.Qt.Horizontal) - self.slider_float.setObjectName("slider_float") - self.gridLayout.addWidget(self.slider_float, 25, 12, 1, 1) + self.verticalLayout_2.addWidget(self.table_widget) + self.gridLayout_2 = QtWidgets.QGridLayout() + self.gridLayout_2.setObjectName("gridLayout_2") + self.tb_currentmodel = QtWidgets.QLineEdit(self.centralwidget) + self.tb_currentmodel.setReadOnly(True) + self.tb_currentmodel.setObjectName("tb_currentmodel") + self.gridLayout_2.addWidget(self.tb_currentmodel, 1, 2, 1, 1) + self.b_revert = QtWidgets.QPushButton(self.centralwidget) + self.b_revert.setObjectName("b_revert") + self.gridLayout_2.addWidget(self.b_revert, 1, 0, 1, 1) + self.b_createusermodel = QtWidgets.QPushButton(self.centralwidget) + self.b_createusermodel.setObjectName("b_createusermodel") + self.gridLayout_2.addWidget(self.b_createusermodel, 0, 1, 1, 1) + self.b_deleteModel = QtWidgets.QPushButton(self.centralwidget) + self.b_deleteModel.setEnabled(False) + self.b_deleteModel.setObjectName("b_deleteModel") + self.gridLayout_2.addWidget(self.b_deleteModel, 1, 1, 1, 1) + self.cb_show_inherited = QtWidgets.QCheckBox(self.centralwidget) + self.cb_show_inherited.setChecked(True) + self.cb_show_inherited.setObjectName("cb_show_inherited") + self.gridLayout_2.addWidget(self.cb_show_inherited, 0, 0, 1, 1) self.label = QtWidgets.QLabel(self.centralwidget) self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label.setObjectName("label") - self.gridLayout.addWidget(self.label, 37, 5, 1, 1) + self.gridLayout_2.addWidget(self.label, 0, 2, 1, 1) + self.l_manual = QtWidgets.QLabel(self.centralwidget) + self.l_manual.setTextFormat(QtCore.Qt.RichText) + self.l_manual.setAlignment(QtCore.Qt.AlignCenter) + self.l_manual.setOpenExternalLinks(True) + self.l_manual.setObjectName("l_manual") + self.gridLayout_2.addWidget(self.l_manual, 1, 3, 1, 1) + self.verticalLayout_2.addLayout(self.gridLayout_2) + self.horizontalLayout.addLayout(self.verticalLayout_2) + self.verticalLayout = QtWidgets.QVBoxLayout() + self.verticalLayout.setObjectName("verticalLayout") + self.line_3 = QtWidgets.QFrame(self.centralwidget) + self.line_3.setFrameShape(QtWidgets.QFrame.HLine) + self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_3.setObjectName("line_3") + self.verticalLayout.addWidget(self.line_3) self.l_displayname = QtWidgets.QLabel(self.centralwidget) self.l_displayname.setMaximumSize(QtCore.QSize(200, 16777215)) font = QtGui.QFont() font.setBold(True) - font.setWeight(75) self.l_displayname.setFont(font) self.l_displayname.setAlignment(QtCore.Qt.AlignCenter) self.l_displayname.setObjectName("l_displayname") - self.gridLayout.addWidget(self.l_displayname, 18, 12, 1, 1) - self.b_usb_button = QtWidgets.QPushButton(self.centralwidget) - self.b_usb_button.setObjectName("b_usb_button") - self.gridLayout.addWidget(self.b_usb_button, 28, 12, 1, 1) - self.l_value = QtWidgets.QLabel(self.centralwidget) - self.l_value.setObjectName("l_value") - self.gridLayout.addWidget(self.l_value, 23, 12, 1, 1) - self.b_getcurrentmodel = QtWidgets.QPushButton(self.centralwidget) - self.b_getcurrentmodel.setMaximumSize(QtCore.QSize(200, 16777215)) - self.b_getcurrentmodel.setObjectName("b_getcurrentmodel") - self.gridLayout.addWidget(self.b_getcurrentmodel, 37, 12, 1, 1) - self.tb_value = QtWidgets.QLineEdit(self.centralwidget) - self.tb_value.setMaximumSize(QtCore.QSize(9999, 16777215)) - self.tb_value.setObjectName("tb_value") - self.gridLayout.addWidget(self.tb_value, 24, 12, 1, 1) + self.verticalLayout.addWidget(self.l_displayname) self.l_name = QtWidgets.QLabel(self.centralwidget) self.l_name.setEnabled(False) self.l_name.setAlignment(QtCore.Qt.AlignCenter) self.l_name.setObjectName("l_name") - self.gridLayout.addWidget(self.l_name, 19, 12, 1, 1) - self.drp_sim = QtWidgets.QComboBox(self.centralwidget) - self.drp_sim.setEditable(False) - self.drp_sim.setObjectName("drp_sim") - self.drp_sim.addItem("") - self.drp_sim.addItem("") - self.drp_sim.addItem("") - self.gridLayout.addWidget(self.drp_sim, 15, 0, 1, 3) - self.line_4 = QtWidgets.QFrame(self.centralwidget) - self.line_4.setFrameShape(QtWidgets.QFrame.HLine) - self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line_4.setObjectName("line_4") - self.gridLayout.addWidget(self.line_4, 36, 12, 1, 1) - spacerItem = QtWidgets.QSpacerItem(150, 300, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) - self.gridLayout.addItem(spacerItem, 32, 12, 1, 1) - self.tb_currentmodel = QtWidgets.QLineEdit(self.centralwidget) - self.tb_currentmodel.setReadOnly(True) - self.tb_currentmodel.setObjectName("tb_currentmodel") - self.gridLayout.addWidget(self.tb_currentmodel, 37, 6, 1, 5) + self.verticalLayout.addWidget(self.l_name) self.line_2 = QtWidgets.QFrame(self.centralwidget) self.line_2.setFrameShape(QtWidgets.QFrame.HLine) self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_2.setObjectName("line_2") - self.gridLayout.addWidget(self.line_2, 20, 12, 1, 1) - self.label_8 = QtWidgets.QLabel(self.centralwidget) - self.label_8.setObjectName("label_8") - self.gridLayout.addWidget(self.label_8, 35, 12, 1, 1) + self.verticalLayout.addWidget(self.line_2) + self.t_info = QtWidgets.QLabel(self.centralwidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.t_info.sizePolicy().hasHeightForWidth()) + self.t_info.setSizePolicy(sizePolicy) + self.t_info.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) + self.t_info.setWordWrap(True) + self.t_info.setObjectName("t_info") + self.verticalLayout.addWidget(self.t_info) + self.cb_enable = QtWidgets.QCheckBox(self.centralwidget) + self.cb_enable.setObjectName("cb_enable") + self.verticalLayout.addWidget(self.cb_enable) + self.l_value = QtWidgets.QLabel(self.centralwidget) + self.l_value.setObjectName("l_value") + self.verticalLayout.addWidget(self.l_value) + self.tb_value = QtWidgets.QLineEdit(self.centralwidget) + self.tb_value.setMaximumSize(QtCore.QSize(9999, 16777215)) + self.tb_value.setObjectName("tb_value") + self.verticalLayout.addWidget(self.tb_value) + self.slider_float = QtWidgets.QSlider(self.centralwidget) + self.slider_float.setMaximumSize(QtCore.QSize(200, 16777215)) + self.slider_float.setOrientation(QtCore.Qt.Horizontal) + self.slider_float.setObjectName("slider_float") + self.verticalLayout.addWidget(self.slider_float) + self.l_sliderfactor = QtWidgets.QLabel(self.centralwidget) + self.l_sliderfactor.setEnabled(True) + self.l_sliderfactor.setMaximumSize(QtCore.QSize(16777215, 100)) + font = QtGui.QFont() + font.setBold(False) + font.setKerning(True) + self.l_sliderfactor.setFont(font) + self.l_sliderfactor.setStyleSheet("color: #ff0000;") + self.l_sliderfactor.setWordWrap(True) + self.l_sliderfactor.setObjectName("l_sliderfactor") + self.verticalLayout.addWidget(self.l_sliderfactor) + self.b_browse = QtWidgets.QPushButton(self.centralwidget) + self.b_browse.setObjectName("b_browse") + self.verticalLayout.addWidget(self.b_browse) + self.b_usb_button = QtWidgets.QPushButton(self.centralwidget) + self.b_usb_button.setObjectName("b_usb_button") + self.verticalLayout.addWidget(self.b_usb_button) + self.drp_valuebox = QtWidgets.QComboBox(self.centralwidget) + self.drp_valuebox.setObjectName("drp_valuebox") + self.verticalLayout.addWidget(self.drp_valuebox) + self.b_update = QtWidgets.QPushButton(self.centralwidget) + self.b_update.setMaximumSize(QtCore.QSize(200, 16777215)) + self.b_update.setObjectName("b_update") + self.verticalLayout.addWidget(self.b_update) + spacerItem1 = QtWidgets.QSpacerItem(150, 300, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + self.verticalLayout.addItem(spacerItem1) self.label_7 = QtWidgets.QLabel(self.centralwidget) self.label_7.setObjectName("label_7") - self.gridLayout.addWidget(self.label_7, 34, 12, 1, 1) - self.b_revert = QtWidgets.QPushButton(self.centralwidget) - self.b_revert.setObjectName("b_revert") - self.gridLayout.addWidget(self.b_revert, 47, 0, 1, 1) - self.b_createusermodel = QtWidgets.QPushButton(self.centralwidget) - self.b_createusermodel.setObjectName("b_createusermodel") - self.gridLayout.addWidget(self.b_createusermodel, 37, 4, 1, 1) - self.drp_device = QtWidgets.QComboBox(self.centralwidget) - self.drp_device.setObjectName("drp_device") - self.gridLayout.addWidget(self.drp_device, 15, 12, 1, 1) - self.label_3 = QtWidgets.QLabel(self.centralwidget) - self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_3.setObjectName("label_3") - self.gridLayout.addWidget(self.label_3, 10, 10, 1, 1) - self.l_mode = QtWidgets.QLabel(self.centralwidget) - self.l_mode.setMaximumSize(QtCore.QSize(150, 16777215)) - self.l_mode.setObjectName("l_mode") - self.gridLayout.addWidget(self.l_mode, 10, 12, 1, 1) - self.label_6 = QtWidgets.QLabel(self.centralwidget) - self.label_6.setObjectName("label_6") - self.gridLayout.addWidget(self.label_6, 10, 6, 1, 1) - self.label_4 = QtWidgets.QLabel(self.centralwidget) - self.label_4.setObjectName("label_4") - self.gridLayout.addWidget(self.label_4, 10, 0, 1, 1) - self.label_5 = QtWidgets.QLabel(self.centralwidget) - self.label_5.setObjectName("label_5") - self.gridLayout.addWidget(self.label_5, 10, 4, 1, 1) - self.b_deleteModel = QtWidgets.QPushButton(self.centralwidget) - self.b_deleteModel.setEnabled(False) - self.b_deleteModel.setObjectName("b_deleteModel") - self.gridLayout.addWidget(self.b_deleteModel, 47, 4, 1, 1) - self.l_manual = QtWidgets.QLabel(self.centralwidget) - self.l_manual.setTextFormat(QtCore.Qt.RichText) - self.l_manual.setAlignment(QtCore.Qt.AlignCenter) - self.l_manual.setOpenExternalLinks(True) - self.l_manual.setObjectName("l_manual") - self.gridLayout.addWidget(self.l_manual, 47, 6, 1, 1) - self.label_2 = QtWidgets.QLabel(self.centralwidget) - self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 15, 9, 1, 2) + self.verticalLayout.addWidget(self.label_7) + self.label_8 = QtWidgets.QLabel(self.centralwidget) + self.label_8.setObjectName("label_8") + self.verticalLayout.addWidget(self.label_8) + self.line_4 = QtWidgets.QFrame(self.centralwidget) + self.line_4.setFrameShape(QtWidgets.QFrame.HLine) + self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_4.setObjectName("line_4") + self.verticalLayout.addWidget(self.line_4) + self.b_getcurrentmodel = QtWidgets.QPushButton(self.centralwidget) + self.b_getcurrentmodel.setMaximumSize(QtCore.QSize(200, 16777215)) + self.b_getcurrentmodel.setObjectName("b_getcurrentmodel") + self.verticalLayout.addWidget(self.b_getcurrentmodel) + self.buttonBox = QtWidgets.QDialogButtonBox(self.centralwidget) + self.buttonBox.setMaximumSize(QtCore.QSize(200, 16777215)) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close) + self.buttonBox.setObjectName("buttonBox") + self.verticalLayout.addWidget(self.buttonBox) + self.horizontalLayout.addLayout(self.verticalLayout) + self.horizontalLayout.setStretch(0, 1) + self.verticalLayout_3.addLayout(self.horizontalLayout) SettingsWindow.setCentralWidget(self.centralwidget) self.retranslateUi(SettingsWindow) @@ -230,15 +251,22 @@ def setupUi(self, SettingsWindow): def retranslateUi(self, SettingsWindow): _translate = QtCore.QCoreApplication.translate SettingsWindow.setWindowTitle(_translate("SettingsWindow", "TelemFFB Settings Manager")) - self.l_sliderfactor.setText(_translate("SettingsWindow", "Raw value shown above. Slider ranges in the main window are multiplied by the factor value for more usable settings ranges")) + self.l_mode.setText(_translate("SettingsWindow", "Model")) + self.label_3.setText(_translate("SettingsWindow", "Edit Mode:")) + self.pb_clear.setText(_translate("SettingsWindow", "Clear Selection")) + self.label_2.setText(_translate("SettingsWindow", "Device Scope:")) + self.label_5.setText(_translate("SettingsWindow", "Class")) + self.label_4.setText(_translate("SettingsWindow", "Simulator")) self.drp_class.setItemText(1, _translate("SettingsWindow", "PropellerAircraft")) self.drp_class.setItemText(2, _translate("SettingsWindow", "TurbopropAircraft")) self.drp_class.setItemText(3, _translate("SettingsWindow", "JetAircraft")) self.drp_class.setItemText(4, _translate("SettingsWindow", "GliderAircraft")) self.drp_class.setItemText(5, _translate("SettingsWindow", "Helicopter")) self.drp_class.setItemText(6, _translate("SettingsWindow", "HPGHelicopter")) - self.t_info.setText(_translate("SettingsWindow", "gfhjfghj")) - self.cb_show_inherited.setText(_translate("SettingsWindow", "Show Defaults")) + self.drp_sim.setItemText(0, _translate("SettingsWindow", "DCS")) + self.drp_sim.setItemText(1, _translate("SettingsWindow", "IL2")) + self.drp_sim.setItemText(2, _translate("SettingsWindow", "MSFS")) + self.label_6.setText(_translate("SettingsWindow", "Model")) self.table_widget.setSortingEnabled(False) item = self.table_widget.horizontalHeaderItem(0) item.setText(_translate("SettingsWindow", "New Column")) @@ -250,29 +278,22 @@ def retranslateUi(self, SettingsWindow): item.setText(_translate("SettingsWindow", "New Column")) item = self.table_widget.horizontalHeaderItem(4) item.setText(_translate("SettingsWindow", "New Column")) - self.pb_clear.setText(_translate("SettingsWindow", "Clear Selection")) - self.b_browse.setText(_translate("SettingsWindow", "Browse...")) - self.cb_enable.setText(_translate("SettingsWindow", "Enable")) - self.b_update.setText(_translate("SettingsWindow", "Update Value")) - self.label.setText(_translate("SettingsWindow", "Current Aircraft:")) - self.l_displayname.setText(_translate("SettingsWindow", "Select a Row to Edit")) - self.b_usb_button.setText(_translate("SettingsWindow", "PushButton")) - self.l_value.setText(_translate("SettingsWindow", "Value:")) - self.b_getcurrentmodel.setText(_translate("SettingsWindow", "Get Current Model")) - self.l_name.setText(_translate("SettingsWindow", "TextLabel")) - self.drp_sim.setItemText(0, _translate("SettingsWindow", "DCS")) - self.drp_sim.setItemText(1, _translate("SettingsWindow", "IL2")) - self.drp_sim.setItemText(2, _translate("SettingsWindow", "MSFS")) self.tb_currentmodel.setText(_translate("SettingsWindow", "Wilga 80X")) - self.label_8.setText(_translate("SettingsWindow", "to allow selection and editing")) - self.label_7.setText(_translate("SettingsWindow", "Source checkbox must be checked")) self.b_revert.setText(_translate("SettingsWindow", "Revert Changes")) self.b_createusermodel.setText(_translate("SettingsWindow", "Create Model Setting")) - self.label_3.setText(_translate("SettingsWindow", "Edit Mode:")) - self.l_mode.setText(_translate("SettingsWindow", "Model")) - self.label_6.setText(_translate("SettingsWindow", "Model")) - self.label_4.setText(_translate("SettingsWindow", "Simulator")) - self.label_5.setText(_translate("SettingsWindow", "Class")) self.b_deleteModel.setText(_translate("SettingsWindow", "Delete User Model")) + self.cb_show_inherited.setText(_translate("SettingsWindow", "Show Defaults")) + self.label.setText(_translate("SettingsWindow", "Current Aircraft:")) self.l_manual.setText(_translate("SettingsWindow", "Read manual for details")) - self.label_2.setText(_translate("SettingsWindow", "Device Scope:")) + self.l_displayname.setText(_translate("SettingsWindow", "Select a Row to Edit")) + self.l_name.setText(_translate("SettingsWindow", "TextLabel")) + self.t_info.setText(_translate("SettingsWindow", "Desc")) + self.cb_enable.setText(_translate("SettingsWindow", "Enable")) + self.l_value.setText(_translate("SettingsWindow", "Value:")) + self.l_sliderfactor.setText(_translate("SettingsWindow", "Raw value shown above. Slider ranges in the main window are multiplied by the factor value for more usable settings ranges")) + self.b_browse.setText(_translate("SettingsWindow", "Browse...")) + self.b_usb_button.setText(_translate("SettingsWindow", "PushButton")) + self.b_update.setText(_translate("SettingsWindow", "Update Value")) + self.label_7.setText(_translate("SettingsWindow", "Source checkbox must be checked")) + self.label_8.setText(_translate("SettingsWindow", "to allow selection and editing")) + self.b_getcurrentmodel.setText(_translate("SettingsWindow", "Get Current Model"))