Marble

MovieCapture.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Illya Kovalevskyy <illya.kovalevskyy@gmail.com>
4//
5
6#ifndef MOVIECAPTURE_H
7#define MOVIECAPTURE_H
8
9#include <QObject>
10#include <QVector>
11
12#include "marble_export.h"
13
14namespace Marble
15{
16
17class MarbleWidget;
18
19class MovieCapturePrivate;
20
21class MovieFormat
22{
23public:
24 MovieFormat() {}
25 explicit MovieFormat( const QString &type, const QString &name, const QString &extension) :
26 m_type( type ),
27 m_name( name ),
28 m_extension( extension )
29 {}
30
31 QString type() const { return m_type; }
32 QString name() const { return m_name; }
33 QString extension() const { return m_extension; }
34private:
35 QString m_type;
36 QString m_name;
37 QString m_extension;
38};
39
40class MARBLE_EXPORT MovieCapture : public QObject
41{
42 Q_OBJECT
43public:
44 enum SnapshotMethod { TimeDriven, DataDriven };
45 MovieCapture(MarbleWidget *widget, QObject *parent);
46 ~MovieCapture() override;
47
48 int fps() const;
49 QString destination() const;
50 QVector<MovieFormat> availableFormats();
51 MovieCapture::SnapshotMethod snapshotMethod() const;
52 bool checkToolsAvailability();
53
54public Q_SLOTS:
55 void setFps(int fps);
56 void setFilename(const QString &path);
57 void setSnapshotMethod(MovieCapture::SnapshotMethod method);
58 void recordFrame();
59 bool startRecording();
60 void stopRecording();
61 void cancelRecording();
62
63private Q_SLOTS:
64 void processWrittenMovie(int exitCode);
65
66Q_SIGNALS:
67 void rateCalculated( double );
68 void errorOccured();
69
70protected:
71 MovieCapturePrivate * const d_ptr;
72
73private:
74 Q_DECLARE_PRIVATE(MovieCapture)
75 QVector<MovieFormat> m_supportedFormats;
76
77};
78
79} // namespace Marble
80
81Q_DECLARE_TYPEINFO(Marble::MovieFormat, Q_MOVABLE_TYPE);
82
83#endif // MOVIECAPTURE_H
Type type(const QSqlDatabase &db)
QString name(StandardShortcut id)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.