Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "satitem.h"
- #include <GeoDataStyle.h>
- #include <GeoDataDocument.h>
- #include <QDebug>
- SatItem::SatItem(const MarbleClock* clock, GeoDataTreeModel* geoDataTreeModel)
- : i(0),
- m_clock(clock)
- {
- //m_track_line_string = new GeoDataLineString();
- m_track = new GeoDataTrack();
- QString satelliteName("test");
- geoDataPlacemark = new GeoDataPlacemark(satelliteName);
- geoDataPlacemark->setVisualCategory( GeoDataFeature::Satellite );
- //geoDataPlacemark->setGeometry( m_track_line_string );
- geoDataPlacemark->setGeometry( m_track );
- GeoDataStyle *style = new GeoDataStyle( *geoDataPlacemark->style() );
- geoDataPlacemark->setStyle( style );
- geoDataPlacemark->style()->lineStyle().setColor( oxygenBrickRed4 );
- geoDataPlacemark->style()->lineStyle().setPenStyle( Qt::SolidLine );
- geoDataPlacemark->style()->labelStyle().setGlow( true );
- GeoDataDocument *geoDataContainer = new GeoDataDocument();
- geoDataContainer->setFileName("container_" + satelliteName);
- geoDataContainer->append( geoDataPlacemark );
- geoDataTreeModel->addDocument(geoDataContainer);
- }
- void SatItem::update()
- {
- GeoDataCoordinates coordinates0 = GeoDataCoordinates( 0, 0, 20000.0 * 1000, GeoDataCoordinates::Degree );
- coordinates0.setType(1);
- coordinates0.setTime(20);
- m_track->addPoint( m_clock->dateTime(), coordinates0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement