프로젝트

일반

사용자정보

개정판 02d50c2c

ID02d50c2c30c52482a73cf89ae9ac6f852af91989
상위 948eb153
하위 7108869f

함의성이(가) 약 5년 전에 추가함

issue #000: add unknown item db save option

Change-Id: Ib45a9390f32f38bade8a34e83cac1a4f520ea4c3

차이점 보기:

DTI_PID/DTI_PID/ConfigurationDialog.py
300 300
        else:
301 301
            self.ui.radioButtonLoadXmlYes.setChecked(True)
302 302
            self.ui.radioButtonLoadXmlNo.setChecked(False)
303
        configs = docData.getConfigs('Data Save', 'Unknown Xml Only')
304
        if configs:
305
            size = int(configs[0].value)
306
            self.ui.radioButtonSaveUnknownYes.setChecked(True if size == 1 else False)
307
            self.ui.radioButtonSaveUnknownNo.setChecked(True if size == -1 else False)
308
        else:
309
            self.ui.radioButtonSaveUnknownYes.setChecked(True)
310
            self.ui.radioButtonSaveUnknownNo.setChecked(False)
303 311

  
304 312
        # connect signals and slots
305 313
        self.ui.pushButtonAddProperty.clicked.connect(self.addLineProperty)
......
748 756
            configs.append(Config('Text Style', 'Font Size', str(self.ui.spinBoxFontSize.value()) if self.ui.radioButtonFixedSize.isChecked() else '-1'))
749 757

  
750 758
            configs.append(Config('Data Load', 'Xml First', '1' if self.ui.radioButtonLoadXmlYes.isChecked() else '-1'))
759
            configs.append(Config('Data Save', 'Unknown Xml Only', '1' if self.ui.radioButtonSaveUnknownYes.isChecked() else '-1'))
751 760
            
752 761
            docData.saveConfigs(configs)
753 762
            docData.lineTypeConfigs = None  # clear line type configurations
DTI_PID/DTI_PID/Configuration_UI.py
560 560
        self.label_30.setObjectName("label_30")
561 561
        self.horizontalLayout_7.addWidget(self.label_30)
562 562
        self.radioButtonLoadXmlYes = QtWidgets.QRadioButton(self.groupBox_11)
563
        self.radioButtonLoadXmlYes.setAutoExclusive(True)
563 564
        self.radioButtonLoadXmlYes.setObjectName("radioButtonLoadXmlYes")
565
        self.buttonGroup = QtWidgets.QButtonGroup(ConfigurationDialog)
566
        self.buttonGroup.setObjectName("buttonGroup")
567
        self.buttonGroup.addButton(self.radioButtonLoadXmlYes)
564 568
        self.horizontalLayout_7.addWidget(self.radioButtonLoadXmlYes)
565 569
        self.radioButtonLoadXmlNo = QtWidgets.QRadioButton(self.groupBox_11)
570
        self.radioButtonLoadXmlNo.setAutoExclusive(True)
566 571
        self.radioButtonLoadXmlNo.setObjectName("radioButtonLoadXmlNo")
572
        self.buttonGroup.addButton(self.radioButtonLoadXmlNo)
567 573
        self.horizontalLayout_7.addWidget(self.radioButtonLoadXmlNo)
568 574
        self.verticalLayout_4.addLayout(self.horizontalLayout_7)
575
        self.horizontalLayout_24 = QtWidgets.QHBoxLayout()
576
        self.horizontalLayout_24.setObjectName("horizontalLayout_24")
577
        self.label_34 = QtWidgets.QLabel(self.groupBox_11)
578
        self.label_34.setObjectName("label_34")
579
        self.horizontalLayout_24.addWidget(self.label_34)
580
        self.radioButtonSaveUnknownYes = QtWidgets.QRadioButton(self.groupBox_11)
581
        self.radioButtonSaveUnknownYes.setAutoExclusive(True)
582
        self.radioButtonSaveUnknownYes.setObjectName("radioButtonSaveUnknownYes")
583
        self.buttonGroup_2 = QtWidgets.QButtonGroup(ConfigurationDialog)
584
        self.buttonGroup_2.setObjectName("buttonGroup_2")
585
        self.buttonGroup_2.addButton(self.radioButtonSaveUnknownYes)
586
        self.horizontalLayout_24.addWidget(self.radioButtonSaveUnknownYes)
587
        self.radioButtonSaveUnknownNo = QtWidgets.QRadioButton(self.groupBox_11)
588
        self.radioButtonSaveUnknownNo.setAutoExclusive(True)
589
        self.radioButtonSaveUnknownNo.setObjectName("radioButtonSaveUnknownNo")
590
        self.buttonGroup_2.addButton(self.radioButtonSaveUnknownNo)
591
        self.horizontalLayout_24.addWidget(self.radioButtonSaveUnknownNo)
592
        self.verticalLayout_4.addLayout(self.horizontalLayout_24)
569 593
        self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
570 594
        self.horizontalLayout_9.setObjectName("horizontalLayout_9")
571 595
        self.label_31 = QtWidgets.QLabel(self.groupBox_11)
......
680 704
        self.label_30.setText(_translate("ConfigurationDialog", "Load Data From XML First"))
681 705
        self.radioButtonLoadXmlYes.setText(_translate("ConfigurationDialog", "Yes"))
682 706
        self.radioButtonLoadXmlNo.setText(_translate("ConfigurationDialog", "No"))
707
        self.label_34.setText(_translate("ConfigurationDialog", "Save Unknown Item to XML Only"))
708
        self.radioButtonSaveUnknownYes.setText(_translate("ConfigurationDialog", "Yes"))
709
        self.radioButtonSaveUnknownNo.setText(_translate("ConfigurationDialog", "No"))
683 710
        self.label_31.setText(_translate("ConfigurationDialog", "Clear Drawing Access Information"))
684 711
        self.pushButtonClearAccessInfo.setText(_translate("ConfigurationDialog", "Clear"))
685 712
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabETC), _translate("ConfigurationDialog", "etc"))
DTI_PID/DTI_PID/MainWindow.py
627 627
            db_items.extend([item for item in items if type(item) is QEngineeringLineNoTextItem])
628 628
            db_items.extend([line for line in appDocData.tracerLineNos if type(line) is QEngineeringTrimLineNoTextItem])
629 629
            db_items.extend(titleBlockItems)
630
            configs = appDocData.getConfigs('Data Load', 'Xml First')
631
            if configs and int(configs[0].value) is 1:
632
                db_items.extend([item for item in items if type(item) is QEngineeringUnknownItem])
633

  
630 634
            '''
631 635
            dbItems = [item for item in items if
632 636
                       type(item) is QEngineeringInstrumentItem or type(item) is QEngineeringEquipmentItem or type(
DTI_PID/DTI_PID/UI/Configuration.ui
1168 1168
                  <property name="text">
1169 1169
                   <string>Yes</string>
1170 1170
                  </property>
1171
                  <property name="autoExclusive">
1172
                   <bool>true</bool>
1173
                  </property>
1174
                  <attribute name="buttonGroup">
1175
                   <string notr="true">buttonGroup</string>
1176
                  </attribute>
1171 1177
                 </widget>
1172 1178
                </item>
1173 1179
                <item>
......
1175 1181
                  <property name="text">
1176 1182
                   <string>No</string>
1177 1183
                  </property>
1184
                  <property name="autoExclusive">
1185
                   <bool>true</bool>
1186
                  </property>
1187
                  <attribute name="buttonGroup">
1188
                   <string notr="true">buttonGroup</string>
1189
                  </attribute>
1190
                 </widget>
1191
                </item>
1192
               </layout>
1193
              </item>
1194
              <item>
1195
               <layout class="QHBoxLayout" name="horizontalLayout_24">
1196
                <item>
1197
                 <widget class="QLabel" name="label_34">
1198
                  <property name="text">
1199
                   <string>Save Unknown Item to XML Only</string>
1200
                  </property>
1201
                 </widget>
1202
                </item>
1203
                <item>
1204
                 <widget class="QRadioButton" name="radioButtonSaveUnknownYes">
1205
                  <property name="text">
1206
                   <string>Yes</string>
1207
                  </property>
1208
                  <property name="autoExclusive">
1209
                   <bool>true</bool>
1210
                  </property>
1211
                  <attribute name="buttonGroup">
1212
                   <string notr="true">buttonGroup_2</string>
1213
                  </attribute>
1214
                 </widget>
1215
                </item>
1216
                <item>
1217
                 <widget class="QRadioButton" name="radioButtonSaveUnknownNo">
1218
                  <property name="text">
1219
                   <string>No</string>
1220
                  </property>
1221
                  <property name="autoExclusive">
1222
                   <bool>true</bool>
1223
                  </property>
1224
                  <attribute name="buttonGroup">
1225
                   <string notr="true">buttonGroup_2</string>
1226
                  </attribute>
1178 1227
                 </widget>
1179 1228
                </item>
1180 1229
               </layout>
......
1302 1351
   </hints>
1303 1352
  </connection>
1304 1353
 </connections>
1354
 <buttongroups>
1355
  <buttongroup name="buttonGroup"/>
1356
  <buttongroup name="buttonGroup_2"/>
1357
 </buttongroups>
1305 1358
</ui>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)