File indexing completed on 2025-02-02 04:26:13
0001 /* This file is part of Spectacle, the KDE screenshot utility 0002 * SPDX-FileCopyrightText: 2019 Boudhayan Gupta <bgupta@kde.org> 0003 * SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #pragma once 0007 0008 #include "ImagePlatform.h" 0009 #include "VideoPlatform.h" 0010 0011 class ImagePlatformNull final : public ImagePlatform 0012 { 0013 Q_OBJECT 0014 0015 public: 0016 explicit ImagePlatformNull(QObject *parent = nullptr); 0017 ~ImagePlatformNull() override = default; 0018 0019 GrabModes supportedGrabModes() const override final; 0020 ShutterModes supportedShutterModes() const override final; 0021 0022 public Q_SLOTS: 0023 0024 void doGrab(ImagePlatform::ShutterMode shutterMode, 0025 ImagePlatform::GrabMode grabMode, 0026 bool includePointer, 0027 bool includeDecorations, 0028 bool includeShadow) override final; 0029 }; 0030 0031 class VideoPlatformNull final : public VideoPlatform 0032 { 0033 Q_OBJECT 0034 0035 public: 0036 explicit VideoPlatformNull(QObject *parent = nullptr); 0037 0038 RecordingModes supportedRecordingModes() const override; 0039 Formats supportedFormats() const override; 0040 void startRecording(const QUrl &fileUrl, RecordingMode recordingMode, const QVariant &option, bool includePointer) override; 0041 void finishRecording() override; 0042 0043 private: 0044 QUrl m_fileUrl; 0045 };