133 } |
134 } |
134 break; |
135 break; |
135 } |
136 } |
136 |
137 |
137 default: |
138 default: |
138 critical (fmt ("Unhandled LDObject type %1 (%2) in AddObjectDialog", (int) type, g_saObjTypeNames[type])); |
139 critical (fmt ("Unhandled LDObject type %1 (%2) in AddObjectDialog", (int) type, typeName)); |
139 return; |
140 return; |
140 } |
141 } |
141 |
142 |
142 QPixmap icon = getIcon (fmt ("add-%1", g_saObjTypeIcons[type])); |
143 QPixmap icon = getIcon (fmt ("add-%1", typeName)); |
143 LDObject* defaults = LDObject::getDefault (type); |
144 LDObject* defaults = LDObject::getDefault (type); |
144 |
145 |
145 lb_typeIcon = new QLabel; |
146 lb_typeIcon = new QLabel; |
146 lb_typeIcon->setPixmap (icon); |
147 lb_typeIcon->setPixmap (icon); |
147 |
148 |
228 qCoordLayout->addWidget (dsb_coords[i], (i / 3), (i % 3)); |
229 qCoordLayout->addWidget (dsb_coords[i], (i / 3), (i % 3)); |
229 |
230 |
230 layout->addLayout (qCoordLayout, 0, 1, (coordCount / 3), 3); |
231 layout->addLayout (qCoordLayout, 0, 1, (coordCount / 3), 3); |
231 } |
232 } |
232 |
233 |
233 layout->addWidget (makeButtonBox (*this), 5, 0, 1, 4); |
234 layout->addWidget( makeButtonBox( *this ), 5, 0, 1, 4 ); |
234 setLayout (layout); |
235 setLayout( layout ); |
235 setWindowTitle (fmt (APPNAME ": New %1", |
236 setWindowTitle( fmt( tr( "Edit %1" ), typeName )); |
236 g_saObjTypeNames[type])); |
|
237 |
237 |
238 setWindowIcon (icon); |
238 setWindowIcon (icon); |
239 delete defaults; |
239 delete defaults; |
240 } |
240 } |
241 |
241 |