Marble

FlyToEditWidget.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Mihail Ivchenko <[email protected]>
4 // SPDX-FileCopyrightText: 2014 Sanjiban Bairagya <[email protected]>
5 // SPDX-FileCopyrightText: 2014 Illya Kovalevskyy <[email protected]>
6 //
7 
8 #ifndef FLYTOEDITWIDGET_H
9 #define FLYTOEDITWIDGET_H
10 
11 #include <QWidget>
12 #include <QPersistentModelIndex>
13 
14 #include "GeoDataCoordinates.h"
15 
16 class QDoubleSpinBox;
17 class QToolButton;
18 class QComboBox;
19 
20 namespace Marble
21 {
22 
23 class GeoDataFlyTo;
24 class MarbleWidget;
25 
26 class FlyToEditWidget: public QWidget
27 {
28  Q_OBJECT
29 
30 public:
31  FlyToEditWidget( const QModelIndex& index, MarbleWidget* widget, QWidget* parent=nullptr );
32  bool editable() const;
33 
34 Q_SIGNALS:
35  void editingDone( const QModelIndex& index );
36 
37 public Q_SLOTS:
38  void setEditable( bool editable );
39 
40  /** We disable editing of wait duration for first flyto in playlist. */
41  void setFirstFlyTo(const QPersistentModelIndex &index );
42 
43 private Q_SLOTS:
44  void save();
45  void updateCoordinates();
46 
47 private:
48  GeoDataFlyTo* flyToElement();
49  MarbleWidget* m_widget;
50  QPersistentModelIndex m_index;
51  QDoubleSpinBox *m_durationSpin;
52  QComboBox *m_modeCombo;
53  GeoDataCoordinates m_coord;
54  QToolButton *m_button;
55 };
56 
57 } // namespace Marble
58 
59 #endif
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
Binds a QML item to a specific geodetic location in screen coordinates.
Q_SIGNALSQ_SIGNALS
QAction * save(const QObject *recvr, const char *slot, QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.