QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsplaybackcontrollerwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsplaybackcontrollerwidget.h
3 --------------------------------------
4 begin : November 2023
5 copyright : (C) 2023 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7***************************************************************************
8* *
9* This program is free software; you can redistribute it and/or modify *
10* it under the terms of the GNU General Public License as published by *
11* the Free Software Foundation; either version 2 of the License, or *
12* (at your option) any later version. *
13* *
14***************************************************************************/
15
16#ifndef QGSPLAYBACKCONTROLLERWIDGET_H
17#define QGSPLAYBACKCONTROLLERWIDGET_H
18
19#include "ui_qgsplaybackcontrollerwidgetbase.h"
20
21#include "qgis.h"
22#include "qgis_gui.h"
23#include "qgis_sip.h"
24
25#include <QWidget>
26
32class GUI_EXPORT QgsPlaybackControllerWidget : public QWidget, private Ui::QgsPlaybackControllerWidgetBase
33{
34 Q_OBJECT
35
36 public:
40 explicit QgsPlaybackControllerWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
41
45 QPushButton *button( Qgis::PlaybackOperation operation );
46
47 public slots:
48
52 void setState( Qgis::AnimationState state );
53
57 void togglePause();
58
59 signals:
60
65
66 private slots:
67
68 void togglePlayForward();
69 void togglePlayBackward();
70 void pause();
71 void next();
72 void previous();
73 void skipToEnd();
74 void rewindToStart();
75
76 private:
78 bool mPlayingForward = true;
79};
80
81#endif // QGSPLAYBACKCONTROLLERWIDGET_H
PlaybackOperation
Media playback operations.
Definition qgis.h:2563
AnimationState
Animation states.
Definition qgis.h:2550
@ Idle
Animation is paused.
Definition qgis.h:2553
void operationTriggered(Qgis::PlaybackOperation operation)
Emitted when a playback operation is triggered.
void setState(Qgis::AnimationState state)
Sets the current animation state for the widget.
QgsPlaybackControllerWidget(QWidget *parent=nullptr)
Constructor for QgsPlaybackControllerWidget, with the specified parent widget.
void togglePause()
Toggles the pause state on or off.
QPushButton * button(Qgis::PlaybackOperation operation)
Returns the button associated with the specified playback operation.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53