File indexing completed on 2024-04-21 03:50:03

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 WAITEDITWIDGET_H
0009 #define WAITEDITWIDGET_H
0010 
0011 #include <QWidget>
0012 #include <QModelIndex>
0013 
0014 class QDoubleSpinBox;
0015 class QToolButton;
0016 
0017 namespace Marble
0018 {
0019 
0020 class GeoDataWait;
0021 
0022 class WaitEditWidget: public QWidget
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     explicit WaitEditWidget( 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     GeoDataWait* waitElement();
0041     QPersistentModelIndex m_index;
0042     QDoubleSpinBox *m_spinBox;
0043     QToolButton *m_button;
0044 };
0045 
0046 } // namespace Marble
0047 
0048 #endif