marble
TourWidget.cpp
Go to the documentation of this file.
104 QObject::connect( m_tourUi.m_listView, SIGNAL( activated( QModelIndex ) ), q, SLOT( mapCenterOn( QModelIndex ) ) );
105 QObject::connect( m_tourUi.m_listView->selectionModel(), SIGNAL( selectionChanged( QItemSelection, QItemSelection ) ),
108 QObject::connect( m_tourUi.m_actionDelete, SIGNAL( triggered() ), q, SLOT( deleteSelected() ) );
111 QObject::connect( q, SIGNAL( featureUpdated( GeoDataFeature* ) ), &m_model, SLOT( updateFeature( GeoDataFeature* ) ) );
115 QObject::connect( m_tourUi.m_actionSaveTourAs, SIGNAL( triggered() ), q, SLOT( saveTourAs() ) );
116 QObject::connect( &m_playback, SIGNAL(centerOn(GeoDataCoordinates)), q, SLOT(centerOn(GeoDataCoordinates)) );
139 QObject::connect( this, SIGNAL( editingChanged( QModelIndex ) ), m_listView, SLOT( update( QModelIndex ) ) );
143 void TourItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const
172 GeoDataObject *object = qvariant_cast<GeoDataObject*>(index.data( MarblePlacemarkModel::ObjectPointerRole ) );
173 if ( object->nodeType() == GeoDataTypes::GeoDataTourControlType && !m_editingIndices.contains( index ) ) {
195 } else if ( object->nodeType() == GeoDataTypes::GeoDataFlyToType && !m_editingIndices.contains( index ) ) {
196 GeoDataCoordinates const flyToCoords = index.data( MarblePlacemarkModel::CoordinateRole ).value<GeoDataCoordinates>();
212 } else if ( object->nodeType() == GeoDataTypes::GeoDataWaitType && !m_editingIndices.contains( index ) ) {
230 } else if ( object->nodeType() == GeoDataTypes::GeoDataSoundCueType && !m_editingIndices.contains( index ) ) {
281 QSize TourItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
288 QWidget* TourItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const
291 GeoDataObject *object = qvariant_cast<GeoDataObject*>(index.data( MarblePlacemarkModel::ObjectPointerRole ) );
333 bool TourItemDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index )
371 QObject::connect( d->m_delegate, SIGNAL( edited( QModelIndex ) ), this, SLOT( updateDuration() ) );
421 QString const filename = QFileDialog::getOpenFileName( q, QObject::tr( "Open Tour" ), QDir::homePath(), QObject::tr( "KML Tours (*.kml)" ) );
500 QPointer<QMessageBox> dialog = new QMessageBox( QMessageBox::Question, title, text, QMessageBox::Yes | QMessageBox::No, q );
532 m_tourUi.m_actionMoveUp->setEnabled( ( start->row() != 0 ) ); // if we can move up enable action else disable.
536 m_tourUi.m_actionMoveDown->setEnabled( ( end->row() != playlist->size()-1 ) ); // if we can move down enable action else disable.
731 QString const filename = QFileDialog::getSaveFileName( q, QObject::tr( "Save Tour as" ), QDir::homePath(), QObject::tr( "KML Tours (*.kml)" ) );
768 QString text = QObject::tr( "Are you sure want to discard all unsaved changes and close current document?" );
769 QPointer<QMessageBox> dialog = new QMessageBox( QMessageBox::Question, title, text, QMessageBox::Yes | QMessageBox::No, q );
792 FlyToEditWidget::FlyToEditWidget( const QModelIndex &index, MarbleWidget* widget, QWidget *parent ) :
848 GeoDataObject *object = qvariant_cast<GeoDataObject*>(m_index.data( MarblePlacemarkModel::ObjectPointerRole ) );
909 GeoDataObject *object = qvariant_cast<GeoDataObject*>(m_index.data( MarblePlacemarkModel::ObjectPointerRole ) );
960 GeoDataObject *object = qvariant_cast<GeoDataObject*>(m_index.data( MarblePlacemarkModel::ObjectPointerRole ) );
1007 GeoDataObject *object = qvariant_cast<GeoDataObject*>(m_index.data( MarblePlacemarkModel::ObjectPointerRole ) );
QLayout * layout() const
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: TourWidget.cpp:288
QSize size() const
Type type() const
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: TourWidget.cpp:143
void editingDone(const QModelIndex &index)
const char * GeoDataLookAtType
Definition: GeoDataTypes.cpp:58
void setAltitude(const qreal altitude)
set the altitude of the Point in meters
Definition: GeoDataCoordinates.cpp:1191
void editingDone(const QModelIndex &index)
iterator begin()
text
Definition: TourWidget.h:206
This file contains the headers for MarbleModel.
WaitEditWidget(const QModelIndex &index, QWidget *parent=0)
Definition: TourWidget.cpp:915
void setPixmap(const QPixmap &)
TourItemDelegate(QListView *view, MarbleWidget *widget)
Definition: TourWidget.cpp:136
Definition: TourWidget.h:118
void save()
T value() const
Definition: GeoDataCamera.h:22
int height() const
The pointer to a specific object.
Definition: MarblePlacemarkModel.h:62
QString homePath()
void setIcon(const QIcon &icon)
QString tr(const char *sourceText, const char *disambiguation, int n)
Definition: TourWidget.h:94
qreal range() const
Retrieve the distance (in meters) between the camera and the object looked at.
Definition: GeoDataLookAt.cpp:120
Definition: TourWidget.h:69
void setMarbleWidget(MarbleWidget *widget)
Definition: TourWidget.cpp:367
virtual const char * nodeType() const =0
Provides type information for downcasting a GeoNode.
QPixmap pixmap(const QSize &size, Mode mode, State state) const
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:104
Definition: TourWidget.h:185
virtual bool event(QEvent *e)
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
Definition: TourWidget.cpp:333
void openPersistentEditor(const QModelIndex &index)
TourControlEditWidget(const QModelIndex &index, QWidget *parent=0)
Definition: TourWidget.cpp:854
bool isValid() const
bool isEnabled() const
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QString number(int n, int base)
Definition: GeoDataSoundCue.h:19
void append(const T &value)
Definition: tools/osm-addresses/OsmParser.h:40
Definition: GeoDataWait.h:19
void setLayout(QLayout *layout)
bool isNull() const
void setCoordinates(const GeoDataCoordinates &coordinates)
Definition: GeoDataCamera.cpp:67
Definition: GeoDataFlyTo.h:23
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
Definition: GeoDataDocument.h:42
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: TourWidget.cpp:281
bool isEmpty() const
int row() const
QAbstractTextDocumentLayout * documentLayout() const
void * internalPointer() const
void setEditTriggers(QFlags< QAbstractItemView::EditTrigger > triggers)
void setValue(double val)
SoundCueEditWidget(const QModelIndex &index, QWidget *parent=0)
Definition: TourWidget.cpp:966
const char * GeoDataSoundCueType
Definition: GeoDataTypes.cpp:79
bool contains(const QPoint &point, bool proper) const
void editingChanged(QModelIndex index)
const char * GeoDataTourControlType
Definition: GeoDataTypes.cpp:84
void setText(const QString &)
const char * GeoDataPlaylistType
Definition: GeoDataTypes.cpp:67
void setPlaceholderText(const QString &)
Definition: TourWidget.h:45
void setMargin(int margin)
void editingDone(const QModelIndex &index)
void setView(GeoDataAbstractView *view)
Definition: GeoDataFlyTo.cpp:120
void editableChanged(bool editable)
TourWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Definition: TourWidget.cpp:120
const char * kmlTag_nameSpaceOgc22
Definition: KmlElementDictionary.cpp:34
void setDefaultFont(const QFont &font)
bool contains(const T &value) const
void restore()
The GeoDataCoordinates coordinate.
Definition: MarblePlacemarkModel.h:53
void setChecked(bool)
const char * GeoDataCameraType
Definition: GeoDataTypes.cpp:31
void setTextWidth(qreal width)
int width() const
void setClipRect(const QRectF &rectangle, Qt::ClipOperation operation)
QVariant data(int role) const
QStyle * style()
GeoDataCoordinates focusPoint() const
Definition: MarbleWidget.cpp:1186
FlyToEditWidget(const QModelIndex &index, MarbleWidget *widget, QWidget *parent=0)
Definition: TourWidget.cpp:792
virtual void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const =0
void setPlayMode(const PlayMode &mode)
Definition: GeoDataTourControl.cpp:47
void editingDone(const QModelIndex &index)
QString toString() const
return a string representation of the coordinate this is a convenience function which uses the defaul...
Definition: GeoDataCoordinates.cpp:921
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFlags< QFileDialog::Option > options)
QPoint topLeft() const
void translate(const QPointF &offset)
void setHtml(const QString &html)
QString section(QChar sep, int start, int end, QFlags< QString::SectionFlag > flags) const
virtual void draw(QPainter *painter, const PaintContext &context)=0
void setText(const QString &text)
void centerOn(const GeoDataCoordinates &coordinates)
void setEditable(bool editable)
Definition: TourWidget.cpp:1000
This file contains the headers for MarbleWidget.
typedef WindowFlags
void featureUpdated(GeoDataFeature *feature)
void closePersistentEditor(const QModelIndex &index)
const QPoint & pos() const
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFlags< QFileDialog::Option > options)
Wraps a Marble::MarbleWidget, providing access to important properties and methods.
Definition: MarbleDeclarativeWidget.h:50
void edited(QModelIndex index)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
iterator end()
bool removeOne(const T &value)
void setSpacing(int spacing)
void finished()
void setEditable(bool editable)
Definition: TourWidget.cpp:902
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.