프로젝트

일반

사용자정보

개정판 0d6d3734

ID0d6d373451f9384afe1ed031581ef4f8194dde17
상위 14540282
하위 df0c7400, 2e65c2a7

백흠경이(가) 약 5년 전에 추가함

issue #1221: 프로젝트 폴더 아래에 Datasheets 폴더를 생성한다.

Change-Id: I8b5aaa61f4bbef2ae883c044c53e3aaa4efd6460

차이점 보기:

DTI_PID/DTI_PID/EqpDatasheetExportDialog.py
26 26
        pass
27 27

  
28 28
    def accept(self):
29
        """ export selected drawing to xml file """
30
        from AppDocData import Config
31
        from AppDatabase import AppDatabase
29
        """ export selected equipments to excel file """
32 30

  
33 31
        try:
32
            types = []
33
            for index in range(self.ui.listWidgetEquipmentType.count()):
34
                if self.ui.listWidgetEquipmentType.item(index).checkState() == Qt.Checked:
35
                    types.append(self.ui.listWidgetEquipmentType.item(index).text())
36

  
37
            if types:
38
                app_doc_data = AppDocData.instance()
39
                equipments = app_doc_data.get_equipment_data_list()
40
                for _type in types:
41
                    equipment = [attrs for attrs in equipments if [attr for attr in attrs if attr[0] == 'Type' and
42
                                                                   attr[1] == _type]]
43
                    if equipment:
44
                        self.export_equipment_data_sheet(equipment, _type)
45

  
34 46
            QDialog.accept(self)
35 47
        except Exception as ex:
36 48
            from App import App
37 49
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)
38
            App.mainWnd().addMessage.emit(MessageType.Error, message)
50
            App.mainWnd().addMessage.emit(MessageType.Error, message)
51

  
52
    def export_equipment_data_sheet(self, equipments, _type):
53
        """ export given equipments to data sheet """
54

  
55
        pass

내보내기 Unified diff

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