프로젝트

일반

사용자정보

개정판 17bd1105

ID17bd1105bcc21b0048ab5165cf55fdbc45b7fbb3
상위 a20d350f
하위 90a63b71

gaqhf 이(가) 6년 이상 전에 추가함

dev issue #640: add combobox and edit ui

차이점 보기:

DTI_PID/DTI_PID/AttrEditor_UI.py
1 1
# -*- coding: utf-8 -*-
2 2

  
3
# Form implementation generated from reading ui file '.\ui\AttrEditor.ui'
3
# Form implementation generated from reading ui file './UI/AttrEditor.ui'
4 4
#
5
# Created by: PyQt5 UI code generator 5.10.1
5
# Created by: PyQt5 UI code generator 5.9.2
6 6
#
7 7
# WARNING! All changes made in this file will be lost!
8 8

  
......
27 27
        self.verticalLayout.setObjectName("verticalLayout")
28 28
        self.horizontalLayout = QtWidgets.QHBoxLayout()
29 29
        self.horizontalLayout.setObjectName("horizontalLayout")
30
        self.labelSelectedSymbolType = QtWidgets.QLabel(self.groupBox)
31
        self.labelSelectedSymbolType.setObjectName("labelSelectedSymbolType")
32
        self.horizontalLayout.addWidget(self.labelSelectedSymbolType)
30
        self.comboBoxSymbolType = QtWidgets.QComboBox(self.groupBox)
31
        self.comboBoxSymbolType.setObjectName("comboBoxSymbolType")
32
        self.horizontalLayout.addWidget(self.comboBoxSymbolType)
33 33
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
34 34
        self.horizontalLayout.addItem(spacerItem)
35 35
        self.pushButtonAddAttr = QtWidgets.QPushButton(self.groupBox)
......
61 61
        _translate = QtCore.QCoreApplication.translate
62 62
        AttrEditorDialog.setWindowTitle(_translate("AttrEditorDialog", "속성 편집"))
63 63
        self.groupBox.setTitle(_translate("AttrEditorDialog", "속성"))
64
        self.labelSelectedSymbolType.setText(_translate("AttrEditorDialog", "Selected Symbol Type"))
65 64
        self.pushButtonAddAttr.setText(_translate("AttrEditorDialog", "+"))
66 65
        self.pushButtonDelAttr.setText(_translate("AttrEditorDialog", "-"))
67 66

  
DTI_PID/DTI_PID/SymbolAttrEditorDialog.py
28 28
        self.ui.horizontalLayout_2.addWidget(self.ui.tableWidgetAttr)
29 29
        ## up to here
30 30

  
31
        self.ui.labelSelectedSymbolType.setText(symbolType[2])
31
        #
32
        self.settingComboBoxSymbolType(symbolType[2])
33
        #
34

  
35
        #self.ui.labelSelectedSymbolType.setText(symbolType[2])
32 36

  
33 37
        self.ui.pushButtonAddAttr.clicked.connect(self.onAddAttr)
34 38
        self.ui.pushButtonDelAttr.clicked.connect(self.onDelAttr)
......
38 42

  
39 43
        self.loadData()
40 44

  
45

  
46
    '''
47
        @brief      setting combobox symbolType
48
        @author     kyouho
49
        @date       2018.08.16
50
    '''
51
    def settingComboBoxSymbolType(self, selectedType):
52
        docData = AppDocData.instance()
53
        comboBox = self.ui.comboBoxSymbolType
54

  
55
        symbolTypes = docData.getSymbolTypeList()
56
        for type in symbolTypes:
57
            comboBox.addItem(type[2])
58

  
59
        result = comboBox.findText(selectedType)
60
        if result != -1:
61
            comboBox.setCurrentIndex(result)
62

  
63

  
64

  
65

  
41 66
    '''
42 67
        @brief      load data
43 68
        @author     humkyung
DTI_PID/DTI_PID/UI/AttrEditor.ui
32 32
        <item>
33 33
         <layout class="QHBoxLayout" name="horizontalLayout">
34 34
          <item>
35
           <widget class="QLabel" name="labelSelectedSymbolType">
36
            <property name="text">
37
             <string>Selected Symbol Type</string>
38
            </property>
39
           </widget>
35
           <widget class="QComboBox" name="comboBoxSymbolType"/>
40 36
          </item>
41 37
          <item>
42 38
           <spacer name="horizontalSpacer">

내보내기 Unified diff