개정판 2909e094
fixed issue #563: 연결된 Component를 기준으로 라인 타입을 인식한다
Change-Id: I45be3e69a9fb5eae48acdda07b7c3970f3642695
DTI_PID/DTI_PID/ConfigurationDialog.py | ||
---|---|---|
1 | 1 |
# coding: utf-8 |
2 |
""" |
|
3 |
This is Configuratio dialog module |
|
4 |
""" |
|
2 |
""" This is Configuratio dialog module """ |
|
5 | 3 |
|
6 | 4 |
import os |
7 | 5 |
import sys |
... | ... | |
142 | 140 |
configs = docData.getConfigs('LineTypes') |
143 | 141 |
|
144 | 142 |
lineTypes = docData.getLineTypes() |
145 |
self.ui.tableWidgetLineTypes.setColumnCount(5)
|
|
146 |
self.ui.tableWidgetLineTypes.setHorizontalHeaderLabels(['Name', 'Color', 'Width', 'Style', 'Opacity'])
|
|
143 |
self.ui.tableWidgetLineTypes.setColumnCount(6)
|
|
144 |
self.ui.tableWidgetLineTypes.setHorizontalHeaderLabels([self.tr('Name'), self.tr('Color'), self.tr('Width'), self.tr('Style'), self.tr('Opacity'), self.tr('Conditions')])
|
|
147 | 145 |
self.ui.tableWidgetLineTypes.setRowCount(len(lineTypes)) |
148 | 146 |
row = 0 |
149 | 147 |
for lineType in lineTypes: |
... | ... | |
153 | 151 |
|
154 | 152 |
matches = [config for config in configs if config.key == lineType] |
155 | 153 |
|
156 |
# Color
|
|
154 |
"""" Color """
|
|
157 | 155 |
color_cell = QTableWidgetItem('') |
158 | 156 |
color_cell.setFlags(Qt.ItemIsEnabled) |
159 | 157 |
if matches: |
... | ... | |
163 | 161 |
color_cell.setBackground(Qt.blue) |
164 | 162 |
self.ui.tableWidgetLineTypes.setItem(row, 1, color_cell) |
165 | 163 |
|
166 |
### line width
|
|
164 |
""" line width """
|
|
167 | 165 |
lineWidthSpinBox = QSpinBox() |
168 | 166 |
lineWidthSpinBox.setRange(1, 25) |
169 | 167 |
lineWidthSpinBox.setSingleStep(1) |
... | ... | |
174 | 172 |
lineWidthSpinBox.setValue(5) |
175 | 173 |
self.ui.tableWidgetLineTypes.setCellWidget(row, 2, lineWidthSpinBox) |
176 | 174 |
|
177 |
## line style
|
|
175 |
""" line style """
|
|
178 | 176 |
lineStyleComboBox = QComboBox() |
179 | 177 |
lineStyleComboBox.addItems(['SolidLine', 'DashLine', 'DotLine', 'DashDotLine', 'DashDotDotLine', 'CustomDashLine']) |
180 | 178 |
if matches: |
... | ... | |
185 | 183 |
lineStyleComboBox.setCurrentText(matches[0].value.split(',')[1]) if matches else lineStyleComboBox.setCurrentText('SolidLine') |
186 | 184 |
self.ui.tableWidgetLineTypes.setCellWidget(row, 3, lineStyleComboBox) |
187 | 185 |
|
188 |
### line transparent
|
|
186 |
""" line transparent """
|
|
189 | 187 |
lineTransparentSpinBox = QSpinBox() |
190 | 188 |
lineTransparentSpinBox.setRange(10, 100) |
191 | 189 |
lineTransparentSpinBox.setSingleStep(10) |
... | ... | |
196 | 194 |
lineTransparentSpinBox.setValue(100) |
197 | 195 |
self.ui.tableWidgetLineTypes.setCellWidget(row, 4, lineTransparentSpinBox) |
198 | 196 |
|
197 |
conditions_button = QPushButton() |
|
198 |
conditions_button.setText('...') |
|
199 |
self.ui.tableWidgetLineTypes.setCellWidget(row, 5, conditions_button) |
|
200 |
|
|
199 | 201 |
row += 1 |
200 | 202 |
|
201 | 203 |
self.ui.tableWidgetLineTypes.horizontalHeaderItem(0).setSizeHint(QSize(30, 30)) |
내보내기 Unified diff