Marble

MovieCapture.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Illya Kovalevskyy <[email protected]>
4 //
5 
6 #ifndef MOVIECAPTURE_H
7 #define MOVIECAPTURE_H
8 
9 #include <QObject>
10 #include <QVector>
11 
12 #include "marble_export.h"
13 
14 namespace Marble
15 {
16 
17 class MarbleWidget;
18 
19 class MovieCapturePrivate;
20 
21 class MovieFormat
22 {
23 public:
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; }
34 private:
35  QString m_type;
36  QString m_name;
37  QString m_extension;
38 };
39 
40 class MARBLE_EXPORT MovieCapture : public QObject
41 {
42  Q_OBJECT
43 public:
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 
54 public 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 
63 private Q_SLOTS:
64  void processWrittenMovie(int exitCode);
65 
66 Q_SIGNALS:
67  void rateCalculated( double );
68  void errorOccured();
69 
70 protected:
71  MovieCapturePrivate * const d_ptr;
72 
73 private:
74  Q_DECLARE_PRIVATE(MovieCapture)
75  QVector<MovieFormat> m_supportedFormats;
76 
77 };
78 
79 } // namespace Marble
80 
81 Q_DECLARE_TYPEINFO(Marble::MovieFormat, Q_MOVABLE_TYPE);
82 
83 #endif // MOVIECAPTURE_H
Type type(const QSqlDatabase &db)
Binds a QML item to a specific geodetic location in screen coordinates.
QString name(StandardShortcut id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:09 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.