개정판 aba0522a
issue #000: instrument color on going and color setting dialog initial color added
Change-Id: I70cf9ec3db0b2814c381dbb58eba8897dd56f346
DTI_PID/DTI_PID/ConfigurationDialog.py | ||
---|---|---|
475 | 475 |
|
476 | 476 |
def change_instrument_color(self): |
477 | 477 |
""" change instrument's color """ |
478 |
color = QColorDialog.getColor() |
|
478 |
color = QColorDialog.getColor(self.ui.pushButtonInstrumentColor.palette().button().color())
|
|
479 | 479 |
if color.isValid(): |
480 | 480 |
item = self.ui.pushButtonInstrumentColor.setStyleSheet('background-color:{}'.format(color.name())) |
481 | 481 |
|
482 | 482 |
def cell_double_clicked(self, row, column): |
483 | 483 |
""" change line type's color or change line type's conditions """ |
484 | 484 |
if column == 1: |
485 |
color = QColorDialog.getColor() |
|
485 |
color = QColorDialog.getColor(self.ui.tableWidgetLineTypes.item(row, column).background().color())
|
|
486 | 486 |
if color.isValid(): |
487 | 487 |
item = self.ui.tableWidgetLineTypes.item(row, column) |
488 | 488 |
item.setBackground(color) |
... | ... | |
509 | 509 |
''' |
510 | 510 |
def cellDoubleClick(self, row, column): |
511 | 511 |
if column == 1: |
512 |
color = QColorDialog.getColor() |
|
512 |
color = QColorDialog.getColor(self.ui.tableWidgetColorProperty.item(row, column).background().color())
|
|
513 | 513 |
if color.isValid(): |
514 | 514 |
self.ui.tableWidgetColorProperty.setItem(row, 3, QTableWidgetItem(str(color.red()) + ',' + str(color.green()) + ',' + str(color.blue()))) |
515 | 515 |
#Table Color Setting |
DTI_PID/DTI_PID/Configuration_UI.py | ||
---|---|---|
381 | 381 |
self.gridLayout_10.setObjectName("gridLayout_10") |
382 | 382 |
self.formLayout_2 = QtWidgets.QFormLayout() |
383 | 383 |
self.formLayout_2.setObjectName("formLayout_2") |
384 |
self.label_2 = QtWidgets.QLabel(self.groupBox_2) |
|
385 |
self.label_2.setObjectName("label_2") |
|
386 |
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_2) |
|
387 |
self.spinBoxSymbolOpacity = QtWidgets.QSpinBox(self.groupBox_2) |
|
388 |
self.spinBoxSymbolOpacity.setProperty("value", 50) |
|
389 |
self.spinBoxSymbolOpacity.setObjectName("spinBoxSymbolOpacity") |
|
390 |
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.spinBoxSymbolOpacity) |
|
391 | 384 |
self.label_3 = QtWidgets.QLabel(self.groupBox_2) |
392 | 385 |
self.label_3.setObjectName("label_3") |
393 |
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_3)
|
|
386 |
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_3)
|
|
394 | 387 |
self.pushButtonInstrumentColor = QtWidgets.QPushButton(self.groupBox_2) |
395 | 388 |
self.pushButtonInstrumentColor.setText("") |
396 | 389 |
self.pushButtonInstrumentColor.setObjectName("pushButtonInstrumentColor") |
397 |
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.pushButtonInstrumentColor) |
|
390 |
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.pushButtonInstrumentColor) |
|
391 |
self.label_23 = QtWidgets.QLabel(self.groupBox_2) |
|
392 |
self.label_23.setObjectName("label_23") |
|
393 |
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_23) |
|
394 |
self.label_2 = QtWidgets.QLabel(self.groupBox_2) |
|
395 |
self.label_2.setObjectName("label_2") |
|
396 |
self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_2) |
|
397 |
self.spinBoxSymbolOpacity = QtWidgets.QSpinBox(self.groupBox_2) |
|
398 |
self.spinBoxSymbolOpacity.setProperty("value", 50) |
|
399 |
self.spinBoxSymbolOpacity.setObjectName("spinBoxSymbolOpacity") |
|
400 |
self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.spinBoxSymbolOpacity) |
|
401 |
self.pushButtonEquipColor = QtWidgets.QPushButton(self.groupBox_2) |
|
402 |
self.pushButtonEquipColor.setText("") |
|
403 |
self.pushButtonEquipColor.setObjectName("pushButtonEquipColor") |
|
404 |
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.pushButtonEquipColor) |
|
398 | 405 |
self.gridLayout_10.addLayout(self.formLayout_2, 0, 0, 1, 1) |
399 | 406 |
self.verticalLayout.addWidget(self.groupBox_2) |
400 | 407 |
self.groupBox_5 = QtWidgets.QGroupBox(self.tabDisplayOption) |
... | ... | |
544 | 551 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabTagNoRule), _translate("ConfigurationDialog", "Tag Rule")) |
545 | 552 |
self.groupBox_6.setTitle(_translate("ConfigurationDialog", "Line Style")) |
546 | 553 |
self.groupBox_2.setTitle(_translate("ConfigurationDialog", "Symbol Style")) |
547 |
self.label_2.setText(_translate("ConfigurationDialog", "Symbol Opacity : ")) |
|
548 | 554 |
self.label_3.setText(_translate("ConfigurationDialog", "Instrument Color : ")) |
555 |
self.label_23.setText(_translate("ConfigurationDialog", "Equipment Color : ")) |
|
556 |
self.label_2.setText(_translate("ConfigurationDialog", "Symbol Opacity : ")) |
|
549 | 557 |
self.groupBox_5.setTitle(_translate("ConfigurationDialog", "Text Style")) |
550 | 558 |
self.labelFontSize.setText(_translate("ConfigurationDialog", "Font Size : ")) |
551 | 559 |
self.radioButtonAutoSize.setText(_translate("ConfigurationDialog", "Auto")) |
DTI_PID/DTI_PID/UI/Configuration.ui | ||
---|---|---|
808 | 808 |
<item row="0" column="0"> |
809 | 809 |
<layout class="QFormLayout" name="formLayout_2"> |
810 | 810 |
<item row="1" column="0"> |
811 |
<widget class="QLabel" name="label_2">
|
|
811 |
<widget class="QLabel" name="label_3">
|
|
812 | 812 |
<property name="text"> |
813 |
<string>Symbol Opacity : </string>
|
|
813 |
<string>Instrument Color : </string>
|
|
814 | 814 |
</property> |
815 | 815 |
</widget> |
816 | 816 |
</item> |
817 | 817 |
<item row="1" column="1"> |
818 |
<widget class="QSpinBox" name="spinBoxSymbolOpacity">
|
|
819 |
<property name="value">
|
|
820 |
<number>50</number>
|
|
818 |
<widget class="QPushButton" name="pushButtonInstrumentColor">
|
|
819 |
<property name="text">
|
|
820 |
<string/>
|
|
821 | 821 |
</property> |
822 | 822 |
</widget> |
823 | 823 |
</item> |
824 |
<item row="0" column="0">
|
|
825 |
<widget class="QLabel" name="label_3"> |
|
824 |
<item row="2" column="0">
|
|
825 |
<widget class="QLabel" name="label_23">
|
|
826 | 826 |
<property name="text"> |
827 |
<string>Instrument Color : </string>
|
|
827 |
<string>Equipment Color : </string>
|
|
828 | 828 |
</property> |
829 | 829 |
</widget> |
830 | 830 |
</item> |
831 |
<item row="0" column="1"> |
|
832 |
<widget class="QPushButton" name="pushButtonInstrumentColor"> |
|
831 |
<item row="3" column="0"> |
|
832 |
<widget class="QLabel" name="label_2"> |
|
833 |
<property name="text"> |
|
834 |
<string>Symbol Opacity : </string> |
|
835 |
</property> |
|
836 |
</widget> |
|
837 |
</item> |
|
838 |
<item row="3" column="1"> |
|
839 |
<widget class="QSpinBox" name="spinBoxSymbolOpacity"> |
|
840 |
<property name="value"> |
|
841 |
<number>50</number> |
|
842 |
</property> |
|
843 |
</widget> |
|
844 |
</item> |
|
845 |
<item row="2" column="1"> |
|
846 |
<widget class="QPushButton" name="pushButtonEquipColor"> |
|
833 | 847 |
<property name="text"> |
834 | 848 |
<string/> |
835 | 849 |
</property> |
내보내기 Unified diff