File indexing completed on 2025-02-23 04:34:21
0001 /** 0002 * \file guiplatformtools.h 0003 * Platform specific tools for QtGui (without QtWidget). 0004 * 0005 * \b Project: Kid3 0006 * \author Urs Fleisch 0007 * \date 15 Jul 2019 0008 * 0009 * Copyright (C) 2019-2024 Urs Fleisch 0010 * 0011 * This file is part of Kid3. 0012 * 0013 * Kid3 is free software; you can redistribute it and/or modify 0014 * it under the terms of the GNU General Public License as published by 0015 * the Free Software Foundation; either version 2 of the License, or 0016 * (at your option) any later version. 0017 * 0018 * Kid3 is distributed in the hope that it will be useful, 0019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0021 * GNU General Public License for more details. 0022 * 0023 * You should have received a copy of the GNU General Public License 0024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0025 */ 0026 0027 #pragma once 0028 0029 #include "coreplatformtools.h" 0030 0031 /** 0032 * Platform specific tools for QtGui (without QtWidget). 0033 */ 0034 class KID3_GUI_EXPORT GuiPlatformTools : public CorePlatformTools { 0035 public: 0036 /** 0037 * Destructor. 0038 */ 0039 ~GuiPlatformTools() override; 0040 0041 /** 0042 * Get icon provider for tagged files. 0043 * @return icon provider. 0044 */ 0045 CoreTaggedFileIconProvider* iconProvider() override; 0046 0047 /** 0048 * Write text to clipboard. 0049 * @param text text to write 0050 * @return true if operation is supported. 0051 */ 0052 bool writeToClipboard(const QString& text) const override; 0053 0054 /** 0055 * Read text from clipboard. 0056 * @return text, null if operation not supported. 0057 */ 0058 QString readFromClipboard() const override; 0059 0060 /** 0061 * Create an audio player instance. 0062 * @param app application context 0063 * @param dbusEnabled true to enable MPRIS D-Bus interface 0064 * @return audio player, nullptr if not supported. 0065 */ 0066 QObject* createAudioPlayer(Kid3Application* app, 0067 bool dbusEnabled) const override; 0068 0069 private: 0070 QScopedPointer<CoreTaggedFileIconProvider> m_iconProvider; 0071 };