Skip to content

Commit

Permalink
- adds custom blend editor for artisan.plus (closes Issue #760)
Browse files Browse the repository at this point in the history
- use dot as decimal separator everywhere
- monkey patches MPL 3.5.1 _formlayout.py:ColorButton
- allow to change simulation speed on restarting paused simulator using modifier keys
- set dirty flag on minieditor updates
  • Loading branch information
MAKOMO committed Feb 20, 2022
1 parent 8f84077 commit 12b98c4
Show file tree
Hide file tree
Showing 68 changed files with 47,509 additions and 46,097 deletions.
10 changes: 5 additions & 5 deletions src/artisanlib/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

from artisanlib.util import deltaLabelUTF8
from artisanlib.dialogs import ArtisanResizeablDialog
from artisanlib.widgets import MyQComboBox
from artisanlib.widgets import MyQComboBox, MyQDoubleSpinBox


_log: Final = logging.getLogger(__name__)
Expand All @@ -40,15 +40,15 @@
from PyQt6.QtGui import (QStandardItem, QColor) # @UnusedImport @Reimport @UnresolvedImport
from PyQt6.QtWidgets import (QApplication, QWidget, QCheckBox, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, # @UnusedImport @Reimport @UnresolvedImport
QPushButton, QSpinBox, QTabWidget, QComboBox, QDialogButtonBox, QGridLayout, # @UnusedImport @Reimport @UnresolvedImport
QGroupBox, QRadioButton, QDoubleSpinBox, QSizePolicy, # @UnusedImport @Reimport @UnresolvedImport
QGroupBox, QRadioButton, QSizePolicy, # @UnusedImport @Reimport @UnresolvedImport
QTableWidget, QMessageBox, QHeaderView) # @UnusedImport @Reimport @UnresolvedImport
except Exception:
#pylint: disable = E, W, R, C
from PyQt5.QtCore import (Qt, pyqtSlot, QSettings) # @UnusedImport @Reimport @UnresolvedImport
from PyQt5.QtGui import (QStandardItem, QColor) # @UnusedImport @Reimport @UnresolvedImport
from PyQt5.QtWidgets import (QApplication, QWidget, QCheckBox, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, # @UnusedImport @Reimport @UnresolvedImport
QPushButton, QSpinBox, QTabWidget, QComboBox, QDialogButtonBox, QGridLayout, # @UnusedImport @Reimport @UnresolvedImport
QGroupBox, QRadioButton, QDoubleSpinBox, QSizePolicy, # @UnusedImport @Reimport @UnresolvedImport
QGroupBox, QRadioButton, QSizePolicy, # @UnusedImport @Reimport @UnresolvedImport
QTableWidget, QMessageBox, QHeaderView) # @UnusedImport @Reimport @UnresolvedImport


Expand Down Expand Up @@ -436,7 +436,7 @@ def __init__(self, parent = None, aw = None, activeTab = 0):
self.dataRateCombo1045.setMaximumWidth(width)

EmissivityLabel = QLabel(QApplication.translate("Label","Emissivity"))
self.emissivitySpinBox = QDoubleSpinBox()
self.emissivitySpinBox = MyQDoubleSpinBox()
self.emissivitySpinBox.setAlignment(Qt.AlignmentFlag.AlignRight)
self.emissivitySpinBox.setRange(0.,1.)
self.emissivitySpinBox.setSingleStep(.1)
Expand Down Expand Up @@ -986,7 +986,7 @@ def __init__(self, parent = None, aw = None, activeTab = 0):
yoctoServerIdLabel = QLabel(QApplication.translate("Label","VirtualHub"))
self.yoctoServerId = QLineEdit(self.aw.qmc.yoctoServerID)
YoctoEmissivityLabel = QLabel(QApplication.translate("Label","Emissivity"))
self.yoctoEmissivitySpinBox = QDoubleSpinBox()
self.yoctoEmissivitySpinBox = MyQDoubleSpinBox()
self.yoctoEmissivitySpinBox.setAlignment(Qt.AlignmentFlag.AlignRight)
self.yoctoEmissivitySpinBox.setRange(0.,1.)
self.yoctoEmissivitySpinBox.setSingleStep(.1)
Expand Down
30 changes: 15 additions & 15 deletions src/artisanlib/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

from artisanlib.util import uchr
from artisanlib.dialogs import ArtisanResizeablDialog, ArtisanDialog
from artisanlib.widgets import MyQComboBox
from artisanlib.widgets import MyQComboBox, MyQDoubleSpinBox

from uic import SliderCalculatorDialog

Expand All @@ -37,15 +37,15 @@
from PyQt6.QtCore import (Qt, pyqtSlot, QSettings, QCoreApplication) # @UnusedImport @Reimport @UnresolvedImport
from PyQt6.QtGui import (QColor, QFont, QIntValidator) # @UnusedImport @Reimport @UnresolvedImport
from PyQt6.QtWidgets import (QApplication, QCheckBox, QComboBox, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, # @UnusedImport @Reimport @UnresolvedImport
QPushButton, QSpinBox, QDoubleSpinBox, QWidget, QTabWidget, QDialogButtonBox, # @UnusedImport @Reimport @UnresolvedImport
QPushButton, QSpinBox, QWidget, QTabWidget, QDialogButtonBox, # @UnusedImport @Reimport @UnresolvedImport
QGridLayout, QGroupBox, QTableWidget, QHeaderView, QToolButton) # @UnusedImport @Reimport @UnresolvedImport
from PyQt6 import sip # @UnusedImport @Reimport @UnresolvedImport
except Exception:
#pylint: disable = E, W, R, C
from PyQt5.QtCore import (Qt, pyqtSlot, QSettings, QCoreApplication) # @UnusedImport @Reimport @UnresolvedImport
from PyQt5.QtGui import (QColor, QFont, QIntValidator) # @UnusedImport @Reimport @UnresolvedImport
from PyQt5.QtWidgets import (QApplication, QCheckBox, QComboBox, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, # @UnusedImport @Reimport @UnresolvedImport
QPushButton, QSpinBox, QDoubleSpinBox, QWidget, QTabWidget, QDialogButtonBox, # @UnusedImport @Reimport @UnresolvedImport
QPushButton, QSpinBox, QWidget, QTabWidget, QDialogButtonBox, # @UnusedImport @Reimport @UnresolvedImport
QGridLayout, QGroupBox, QTableWidget, QHeaderView, QToolButton) # @UnusedImport @Reimport @UnresolvedImport
try:
from PyQt5 import sip # @Reimport @UnresolvedImport @UnusedImport
Expand Down Expand Up @@ -387,28 +387,28 @@ def __init__(self, parent = None, aw = None, activeTab = 0):
self.E4thicknessSpinBox.setRange(1,10)
self.E4thicknessSpinBox.setValue(int(round(self.aw.qmc.Evaluelinethickness[3])))
self.E4thicknessSpinBox.valueChanged.connect(self.setElinethickness3)
self.E1alphaSpinBox = QDoubleSpinBox()
self.E1alphaSpinBox = MyQDoubleSpinBox()
self.E1alphaSpinBox.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E1alphaSpinBox.setFocusPolicy(Qt.FocusPolicy.NoFocus)
self.E1alphaSpinBox.setRange(.1,1.)
self.E1alphaSpinBox.setSingleStep(.1)
self.E1alphaSpinBox.setValue(self.aw.qmc.Evaluealpha[0])
self.E1alphaSpinBox.valueChanged.connect(self.setElinealpha0)
self.E2alphaSpinBox = QDoubleSpinBox()
self.E2alphaSpinBox = MyQDoubleSpinBox()
self.E2alphaSpinBox.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E2alphaSpinBox.setFocusPolicy(Qt.FocusPolicy.NoFocus)
self.E2alphaSpinBox.setRange(.1,1.)
self.E2alphaSpinBox.setSingleStep(.1)
self.E2alphaSpinBox.setValue(self.aw.qmc.Evaluealpha[1])
self.E1alphaSpinBox.valueChanged.connect(self.setElinealpha1)
self.E3alphaSpinBox = QDoubleSpinBox()
self.E3alphaSpinBox = MyQDoubleSpinBox()
self.E3alphaSpinBox.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E3alphaSpinBox.setFocusPolicy(Qt.FocusPolicy.NoFocus)
self.E3alphaSpinBox.setRange(.1,1.)
self.E3alphaSpinBox.setSingleStep(.1)
self.E3alphaSpinBox.setValue(self.aw.qmc.Evaluealpha[2])
self.E3alphaSpinBox.valueChanged.connect(self.setElinealpha2)
self.E4alphaSpinBox = QDoubleSpinBox()
self.E4alphaSpinBox = MyQDoubleSpinBox()
self.E4alphaSpinBox.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E4alphaSpinBox.setFocusPolicy(Qt.FocusPolicy.NoFocus)
self.E4alphaSpinBox.setRange(.1,1.)
Expand Down Expand Up @@ -659,45 +659,45 @@ def __init__(self, parent = None, aw = None, activeTab = 0):
self.E2command = QLineEdit(self.aw.eventslidercommands[1])
self.E3command = QLineEdit(self.aw.eventslidercommands[2])
self.E4command = QLineEdit(self.aw.eventslidercommands[3])
self.E1offset = QDoubleSpinBox()
self.E1offset = MyQDoubleSpinBox()
self.E1offset.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E1offset.setRange(-9999,9999)
self.E1offset.setDecimals(2)
self.E1offset.setValue(self.aw.eventslideroffsets[0])
self.E2offset = QDoubleSpinBox()
self.E2offset = MyQDoubleSpinBox()
self.E2offset.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E2offset.setRange(-9999,9999)
self.E2offset.setDecimals(2)
self.E2offset.setValue(self.aw.eventslideroffsets[1])
self.E3offset = QDoubleSpinBox()
self.E3offset = MyQDoubleSpinBox()
self.E3offset.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E3offset.setRange(-9999,9999)
self.E3offset.setDecimals(2)
self.E3offset.setValue(self.aw.eventslideroffsets[2])
self.E4offset = QDoubleSpinBox()
self.E4offset = MyQDoubleSpinBox()
self.E4offset.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E4offset.setRange(-9999,9999)
self.E4offset.setDecimals(2)
self.E4offset.setValue(self.aw.eventslideroffsets[3])
self.E1factor = QDoubleSpinBox()
self.E1factor = MyQDoubleSpinBox()
self.E1factor.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E1factor.setRange(-999,999)
self.E1factor.setDecimals(4)
self.E1factor.setValue(self.aw.eventsliderfactors[0])
self.E1factor.setMaximumWidth(70)
self.E2factor = QDoubleSpinBox()
self.E2factor = MyQDoubleSpinBox()
self.E2factor.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E2factor.setRange(-999,999)
self.E2factor.setDecimals(4)
self.E2factor.setValue(self.aw.eventsliderfactors[1])
self.E2factor.setMaximumWidth(70)
self.E3factor = QDoubleSpinBox()
self.E3factor = MyQDoubleSpinBox()
self.E3factor.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E3factor.setRange(-999,999)
self.E3factor.setDecimals(4)
self.E3factor.setValue(self.aw.eventsliderfactors[2])
self.E3factor.setMaximumWidth(70)
self.E4factor = QDoubleSpinBox()
self.E4factor = MyQDoubleSpinBox()
self.E4factor.setAlignment(Qt.AlignmentFlag.AlignRight)
self.E4factor.setRange(-999,999)
self.E4factor.setDecimals(4)
Expand Down
Loading

0 comments on commit 12b98c4

Please sign in to comment.