QGIS API Documentation 3.99.0-Master (26c88405ac0)
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:
37
41 explicit QgsPlaybackControllerWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
42
46 QPushButton *button( Qgis::PlaybackOperation operation );
47
48 public slots:
49
53 void setState( Qgis::AnimationState state );
54
58 void togglePause();
59
60 signals:
61
66
67 private slots:
68
69 void togglePlayForward();
70 void togglePlayBackward();
71 void pause();
72 void next();
73 void previous();
74 void skipToEnd();
75 void rewindToStart();
76
77 private:
79 bool mPlayingForward = true;
80};
81
82#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