프로젝트

일반

사용자정보

개정판 16ddb6fb

ID16ddb6fb045d753bc15dd0ba2ece42e9cce9a520
상위 67a66128
하위 584d961b

함의성이(가) 6년 이상 전에 추가함

issue #665:

차이점 보기:

DTI_PID/DTI_PID/ItemDataFormatDialog.py
105 105
            self.tableWidgets[index].setHorizontalHeaderLabels(self.columnOrder[index])
106 106
            self.tableWidgets[index].horizontalHeader().sectionClicked.connect(self.sections[index])
107 107
            self.deleteButtons[index].clicked.connect(self.deletes[index])
108
            self.addButtons[index].clikced.connet(self.adds[index])
108 109
            for listIndex in range(len(self.columnOrder[index])):
109 110
                self.tableWidgets[index].horizontalHeaderItem(listIndex).setSizeHint(QSize(25, 25))
110 111
                self.tableWidgets[index].setColumnWidth(listIndex, len(self.columnOrder[index][listIndex]) * 8 + 10)
......
146 147
        @date       2018.10.25
147 148
    '''
148 149
    def listItemDoubleClicked(self, table, item):
149
        print(table.objectName() + ' : ' + item.text())
150 150
        for index in range(table.columnCount()):
151 151
            if item.text() == table.horizontalHeaderItem(index).text():
152 152
                return
......
194 194
            self.addMessage.emit(MessageType.Error, message)
195 195

  
196 196
    '''
197
        @brief      table section clicked event, set selected column
197
        @brief      add column by button clicked
198
        @author     euisung
199
        @date       2018.10.25
200
    '''
201
    def addClicked(self, table, attList):
202
        for index in range(table.columnCount()):
203
            if item.text() == table.horizontalHeaderItem(index).text():
204
                return
205
        table.setColumnCount(table.columnCount() + 1)
206
        table.setHorizontalHeaderItem(table.columnCount() - 1, QTableWidgetItem(item.text()))
207
        table.horizontalHeader().moveSection(table.columnCount() - 1, 1)
208

  
209

  
210
        table.removeColumn(table.currentColumn())
211
        self.selectedCol = []
212

  
213
    def lineAddClicked(self):
214
        self.addClicked(self.tableWidgets[0], self.listWidgets[0])
215

  
216
    def equipmentAddClicked(self):
217
        self.addClicked(self.tableWidgets[1])
218

  
219
    def valveAddClicked(self):
220
        self.addClicked(self.tableWidgets[2])
221

  
222
    def instrumentAddClicked(self):
223
        self.addClicked(self.tableWidgets[3])
224

  
225
    def noteAddClicked(self):
226
        self.addClicked(self.tableWidgets[4])
227

  
228
    '''
229
        @brief      delete column by button clicked
198 230
        @author     euisung
199 231
        @date       2018.10.25
200 232
    '''

내보내기 Unified diff

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