Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/observatory/observatory.cpp
Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Line(s) | 189 | { | |||
---|---|---|---|---|---|
190 | shutterBox->setVisible(false); | 190 | shutterBox->setVisible(false); | ||
191 | weatherWarningShutterCB->setVisible(false); | 191 | weatherWarningShutterCB->setVisible(false); | ||
192 | weatherAlertShutterCB->setVisible(false); | 192 | weatherAlertShutterCB->setVisible(false); | ||
193 | useShutterCB->setVisible(false); | 193 | useShutterCB->setVisible(false); | ||
194 | } | 194 | } | ||
195 | 195 | | |||
196 | // abort button should always be available | 196 | // abort button should always be available | ||
197 | motionAbortButton->setEnabled(true); | 197 | motionAbortButton->setEnabled(true); | ||
198 | // update the dome status | 198 | // update the dome parking status | ||
199 | setDomeStatus(getDomeModel()->status()); | | |||
200 | setDomeParkStatus(getDomeModel()->parkStatus()); | 199 | setDomeParkStatus(getDomeModel()->parkStatus()); | ||
201 | } | 200 | } | ||
202 | 201 | | |||
203 | } | 202 | } | ||
204 | 203 | | |||
205 | void Observatory::shutdownDome() | 204 | void Observatory::shutdownDome() | ||
206 | { | 205 | { | ||
207 | domeBox->setEnabled(false); | 206 | domeBox->setEnabled(false); | ||
Show All 10 Lines | |||||
218 | 217 | | |||
219 | void Observatory::setDomeStatus(ISD::Dome::Status status) | 218 | void Observatory::setDomeStatus(ISD::Dome::Status status) | ||
220 | { | 219 | { | ||
221 | qCDebug(KSTARS_EKOS_OBSERVATORY) << "Setting dome status to " << status; | 220 | qCDebug(KSTARS_EKOS_OBSERVATORY) << "Setting dome status to " << status; | ||
222 | 221 | | |||
223 | switch (status) | 222 | switch (status) | ||
224 | { | 223 | { | ||
225 | case ISD::Dome::DOME_ERROR: | 224 | case ISD::Dome::DOME_ERROR: | ||
225 | appendLogText(i18n("%1 error. See INDI log for details.", getDomeModel()->isRolloffRoof() ? i18n("Rolloff roof") : i18n("Dome"))); | ||||
mutlaqja: I think you need i18n around rolloff roof and dome | |||||
226 | motionCWButton->setChecked(false); | ||||
227 | motionCCWButton->setChecked(false); | ||||
226 | break; | 228 | break; | ||
229 | | ||||
227 | case ISD::Dome::DOME_IDLE: | 230 | case ISD::Dome::DOME_IDLE: | ||
228 | motionCWButton->setChecked(false); | 231 | motionCWButton->setChecked(false); | ||
229 | motionCWButton->setEnabled(true); | 232 | motionCWButton->setEnabled(true); | ||
230 | motionCCWButton->setChecked(false); | 233 | motionCCWButton->setChecked(false); | ||
231 | motionCCWButton->setEnabled(true); | 234 | motionCCWButton->setEnabled(true); | ||
232 | 235 | | |||
233 | appendLogText(i18n("Dome is idle.")); | 236 | appendLogText(i18n("%1 is idle.", getDomeModel()->isRolloffRoof() ? i18n("Rolloff roof") : i18n("Dome"))); | ||
mutlaqja: This one too. | |||||
234 | break; | 237 | break; | ||
235 | 238 | | |||
236 | case ISD::Dome::DOME_MOVING_CW: | 239 | case ISD::Dome::DOME_MOVING_CW: | ||
237 | motionCWButton->setChecked(true); | 240 | motionCWButton->setChecked(true); | ||
238 | motionCCWButton->setEnabled(true); | 241 | motionCWButton->setEnabled(false); | ||
239 | motionCCWButton->setChecked(false); | 242 | motionCCWButton->setChecked(false); | ||
243 | motionCCWButton->setEnabled(true); | ||||
240 | if (getDomeModel()->isRolloffRoof()) | 244 | if (getDomeModel()->isRolloffRoof()) | ||
241 | { | 245 | { | ||
242 | domeAzimuthPosition->setText(i18n("Opening")); | 246 | domeAzimuthPosition->setText(i18n("Opening")); | ||
243 | toggleButtons(domeUnpark, i18n("Unparking"), domePark, i18n("Park")); | 247 | toggleButtons(domeUnpark, i18n("Unparking"), domePark, i18n("Park")); | ||
244 | appendLogText(i18n("Dome is opening...")); | 248 | appendLogText(i18n("Rolloff roof opening...")); | ||
245 | } | 249 | } | ||
246 | else | 250 | else | ||
247 | { | 251 | { | ||
248 | appendLogText(i18n("Dome is moving clockwise...")); | 252 | appendLogText(i18n("Dome is moving clockwise...")); | ||
249 | } | 253 | } | ||
250 | break; | 254 | break; | ||
251 | 255 | | |||
252 | case ISD::Dome::DOME_MOVING_CCW: | 256 | case ISD::Dome::DOME_MOVING_CCW: | ||
253 | motionCWButton->setChecked(false); | 257 | motionCWButton->setChecked(false); | ||
254 | motionCWButton->setEnabled(true); | 258 | motionCWButton->setEnabled(true); | ||
255 | motionCCWButton->setChecked(true); | 259 | motionCCWButton->setChecked(true); | ||
260 | motionCCWButton->setEnabled(false); | ||||
256 | if (getDomeModel()->isRolloffRoof()) | 261 | if (getDomeModel()->isRolloffRoof()) | ||
257 | { | 262 | { | ||
258 | domeAzimuthPosition->setText(i18n("Closing")); | 263 | domeAzimuthPosition->setText(i18n("Closing")); | ||
259 | toggleButtons(domePark, i18n("Parking"), domeUnpark, i18n("Unpark")); | 264 | toggleButtons(domePark, i18n("Parking"), domeUnpark, i18n("Unpark")); | ||
260 | appendLogText(i18n("Dome is closing...")); | 265 | appendLogText(i18n("Rolloff roof is closing...")); | ||
261 | } | 266 | } | ||
262 | else | 267 | else | ||
263 | { | 268 | { | ||
264 | appendLogText(i18n("Dome is moving counter clockwise...")); | 269 | appendLogText(i18n("Dome is moving counter clockwise...")); | ||
265 | } | 270 | } | ||
266 | break; | 271 | break; | ||
267 | 272 | | |||
268 | case ISD::Dome::DOME_PARKED: | 273 | case ISD::Dome::DOME_PARKED: | ||
269 | setDomeParkStatus(ISD::PARK_PARKED); | 274 | setDomeParkStatus(ISD::PARK_PARKED); | ||
270 | 275 | | |||
271 | appendLogText(i18n("Dome is parked.")); | 276 | appendLogText(i18n("%1 is parked.", getDomeModel()->isRolloffRoof() ? i18n("Rolloff roof") : i18n("Dome"))); | ||
mutlaqja: Ditto | |||||
272 | break; | 277 | break; | ||
273 | 278 | | |||
274 | case ISD::Dome::DOME_PARKING: | 279 | case ISD::Dome::DOME_PARKING: | ||
275 | toggleButtons(domePark, i18n("Parking"), domeUnpark, i18n("Unpark")); | 280 | toggleButtons(domePark, i18n("Parking"), domeUnpark, i18n("Unpark")); | ||
276 | motionCWButton->setEnabled(true); | 281 | motionCWButton->setEnabled(true); | ||
277 | 282 | | |||
278 | if (getDomeModel()->isRolloffRoof()) | 283 | if (getDomeModel()->isRolloffRoof()) | ||
279 | domeAzimuthPosition->setText(i18n("Closing")); | 284 | domeAzimuthPosition->setText(i18n("Closing")); | ||
280 | else | 285 | else | ||
281 | enableMotionControl(false); | 286 | enableMotionControl(false); | ||
282 | 287 | | |||
283 | motionCWButton->setChecked(false); | 288 | motionCWButton->setChecked(false); | ||
284 | motionCCWButton->setChecked(true); | 289 | motionCCWButton->setChecked(true); | ||
285 | 290 | | |||
286 | appendLogText(i18n("Dome is parking...")); | 291 | appendLogText(i18n("%1 is parking...", getDomeModel()->isRolloffRoof() ? i18n("Rolloff roof") : i18n("Dome"))); | ||
mutlaqja: Same | |||||
287 | break; | 292 | break; | ||
288 | 293 | | |||
289 | case ISD::Dome::DOME_UNPARKING: | 294 | case ISD::Dome::DOME_UNPARKING: | ||
290 | toggleButtons(domeUnpark, i18n("Unparking"), domePark, i18n("Park")); | 295 | toggleButtons(domeUnpark, i18n("Unparking"), domePark, i18n("Park")); | ||
291 | motionCCWButton->setEnabled(true); | 296 | motionCCWButton->setEnabled(true); | ||
292 | 297 | | |||
293 | if (getDomeModel()->isRolloffRoof()) | 298 | if (getDomeModel()->isRolloffRoof()) | ||
294 | domeAzimuthPosition->setText(i18n("Opening")); | 299 | domeAzimuthPosition->setText(i18n("Opening")); | ||
295 | else | 300 | else | ||
296 | enableMotionControl(false); | 301 | enableMotionControl(false); | ||
297 | 302 | | |||
298 | motionCWButton->setChecked(true); | 303 | motionCWButton->setChecked(true); | ||
299 | motionCCWButton->setChecked(false); | 304 | motionCCWButton->setChecked(false); | ||
300 | 305 | | |||
301 | appendLogText(i18n("Dome is unparking...")); | 306 | appendLogText(i18n("%1 is unparking...", getDomeModel()->isRolloffRoof() ? i18n("Rolloff roof") : i18n("Dome"))); | ||
mutlaqja: ...etc. | |||||
302 | break; | 307 | break; | ||
303 | 308 | | |||
304 | case ISD::Dome::DOME_TRACKING: | 309 | case ISD::Dome::DOME_TRACKING: | ||
305 | enableMotionControl(true); | 310 | enableMotionControl(true); | ||
306 | motionCWButton->setEnabled(true); | 311 | motionCWButton->setEnabled(true); | ||
307 | motionCCWButton->setChecked(true); | 312 | motionCCWButton->setChecked(true); | ||
308 | appendLogText(i18n("Dome is tracking.")); | 313 | appendLogText(i18n("%1 is tracking.", getDomeModel()->isRolloffRoof() ? i18n("Rolloff roof") : i18n("Dome"))); | ||
309 | break; | 314 | break; | ||
310 | } | 315 | } | ||
311 | } | 316 | } | ||
312 | 317 | | |||
313 | void Observatory::setDomeParkStatus(ISD::ParkStatus status) | 318 | void Observatory::setDomeParkStatus(ISD::ParkStatus status) | ||
314 | { | 319 | { | ||
315 | qCDebug(KSTARS_EKOS_OBSERVATORY) << "Setting dome park status to " << status; | 320 | qCDebug(KSTARS_EKOS_OBSERVATORY) << "Setting dome park status to " << status; | ||
316 | switch (status) | 321 | switch (status) | ||
317 | { | 322 | { | ||
318 | case ISD::PARK_UNPARKED: | 323 | case ISD::PARK_UNPARKED: | ||
319 | activateButton(domePark, i18n("Park")); | 324 | activateButton(domePark, i18n("Park")); | ||
320 | buttonPressed(domeUnpark, i18n("Unparked")); | 325 | buttonPressed(domeUnpark, i18n("Unparked")); | ||
321 | motionCWButton->setChecked(false); | 326 | motionCWButton->setChecked(false); | ||
322 | motionCWButton->setEnabled(false); | 327 | motionCWButton->setEnabled(true); | ||
323 | motionCCWButton->setChecked(false); | 328 | motionCCWButton->setChecked(false); | ||
324 | 329 | | |||
325 | if (getDomeModel()->isRolloffRoof()) | 330 | if (getDomeModel()->isRolloffRoof()) | ||
326 | domeAzimuthPosition->setText(i18n("Open")); | 331 | domeAzimuthPosition->setText(i18n("Open")); | ||
327 | else | 332 | else | ||
328 | enableMotionControl(true); | 333 | enableMotionControl(true); | ||
329 | break; | 334 | break; | ||
330 | 335 | | |||
▲ Show 20 Lines • Show All 317 Lines • Show Last 20 Lines |
I think you need i18n around rolloff roof and dome