/usr/include/marble/TourWidget.h is in libmarble-dev 4:4.14.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | //
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2013 Mihail Ivchenko <ematirov@gmail.com>
// Copyright 2014 Sanjiban Bairagya <sanjiban22393@gmail.com>
//
#ifndef MARBLE_TOURWIDGET_H
#define MARBLE_TOURWIDGET_H
#include "marble_export.h"
#include <QWidget>
#include <QStyledItemDelegate>
#include <QListView>
#include <GeoDataCoordinates.h>
class QItemSelection;
class QModelIndex;
class QDoubleSpinBox;
class QRadioButton;
class QLineEdit;
namespace Marble
{
class FileManager;
class GeoDataPlacemark;
class GeoDataLatLonBox;
class GeoDataTreeModel;
class GeoDataFeature;
class GeoDataFlyTo;
class GeoDataTourControl;
class GeoDataWait;
class GeoDataSoundCue;
class MarbleWidget;
class TourWidgetPrivate;
class FlyToEditWidget: public QWidget
{
Q_OBJECT
public:
FlyToEditWidget( const QModelIndex& index, MarbleWidget* widget, QWidget* parent=0 );
Q_SIGNALS:
void editingDone( const QModelIndex& index );
private Q_SLOTS:
void save();
private:
GeoDataFlyTo* flyToElement();
MarbleWidget* m_widget;
QModelIndex m_index;
};
class TourControlEditWidget: public QWidget
{
Q_OBJECT
public:
TourControlEditWidget( const QModelIndex& index, QWidget* parent=0 );
Q_SIGNALS:
void editingDone( const QModelIndex& index );
private Q_SLOTS:
void save();
private:
GeoDataTourControl* tourControlElement();
QModelIndex m_index;
QRadioButton *m_radio_play;
QRadioButton *m_radio_pause;
};
class WaitEditWidget: public QWidget
{
Q_OBJECT
public:
WaitEditWidget( const QModelIndex& index, QWidget* parent=0 );
Q_SIGNALS:
void editingDone( const QModelIndex& index );
private Q_SLOTS:
void save();
private:
GeoDataWait* waitElement();
QModelIndex m_index;
QDoubleSpinBox *m_spinBox;
};
class SoundCueEditWidget: public QWidget
{
Q_OBJECT
public:
SoundCueEditWidget( const QModelIndex& index, QWidget* parent=0 );
Q_SIGNALS:
void editingDone( const QModelIndex& index );
private Q_SLOTS:
void save();
private:
GeoDataSoundCue* soundCueElement();
QModelIndex m_index;
QLineEdit* m_lineEdit;
};
class MARBLE_EXPORT TourWidget : public QWidget
{
Q_OBJECT
public:
explicit TourWidget( QWidget *parent = 0, Qt::WindowFlags f = 0 );
~TourWidget();
void setMarbleWidget( MarbleWidget *widget );
bool openTour( const QString &filename );
public Q_SLOTS:
void startPlaying();
void pausePlaying();
void togglePlaying();
void stopPlaying();
void handleSliderMove( int );
Q_SIGNALS:
void featureUpdated( GeoDataFeature *feature );
private Q_SLOTS:
void moveUp();
void moveDown();
void addFlyTo();
void deleteSelected();
void centerOn( const GeoDataCoordinates &coordinates );
private:
Q_PRIVATE_SLOT( d, void openFile() )
Q_PRIVATE_SLOT( d, void createTour() )
Q_PRIVATE_SLOT( d, void saveTour() )
Q_PRIVATE_SLOT( d, void saveTourAs() )
Q_PRIVATE_SLOT( d, void updateButtonsStates() )
Q_PRIVATE_SLOT( d, void mapCenterOn( const QModelIndex &index ) )
Q_PRIVATE_SLOT( d, void handlePlaybackProgress( const double position ) )
Q_DISABLE_COPY( TourWidget )
TourWidgetPrivate * const d;
};
class TourItemDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
TourItemDelegate( QListView* view, MarbleWidget* widget );
void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
QSize sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const;
QWidget* createEditor ( QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
Q_SIGNALS:
void editingChanged( QModelIndex index );
public:
enum Element {
GeoDataElementIcon,
Label,
EditButton,
ActionButton
};
protected:
bool editorEvent( QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index );
private Q_SLOTS:
void closeEditor(const QModelIndex& index);
private:
static QRect position( Element element, const QStyleOptionViewItem &option );
QList<QPersistentModelIndex> m_editingIndices;
QListView* m_listView;
MarbleWidget *m_widget;
};
}
#endif
|