프로젝트

일반

사용자정보

개정판 339ba307

ID339ba3072caefa01b6c70b26846e08d7f88feecf
상위 3eb3c614
하위 c921ff13

송근호이(가) 약 3년 전에 추가함

issue #000 HYTOS 수정
1.Export To PAP.ui 수정
2.Hytos Template db에 'PAPUploadInformation'테이블 추가

Change-Id: If0af23e151b6cbe417bdfd994aa672ef82bc0c65

차이점 보기:

HYTOS/HYTOS/Export_To_PAP.py
59 59

  
60 60
    def createEditor(self, parent, option, index):
61 61
        editor = None
62
        #Categoy
62
        item = parent.parent().model().itemFromIndex(parent.parent().model().index(index.row(), 0))
63

  
63 64
        if index.column() == 2:
64
            phases = ["Maximum Flowrate Case", "Normal Flowrate Case", "Minimum Flowrate Case"]
65
            datacase = []
65 66
            editor = QComboBox(parent)
66
            editor.addItems([str(phases[_index]) for _index in range(len(phases))])
67
            if item.text() == "Pump":
68
                datacase = ["Rated Flow Case", "Maximum Flow Case","N/A"]
69
            elif item.text() == "Compressor":
70
                datacase = ["Design Case", "N/A"]
71
                editor.setEditable(True)
72
            elif item.text() == "Valve":
73
                datacase = ["Maximum Flowrate Case", "Normal Flowrate Case", "Minimum Flowrate Case","N/A"]
74
            else:
75
                pass
76
            editor.addItems([str(datacase[_index]) for _index in range(len(datacase))])
67 77

  
68 78
        return editor if editor else super(MappingsDelegate, self).createEditor(parent, option, index)
69 79

  
HYTOS/HYTOS/Export_To_PAP_UI.py
20 20
        Dialog.setWindowIcon(icon)
21 21
        self.gridLayout_2 = QtWidgets.QGridLayout(Dialog)
22 22
        self.gridLayout_2.setObjectName("gridLayout_2")
23
        self.tableView_upload_item_list = QtWidgets.QTableView(Dialog)
24
        self.tableView_upload_item_list.setObjectName("tableView_upload_item_list")
25
        self.gridLayout_2.addWidget(self.tableView_upload_item_list, 4, 0, 1, 2)
26
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
27
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
28
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
29
        self.buttonBox.setObjectName("buttonBox")
30
        self.gridLayout_2.addWidget(self.buttonBox, 5, 0, 1, 2)
23 31
        self.label = QtWidgets.QLabel(Dialog)
24 32
        font = QtGui.QFont()
25 33
        font.setPointSize(13)
......
30 38
        self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1)
31 39
        self.gridLayout = QtWidgets.QGridLayout()
32 40
        self.gridLayout.setObjectName("gridLayout")
41
        self.btnSave = QtWidgets.QPushButton(Dialog)
42
        icon1 = QtGui.QIcon()
43
        icon1.addPixmap(QtGui.QPixmap(":/images/Save.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
44
        self.btnSave.setIcon(icon1)
45
        self.btnSave.setObjectName("btnSave")
46
        self.gridLayout.addWidget(self.btnSave, 1, 4, 1, 1)
33 47
        self.comboBox_select_PAP_Project = QtWidgets.QComboBox(Dialog)
34 48
        self.comboBox_select_PAP_Project.setMinimumSize(QtCore.QSize(200, 0))
35 49
        self.comboBox_select_PAP_Project.setObjectName("comboBox_select_PAP_Project")
......
38 52
        self.comboBox_Calculation_Case.setMinimumSize(QtCore.QSize(200, 0))
39 53
        self.comboBox_Calculation_Case.setObjectName("comboBox_Calculation_Case")
40 54
        self.gridLayout.addWidget(self.comboBox_Calculation_Case, 1, 1, 1, 1)
41
        self.label_3 = QtWidgets.QLabel(Dialog)
42
        self.label_3.setObjectName("label_3")
43
        self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1)
44 55
        self.label_2 = QtWidgets.QLabel(Dialog)
45 56
        self.label_2.setObjectName("label_2")
46 57
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
58
        self.btnSetCalculationCase = QtWidgets.QPushButton(Dialog)
59
        self.btnSetCalculationCase.setObjectName("btnSetCalculationCase")
60
        self.gridLayout.addWidget(self.btnSetCalculationCase, 1, 2, 1, 1)
61
        self.label_3 = QtWidgets.QLabel(Dialog)
62
        self.label_3.setObjectName("label_3")
63
        self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1)
47 64
        self.label_loading = QtWidgets.QLabel(Dialog)
48 65
        self.label_loading.setMinimumSize(QtCore.QSize(35, 35))
49 66
        self.label_loading.setMaximumSize(QtCore.QSize(35, 35))
50 67
        self.label_loading.setText("")
51 68
        self.label_loading.setObjectName("label_loading")
52 69
        self.gridLayout.addWidget(self.label_loading, 0, 2, 1, 1)
53
        self.gridLayout_2.addLayout(self.gridLayout, 1, 0, 1, 1)
54 70
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
55
        self.gridLayout_2.addItem(spacerItem, 1, 1, 1, 1)
56
        self.tableView_upload_item_list = QtWidgets.QTableView(Dialog)
57
        self.tableView_upload_item_list.setObjectName("tableView_upload_item_list")
58
        self.gridLayout_2.addWidget(self.tableView_upload_item_list, 2, 0, 1, 2)
59
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
60
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
61
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
62
        self.buttonBox.setObjectName("buttonBox")
63
        self.gridLayout_2.addWidget(self.buttonBox, 3, 0, 1, 2)
71
        self.gridLayout.addItem(spacerItem, 1, 3, 1, 1)
72
        self.gridLayout_2.addLayout(self.gridLayout, 1, 0, 1, 2)
64 73

  
65 74
        self.retranslateUi(Dialog)
66 75
        self.buttonBox.accepted.connect(Dialog.accept)
......
71 80
        _translate = QtCore.QCoreApplication.translate
72 81
        Dialog.setWindowTitle(_translate("Dialog", "Export to PAP"))
73 82
        self.label.setText(_translate("Dialog", "Export to PAP"))
74
        self.label_3.setText(_translate("Dialog", "PAP Project"))
83
        self.btnSave.setText(_translate("Dialog", "Save"))
75 84
        self.label_2.setText(_translate("Dialog", "Calculation Case"))
85
        self.btnSetCalculationCase.setText(_translate("Dialog", "Apply Case"))
86
        self.label_3.setText(_translate("Dialog", "PAP Project"))
76 87
import Resource_rc
HYTOS/HYTOS/UI/Export_To_PAP.ui
18 18
    <normaloff>:/images/PAP.png</normaloff>:/images/PAP.png</iconset>
19 19
  </property>
20 20
  <layout class="QGridLayout" name="gridLayout_2">
21
   <item row="4" column="0" colspan="2">
22
    <widget class="QTableView" name="tableView_upload_item_list"/>
23
   </item>
24
   <item row="5" column="0" colspan="2">
25
    <widget class="QDialogButtonBox" name="buttonBox">
26
     <property name="orientation">
27
      <enum>Qt::Horizontal</enum>
28
     </property>
29
     <property name="standardButtons">
30
      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
31
     </property>
32
    </widget>
33
   </item>
21 34
   <item row="0" column="0">
22 35
    <widget class="QLabel" name="label">
23 36
     <property name="font">
......
32 45
     </property>
33 46
    </widget>
34 47
   </item>
35
   <item row="1" column="0">
48
   <item row="1" column="0" colspan="2">
36 49
    <layout class="QGridLayout" name="gridLayout">
50
     <item row="1" column="4">
51
      <widget class="QPushButton" name="btnSave">
52
       <property name="text">
53
        <string>Save</string>
54
       </property>
55
       <property name="icon">
56
        <iconset resource="../res/Resource.qrc">
57
         <normaloff>:/images/Save.svg</normaloff>:/images/Save.svg</iconset>
58
       </property>
59
      </widget>
60
     </item>
37 61
     <item row="0" column="1">
38 62
      <widget class="QComboBox" name="comboBox_select_PAP_Project">
39 63
       <property name="minimumSize">
......
54 78
       </property>
55 79
      </widget>
56 80
     </item>
57
     <item row="0" column="0">
58
      <widget class="QLabel" name="label_3">
81
     <item row="1" column="0">
82
      <widget class="QLabel" name="label_2">
59 83
       <property name="text">
60
        <string>PAP Project</string>
84
        <string>Calculation Case</string>
61 85
       </property>
62 86
      </widget>
63 87
     </item>
64
     <item row="1" column="0">
65
      <widget class="QLabel" name="label_2">
88
     <item row="1" column="2">
89
      <widget class="QPushButton" name="btnSetCalculationCase">
66 90
       <property name="text">
67
        <string>Calculation Case</string>
91
        <string>Apply Case</string>
92
       </property>
93
      </widget>
94
     </item>
95
     <item row="0" column="0">
96
      <widget class="QLabel" name="label_3">
97
       <property name="text">
98
        <string>PAP Project</string>
68 99
       </property>
69 100
      </widget>
70 101
     </item>
......
87 118
       </property>
88 119
      </widget>
89 120
     </item>
121
     <item row="1" column="3">
122
      <spacer name="horizontalSpacer">
123
       <property name="orientation">
124
        <enum>Qt::Horizontal</enum>
125
       </property>
126
       <property name="sizeHint" stdset="0">
127
        <size>
128
         <width>40</width>
129
         <height>20</height>
130
        </size>
131
       </property>
132
      </spacer>
133
     </item>
90 134
    </layout>
91 135
   </item>
92
   <item row="1" column="1">
93
    <spacer name="horizontalSpacer">
94
     <property name="orientation">
95
      <enum>Qt::Horizontal</enum>
96
     </property>
97
     <property name="sizeHint" stdset="0">
98
      <size>
99
       <width>40</width>
100
       <height>20</height>
101
      </size>
102
     </property>
103
    </spacer>
104
   </item>
105
   <item row="2" column="0" colspan="2">
106
    <widget class="QTableView" name="tableView_upload_item_list"/>
107
   </item>
108
   <item row="3" column="0" colspan="2">
109
    <widget class="QDialogButtonBox" name="buttonBox">
110
     <property name="orientation">
111
      <enum>Qt::Horizontal</enum>
112
     </property>
113
     <property name="standardButtons">
114
      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
115
     </property>
116
    </widget>
117
   </item>
118 136
  </layout>
119 137
 </widget>
120 138
 <resources>

내보내기 Unified diff

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