bool KivioBaseTargetStencil::loadProperties( const QDomElement &e ) { QDomNode node; QDomElement nodeE; QString nodeName; node = e.firstChild(); while( !node.isNull() ) { nodeName = node.nodeName(); nodeE = node.toElement(); if( nodeName == "KivioFillStyle" ) { m_pFillStyle->loadXML( node.toElement() ); } else if( nodeName == "KivioLineStyle" ) { m_pLineStyle->loadXML( node.toElement() ); } else if( nodeName == "KivioTextStyle" ) { m_pTextStyle->loadXML( node.toElement() ); } else if( nodeName == "KivioTargetList" ) { loadTargets( node.toElement() ); } else if( nodeName == "CustomData" ) { loadCustom( node.toElement() ); } else if( nodeName == "Geometry" ) { m_x = XmlReadFloat( nodeE, "x", 0.0f ); m_y = XmlReadFloat( nodeE, "y", 0.0f ); m_w = XmlReadFloat( nodeE, "w", 72.0f ); m_h = XmlReadFloat( nodeE, "h", 72.0f ); } node = node.nextSibling(); } return true; }
void Execute::slotNext() { switch( ui.stackedWidget->currentIndex() ) { case 0: { saveSession(); break; } case 1: { addTargetNotes(); break; } case 2: { addObservation(); ui.stackedWidget->setCurrentIndex( 1 ); ui.NextButton->setText( i18n( "Next Page >" ) ); QString prevTarget = currentTarget->name(); loadTargets(); ui.Target->setCurrentRow( findIndexOfTarget( prevTarget ), QItemSelectionModel::SelectCurrent ); selectNextTarget(); break; } } }
void Execute::init() { //initialize geo to current location of the ObservingList geo = KStarsData::Instance()->geo(); ui.Location->setText( geo->fullName() ); // JM: Aren't we suppose to take KStars time? The one returned by the OL is the time of the LAST object // in the list which doesn't make sense. /* //set the date time to the dateTime from the OL ui.Begin->setDateTime( ks->observingList()->dateTime() ); */ ui.Begin->setDateTime(KStarsData::Instance()->geo()->UTtoLT(KStarsData::Instance()->clock()->utc())); KStarsData::Instance()->logObject()->readAll(); //load Targets loadTargets(); //load Equipment loadEquipment(); //load Observers loadObservers(); if( logObject->scopeList()->isEmpty() || logObject->observerList()->isEmpty() ) { ui.hintLabel->show(); } else { ui.hintLabel->hide(); } //set Current Items loadCurrentItems(); }