Skip to content

Commit 2050d80

Browse files
nmaarnioLKajan
authored andcommitted
add new template attribute form
1 parent e461b25 commit 2050d80

File tree

2 files changed

+292
-3
lines changed

2 files changed

+292
-3
lines changed

arho_feature_template/gui/template_attribute_form.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
from arho_feature_template.core.template_library_config import Feature, FeatureTemplate
2424

25-
ui_path = resources.files(__package__) / "template_attribute_form.ui"
25+
ui_path = resources.files(__package__) / "template_attribute_form2.ui"
2626
FormClass, _ = uic.loadUiType(ui_path)
2727

2828

@@ -40,7 +40,7 @@ def __init__(self, feature_template_config: FeatureTemplate):
4040
self.feature_vertical_boundaries: QLineEdit
4141
self.plan_regulation_group_scrollarea: QScrollArea
4242
self.plan_regulation_group_scrollarea_contents: QWidget
43-
self.add_plan_regulation_group_btn: QPushButton
43+
# self.add_plan_regulation_group_btn: QPushButton
4444
self.button_box: QDialogButtonBox
4545

4646
# SIGNALS
@@ -52,7 +52,7 @@ def __init__(self, feature_template_config: FeatureTemplate):
5252

5353
self.setWindowTitle(feature_template_config.name)
5454
self.init_plan_regulation_groups(feature_template_config)
55-
self.init_add_plan_regulation_group_btn()
55+
# self.init_add_plan_regulation_group_btn()
5656

5757
def add_spacer(self):
5858
self.scroll_area_spacer = QSpacerItem(0, 0, QSizePolicy.Expanding, QSizePolicy.Expanding)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>template_form</class>
4+
<widget class="QDialog" name="template_form">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>757</width>
10+
<height>749</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>Template form</string>
15+
</property>
16+
<layout class="QVBoxLayout" name="verticalLayout_4">
17+
<item>
18+
<layout class="QFormLayout" name="feature_details_layout">
19+
<item row="0" column="0">
20+
<widget class="QLabel" name="feature_name_label">
21+
<property name="text">
22+
<string>Kohteen nimi</string>
23+
</property>
24+
</widget>
25+
</item>
26+
<item row="0" column="1">
27+
<widget class="QLineEdit" name="feature_name"/>
28+
</item>
29+
<item row="1" column="0">
30+
<widget class="QLabel" name="feature_description_label">
31+
<property name="text">
32+
<string>Kohteen kuvaus</string>
33+
</property>
34+
</widget>
35+
</item>
36+
<item row="1" column="1">
37+
<widget class="QLineEdit" name="feature_description"/>
38+
</item>
39+
<item row="2" column="0">
40+
<widget class="QLabel" name="feature_underground_label">
41+
<property name="text">
42+
<string>Maanalaisuus</string>
43+
</property>
44+
</widget>
45+
</item>
46+
<item row="2" column="1">
47+
<widget class="QLineEdit" name="feature_underground"/>
48+
</item>
49+
<item row="3" column="0">
50+
<widget class="QLabel" name="feature_vertical_boundaries_label">
51+
<property name="text">
52+
<string>Pystysuuntainen rajaus</string>
53+
</property>
54+
</widget>
55+
</item>
56+
<item row="3" column="1">
57+
<widget class="QLineEdit" name="feature_vertical_boundaries"/>
58+
</item>
59+
</layout>
60+
</item>
61+
<item>
62+
<spacer name="feature_details_spacer">
63+
<property name="orientation">
64+
<enum>Qt::Vertical</enum>
65+
</property>
66+
<property name="sizeType">
67+
<enum>QSizePolicy::Preferred</enum>
68+
</property>
69+
<property name="sizeHint" stdset="0">
70+
<size>
71+
<width>20</width>
72+
<height>10</height>
73+
</size>
74+
</property>
75+
</spacer>
76+
</item>
77+
<item>
78+
<widget class="Line" name="horizontal_divider">
79+
<property name="orientation">
80+
<enum>Qt::Horizontal</enum>
81+
</property>
82+
</widget>
83+
</item>
84+
<item>
85+
<spacer name="plan_regulation_group_spacer">
86+
<property name="orientation">
87+
<enum>Qt::Vertical</enum>
88+
</property>
89+
<property name="sizeType">
90+
<enum>QSizePolicy::Preferred</enum>
91+
</property>
92+
<property name="sizeHint" stdset="0">
93+
<size>
94+
<width>20</width>
95+
<height>10</height>
96+
</size>
97+
</property>
98+
</spacer>
99+
</item>
100+
<item>
101+
<layout class="QHBoxLayout" name="horizontalLayout_2">
102+
<item>
103+
<layout class="QVBoxLayout" name="verticalLayout_3">
104+
<item>
105+
<widget class="QLabel" name="label_2">
106+
<property name="text">
107+
<string>Lisää kaavamääräysryhmä</string>
108+
</property>
109+
</widget>
110+
</item>
111+
<item>
112+
<widget class="QTreeWidget" name="treeWidget">
113+
<property name="sizePolicy">
114+
<sizepolicy hsizetype="Maximum" vsizetype="Expanding">
115+
<horstretch>0</horstretch>
116+
<verstretch>0</verstretch>
117+
</sizepolicy>
118+
</property>
119+
<attribute name="headerVisible">
120+
<bool>false</bool>
121+
</attribute>
122+
<column>
123+
<property name="text">
124+
<string>1</string>
125+
</property>
126+
</column>
127+
<item>
128+
<property name="text">
129+
<string>Aluevaraukset</string>
130+
</property>
131+
<item>
132+
<property name="text">
133+
<string>Asuinrakennusten alue</string>
134+
</property>
135+
</item>
136+
<item>
137+
<property name="text">
138+
<string>Asuinkerrostalojen alue</string>
139+
</property>
140+
</item>
141+
<item>
142+
<property name="text">
143+
<string>Asuinpientalojen alue</string>
144+
</property>
145+
</item>
146+
<item>
147+
<property name="text">
148+
<string>Rivitalojen ja muiden kytkettyjen asuinrakennusten alue</string>
149+
</property>
150+
</item>
151+
<item>
152+
<property name="text">
153+
<string>Erillispientalojen alue</string>
154+
</property>
155+
</item>
156+
</item>
157+
<item>
158+
<property name="text">
159+
<string>Rakennusalat</string>
160+
</property>
161+
<item>
162+
<property name="text">
163+
<string>Kunnan tai kaupunginosas raja</string>
164+
</property>
165+
</item>
166+
<item>
167+
<property name="text">
168+
<string>Korttelialue tai korttelialueen osa</string>
169+
</property>
170+
</item>
171+
<item>
172+
<property name="text">
173+
<string>Sitovan tonttijaon mukainen tontti</string>
174+
</property>
175+
</item>
176+
<item>
177+
<property name="text">
178+
<string>Ohjeellinen tontti / rakennusala</string>
179+
</property>
180+
</item>
181+
<item>
182+
<property name="text">
183+
<string>Rakennusala</string>
184+
</property>
185+
</item>
186+
</item>
187+
<item>
188+
<property name="text">
189+
<string>Numeeriset ja tekstimuotoiset määräykset</string>
190+
</property>
191+
<item>
192+
<property name="text">
193+
<string>Kaupungin- tai kunnanosan numero</string>
194+
</property>
195+
</item>
196+
<item>
197+
<property name="text">
198+
<string>Kaupungin- tai kunnanosan nimi</string>
199+
</property>
200+
</item>
201+
<item>
202+
<property name="text">
203+
<string>Korttelin numero</string>
204+
</property>
205+
</item>
206+
<item>
207+
<property name="text">
208+
<string>Tontin tai rakennuspaikan numero</string>
209+
</property>
210+
</item>
211+
<item>
212+
<property name="text">
213+
<string>Ohjeellisen tontin tai rakennuspaikan numero</string>
214+
</property>
215+
</item>
216+
<item>
217+
<property name="text">
218+
<string>Kadun tai tien nimi</string>
219+
</property>
220+
</item>
221+
</item>
222+
</widget>
223+
</item>
224+
</layout>
225+
</item>
226+
<item>
227+
<layout class="QVBoxLayout" name="verticalLayout">
228+
<item>
229+
<widget class="QLabel" name="label">
230+
<property name="text">
231+
<string>Kaavamääräykset</string>
232+
</property>
233+
</widget>
234+
</item>
235+
<item>
236+
<widget class="QScrollArea" name="plan_regulation_group_scrollarea">
237+
<property name="widgetResizable">
238+
<bool>true</bool>
239+
</property>
240+
<widget class="QWidget" name="plan_regulation_group_scrollarea_contents">
241+
<property name="geometry">
242+
<rect>
243+
<x>0</x>
244+
<y>0</y>
245+
<width>469</width>
246+
<height>502</height>
247+
</rect>
248+
</property>
249+
<layout class="QVBoxLayout" name="verticalLayout_2"/>
250+
</widget>
251+
</widget>
252+
</item>
253+
</layout>
254+
</item>
255+
</layout>
256+
</item>
257+
<item>
258+
<layout class="QHBoxLayout" name="horizontalLayout">
259+
<item>
260+
<widget class="QDialogButtonBox" name="button_box">
261+
<property name="standardButtons">
262+
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
263+
</property>
264+
</widget>
265+
</item>
266+
</layout>
267+
</item>
268+
</layout>
269+
</widget>
270+
<resources/>
271+
<connections>
272+
<connection>
273+
<sender>button_box</sender>
274+
<signal>rejected()</signal>
275+
<receiver>template_form</receiver>
276+
<slot>reject()</slot>
277+
<hints>
278+
<hint type="sourcelabel">
279+
<x>414</x>
280+
<y>729</y>
281+
</hint>
282+
<hint type="destinationlabel">
283+
<x>319</x>
284+
<y>375</y>
285+
</hint>
286+
</hints>
287+
</connection>
288+
</connections>
289+
</ui>

0 commit comments

Comments
 (0)