File indexing completed on 2024-04-28 11:31:25
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2013 Mihail Ivchenko <ematirov@gmail.com> 0004 // SPDX-FileCopyrightText: 2014 Sanjiban Bairagya <sanjiban22393@gmail.com> 0005 // SPDX-FileCopyrightText: 2014 Illya Kovalevskyy <illya.kovalevskyy@gmail.com> 0006 // 0007 0008 #ifndef TOURCONTROLEDITWIDGET_H 0009 #define TOURCONTROLEDITWIDGET_H 0010 0011 #include <QWidget> 0012 #include <QPersistentModelIndex> 0013 0014 class QRadioButton; 0015 class QToolButton; 0016 0017 namespace Marble 0018 { 0019 0020 class GeoDataTourControl; 0021 0022 class TourControlEditWidget: public QWidget 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit TourControlEditWidget( const QModelIndex& index, QWidget* parent=nullptr ); 0028 bool editable() const; 0029 0030 Q_SIGNALS: 0031 void editingDone( const QModelIndex& index ); 0032 0033 public Q_SLOTS: 0034 void setEditable( bool editable ); 0035 0036 private Q_SLOTS: 0037 void save(); 0038 0039 private: 0040 GeoDataTourControl* tourControlElement(); 0041 QPersistentModelIndex m_index; 0042 QRadioButton *m_radio_play; 0043 QRadioButton *m_radio_pause; 0044 QToolButton *m_button; 0045 }; 0046 0047 } // namespace Marble 0048 0049 #endif