File indexing completed on 2024-05-12 04:46:53
0001 /* 0002 * Copyright 2018 Camilo Higuita <milo.h@aol.com> 0003 * 0004 * This program is free software; you can redistribute it and/or modify 0005 * it under the terms of the GNU Library General Public License as 0006 * published by the Free Software Foundation; either version 2, or 0007 * (at your option) any later version. 0008 * 0009 * This program is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0012 * GNU General Public License for more details 0013 * 0014 * You should have received a copy of the GNU Library General Public 0015 * License along with this program; if not, write to the 0016 * Free Software Foundation, Inc., 0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #pragma once 0021 0022 #include <QObject> 0023 #include <QQmlEngine> 0024 #include <QVariantList> 0025 0026 #include "fmh.h" 0027 0028 #include "abstractplatform.h" 0029 0030 /** 0031 * @brief The MAUIKDE class 0032 */ 0033 class MAUIKDE : public AbstractPlatform 0034 { 0035 Q_OBJECT 0036 QML_NAMED_ELEMENT(KDE) 0037 QML_SINGLETON 0038 QML_UNCREATABLE("Cannot be created Style") 0039 0040 public: 0041 static MAUIKDE *qmlAttachedProperties(QObject *object); 0042 static MAUIKDE *instance() 0043 { 0044 static MAUIKDE kde; 0045 return &kde; 0046 } 0047 0048 MAUIKDE(const MAUIKDE &) = delete; 0049 MAUIKDE &operator=(const MAUIKDE &) = delete; 0050 MAUIKDE(MAUIKDE &&) = delete; 0051 MAUIKDE &operator=(MAUIKDE &&) = delete; 0052 0053 private: 0054 MAUIKDE(QObject *parent = nullptr); 0055 0056 public Q_SLOTS: 0057 /** 0058 * @brief setColorScheme 0059 * @param schemeName 0060 * @param bg 0061 * @param fg 0062 */ 0063 static void setColorScheme(const QString &schemeName); 0064 0065 void shareFiles(const QList<QUrl> &urls) override final; 0066 void shareText(const QString &text) override final; 0067 bool hasKeyboard() override final; 0068 bool hasMouse() override final; 0069 0070 // AbstractPlatform interface 0071 public Q_SLOTS: 0072 bool darkModeEnabled() override final; 0073 }; 0074