diff --git a/applets/kimpanel/backend/ibus/ibus15/app.h b/applets/kimpanel/backend/ibus/ibus15/app.h index 1dcb411f3..cd1289d8e 100644 --- a/applets/kimpanel/backend/ibus/ibus15/app.h +++ b/applets/kimpanel/backend/ibus/ibus15/app.h @@ -1,78 +1,78 @@ /* * Copyright (C) 2014 Weng Xuetian * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License or (at your option) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef APP_H #define APP_H #include #include #include #include #include #include #include #include #include "panel.h" class QDBusServiceWatcher; class XcbEventFilter : public QAbstractNativeEventFilter { public: bool nativeEventFilter(const QByteArray &eventType, void* message, long int* result) override; }; class App : public QGuiApplication { Q_OBJECT public: typedef QPair< uint, uint > TriggerKey; App(int &argc, char* argv[]); - virtual ~App(); + ~App() override; void setTriggerKeys(QList< TriggerKey > triggersList); void setDoGrab(bool doGrab); bool keyboardGrabbed() { return m_keyboardGrabbed; } bool nativeEvent(xcb_generic_event_t* event); void nameAcquired(); void nameLost(); QByteArray normalizeIconName(const QByteArray& icon) const; public Q_SLOTS: void init(); void finalize(); void clean(); void grabKey(); void ungrabKey(); uint getPrimaryModifier(uint state); void keyRelease(const xcb_key_release_event_t* event); void accept(); void ungrabXKeyboard(); bool grabXKeyboard(); private: QScopedPointer m_eventFilter; bool m_init; IBusBus *m_bus; IBusPanelImpanel *m_impanel; QList< QPair< uint, uint > > m_triggersList; bool m_keyboardGrabbed; bool m_doGrab; xcb_key_symbols_t* m_syms; QMap m_iconMap; QDBusServiceWatcher *m_watcher; }; #endif // APP_H diff --git a/applets/kimpanel/backend/ibus/ibus15/enginemanager.h b/applets/kimpanel/backend/ibus/ibus15/enginemanager.h index 5caccbcdb..011af0128 100644 --- a/applets/kimpanel/backend/ibus/ibus15/enginemanager.h +++ b/applets/kimpanel/backend/ibus/ibus15/enginemanager.h @@ -1,59 +1,59 @@ /* * Copyright (C) 2014 Weng Xuetian * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License or (at your option) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef ENGINEMANAGER_H #define ENGINEMANAGER_H #include #include #include #include #include #include #include class EngineManager { public: EngineManager(); - virtual ~EngineManager(); + ~EngineManager() override; void setEngines(IBusEngineDesc** engines); IBusEngineDesc** engines() { return m_engines; } size_t length() { return m_length; } void setUseGlobalEngine(gboolean g_variant_get_boolean); void setCurrentContext(const gchar* input_context_path); QString currentEngine(); bool useGlobalEngine() { return m_useGlobalEngine; } void setCurrentEngine(const char* name); const char* navigate(IBusEngineDesc* engine, bool forward); void moveToFirst(IBusEngineDesc* engine_desc); QStringList engineOrder(); void setOrder(const gchar** engine_names, size_t len); size_t getIndexByName(const char* name); private: QQueue m_history; QMap m_engineMap; QString m_currentContext; IBusEngineDesc** m_engines; size_t m_length; bool m_useGlobalEngine; void freeOldEngine(); }; #endif // PROPERTYMANAGER_H diff --git a/applets/kimpanel/backend/ibus/ibus15/propertymanager.h b/applets/kimpanel/backend/ibus/ibus15/propertymanager.h index 87cfbe0f9..0a98fc663 100644 --- a/applets/kimpanel/backend/ibus/ibus15/propertymanager.h +++ b/applets/kimpanel/backend/ibus/ibus15/propertymanager.h @@ -1,40 +1,40 @@ /* * Copyright (C) 2014 Weng Xuetian * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License or (at your option) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef PROPERTYMANAGER_H #define PROPERTYMANAGER_H #include #include class PropertyManager { public: PropertyManager(); - virtual ~PropertyManager(); + ~PropertyManager() override; void setProperties(IBusPropList* props); void updateProperty(IBusProperty* prop); IBusProperty* property(const QByteArray& key); IBusPropList* properties() { return m_props; } private: IBusPropList* m_props; IBusProperty* searchList(const QByteArray& key, IBusPropList* props); }; #endif // PROPERTYMANAGER_H diff --git a/applets/pager/plugin/pagermodel.h b/applets/pager/plugin/pagermodel.h index 01a02403a..442d56f4b 100644 --- a/applets/pager/plugin/pagermodel.h +++ b/applets/pager/plugin/pagermodel.h @@ -1,130 +1,130 @@ /******************************************************************** Copyright 2016 Eike Hein This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *********************************************************************/ #ifndef PAGERMODEL_H #define PAGERMODEL_H #include #if HAVE_X11 #include #include #endif #include #include #include class QMimeData; class PagerModel : public QAbstractListModel, public QQmlParserStatus { Q_OBJECT Q_INTERFACES(QQmlParserStatus) Q_ENUMS(PagerType) Q_ENUMS(AdditionalRoles) Q_PROPERTY(int count READ rowCount NOTIFY countChanged) Q_PROPERTY(PagerType pagerType READ pagerType WRITE setPagerType NOTIFY pagerTypeChanged) Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) Q_PROPERTY(bool shouldShowPager READ shouldShowPager NOTIFY shouldShowPagerChanged); Q_PROPERTY(bool showDesktop READ showDesktop WRITE setShowDesktop NOTIFY showDesktopChanged) Q_PROPERTY(bool showOnlyCurrentScreen READ showOnlyCurrentScreen WRITE setShowOnlyCurrentScreen NOTIFY showOnlyCurrentScreenChanged) Q_PROPERTY(QRect screenGeometry READ screenGeometry WRITE setScreenGeometry NOTIFY screenGeometryChanged) Q_PROPERTY(int currentPage READ currentPage NOTIFY currentPageChanged) Q_PROPERTY(int layoutRows READ layoutRows NOTIFY layoutRowsChanged) Q_PROPERTY(QSize pagerItemSize READ pagerItemSize NOTIFY pagerItemSizeChanged) public: enum PagerType { VirtualDesktops = 0, Activities }; enum AdditionalRoles { TasksModel = Qt::UserRole + 1 }; explicit PagerModel(QObject *parent = nullptr); - virtual ~PagerModel(); + ~PagerModel() override; QHash roleNames() const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; QVariant data(const QModelIndex &index, int role) const override; PagerType pagerType() const; void setPagerType(PagerType type); bool enabled() const; void setEnabled(bool enabled); bool shouldShowPager() const; bool showDesktop() const; void setShowDesktop(bool show); bool showOnlyCurrentScreen() const; void setShowOnlyCurrentScreen(bool show); QRect screenGeometry() const; void setScreenGeometry(const QRect &geometry); int currentPage() const; int layoutRows() const; QSize pagerItemSize() const; #if HAVE_X11 QList stackingOrder() const; #endif Q_INVOKABLE void refresh(); Q_INVOKABLE void moveWindow(int window, double x, double y, int targetItemId, int sourceItemId, qreal widthScaleFactor, qreal heightScaleFactor); Q_INVOKABLE void changePage(int page); Q_INVOKABLE void drop(QMimeData *mimeData, int itemId); Q_INVOKABLE void addDesktop(); Q_INVOKABLE void removeDesktop(); void classBegin() override; void componentComplete() override; Q_SIGNALS: void countChanged() const; void pagerTypeChanged() const; void enabledChanged() const; void shouldShowPagerChanged() const; void showDesktopChanged() const; void showOnlyCurrentScreenChanged() const; void screenGeometryChanged() const; void currentPageChanged() const; void layoutRowsChanged() const; void pagerItemSizeChanged() const; private: class Private; QScopedPointer d; }; #endif diff --git a/applets/pager/plugin/windowmodel.h b/applets/pager/plugin/windowmodel.h index 1a5537318..70708b3c6 100644 --- a/applets/pager/plugin/windowmodel.h +++ b/applets/pager/plugin/windowmodel.h @@ -1,52 +1,52 @@ /******************************************************************** Copyright 2016 Eike Hein This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *********************************************************************/ #ifndef WINDOWMODEL_H #define WINDOWMODEL_H #include "taskfilterproxymodel.h" class PagerModel; class WindowModel : public TaskManager::TaskFilterProxyModel { Q_OBJECT Q_ENUMS(WindowModelRoles) public: enum WindowModelRoles { StackingOrder = Qt::UserRole + 1 }; explicit WindowModel(PagerModel *parent); - virtual ~WindowModel(); + ~WindowModel() override; QHash roleNames() const override; QVariant data(const QModelIndex &index, int role) const override; void refreshStackingOrder(); private: class Private; QScopedPointer d; }; #endif diff --git a/applets/taskmanager/plugin/smartlaunchers/smartlauncherbackend.h b/applets/taskmanager/plugin/smartlaunchers/smartlauncherbackend.h index 0b671393f..5702a4399 100644 --- a/applets/taskmanager/plugin/smartlaunchers/smartlauncherbackend.h +++ b/applets/taskmanager/plugin/smartlaunchers/smartlauncherbackend.h @@ -1,135 +1,135 @@ /*************************************************************************** * Copyright (C) 2016 Kai Uwe Broulik * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ #ifndef SMARTLAUNCHER_BACKEND_H #define SMARTLAUNCHER_BACKEND_H #include #include #include #include #include class QDBusServiceWatcher; class QString; namespace Plasma { class DataEngineConsumer; } namespace SmartLauncher { struct Entry { int count = 0; bool countVisible = false; int progress = 0; bool progressVisible = false; bool urgent = false; }; class Backend : public QObject, protected QDBusContext { Q_OBJECT public: explicit Backend(QObject *parent = nullptr); - virtual ~Backend(); + ~Backend() override; bool available() const; bool hasLauncher(const QString &storageId) const; int count(const QString &uri) const; bool countVisible(const QString &uri) const; int progress(const QString &uri) const; bool progressVisible(const QString &uri) const; bool urgent(const QString &uri) const; QHash unityMappingRules() const; public slots: void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data); signals: void countChanged(const QString &uri, int count); void countVisibleChanged(const QString &uri, bool countVisible); void progressChanged(const QString &uri, int progress); void progressVisibleChanged(const QString &uri, bool progressVisible); void urgentChanged(const QString &uri, bool urgent); void launcherRemoved(const QString &uri); private slots: void update(const QString &uri, const QMap &properties); private: bool setupUnity(); bool setupApplicationJobs(); void onServiceUnregistered(const QString &service); template void updateLauncherProperty(const QString &storageId, // our KService storage id const QVariantMap &properties, // the map of properties we're given by DBus const QString &property, // the property we're looking for T *entryMember, // the member variable we're going to write our result in // the change signal that will be emitted if the property has changed void (Backend::*changeSignal)(const QString &, T)) { auto foundProperty = properties.constFind(property); if (foundProperty != properties.constEnd()) { T newValue = foundProperty->value(); if (newValue != *entryMember) { *entryMember = newValue; emit ((this)->*changeSignal)(storageId, newValue); } } } void onApplicationJobAdded(const QString &source); void onApplicationJobRemoved(const QString &source); void updateApplicationJobPercent(const QString &storageId, Entry *entry); // Unity Launchers QDBusServiceWatcher *m_watcher; QHash m_dbusServiceToLauncherUrl; QHash m_launcherUrlToStorageId; // these rules can be configured in the taskmanagerrulesrc in the "Unity Launcher Mapping" section // key is the actual desktop file name of the application (some-broken-app-beta.desktop) // vaue is how it actually announces itself on the Unity API (some-broken-app.desktop) QHash m_unityMappingRules; // Application Jobs Plasma::DataEngineConsumer *m_dataEngineConsumer; Plasma::DataEngine *m_dataEngine; QHash m_dataSourceToStorageId; // QHash m_storageIdToJobs; // > QHash m_jobProgress; // QHash m_launchers; bool m_available = false; }; } // namespace SmartLauncher #endif // SMARTLAUNCHER_BACKEND_H diff --git a/applets/trash/plugin/dirmodel.h b/applets/trash/plugin/dirmodel.h index 064250dd3..c04f3976d 100644 --- a/applets/trash/plugin/dirmodel.h +++ b/applets/trash/plugin/dirmodel.h @@ -1,98 +1,98 @@ /* * Copyright 2012 by Marco Martin * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef DIRMODEL_H #define DIRMODEL_H #include #include #include #include #include class QTimer; /** * This class provides a QML binding to KDirModel * Provides an easy way to navigate a filesystem from within QML * * @author Marco Martin */ class DirModel : public KDirModel { Q_OBJECT /** * @property string The url we want to browse. it may be an absolute path or a correct url of any protocol KIO supports */ Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged) /** * @property count Total number of rows */ Q_PROPERTY(int count READ count NOTIFY countChanged) public: enum Roles { UrlRole = Qt::UserRole + 1, MimeTypeRole = Qt::UserRole + 2, Thumbnail = Qt::UserRole + 3 }; explicit DirModel(QObject* parent=nullptr); - virtual ~DirModel(); + ~DirModel() override; QHash roleNames() const override; void setUrl(const QString& url); QString url() const; QVariant data(const QModelIndex &index, int role) const override; int count() const {return rowCount();} Q_INVOKABLE int indexForUrl(const QString &url) const; Q_INVOKABLE QVariantMap get(int index) const; /** * Helper method to empty the trash */ Q_INVOKABLE void emptyTrash(); protected Q_SLOTS: void showPreview(const KFileItem &item, const QPixmap &preview); void previewFailed(const KFileItem &item); void delayedPreview(); Q_SIGNALS: void countChanged(); void urlChanged(); private: QStringList m_mimeTypes; //previews QTimer *m_previewTimer = nullptr; QHash m_filesToPreview; QSize m_screenshotSize; QHash m_previewJobs; KImageCache* m_imageCache; }; #endif // DIRMODEL_H diff --git a/attica-kde/kdeplugin/kdeplatformdependent.h b/attica-kde/kdeplugin/kdeplatformdependent.h index b026bca9e..d48e12ef4 100644 --- a/attica-kde/kdeplugin/kdeplatformdependent.h +++ b/attica-kde/kdeplugin/kdeplatformdependent.h @@ -1,79 +1,79 @@ /* This file is part of KDE. Copyright (c) 2009 Eckhart Wörner Copyright (c) 2010 Frederik Gladhorn This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ #ifndef ATTICA_KDEPLATFORMDEPENDENT_H #define ATTICA_KDEPLATFORMDEPENDENT_H #include #include #include #include namespace KWallet { class Wallet; } namespace Attica { class KdePlatformDependent : public QObject, public Attica::PlatformDependent { Q_OBJECT Q_INTERFACES(Attica::PlatformDependent) Q_PLUGIN_METADATA(IID "org.kde.attica-kde") public: KdePlatformDependent(); - virtual ~KdePlatformDependent(); + ~KdePlatformDependent() override; QList getDefaultProviderFiles() const override; void addDefaultProviderFile(const QUrl& url) override; void removeDefaultProviderFile(const QUrl& url) override; void enableProvider(const QUrl& baseUrl, bool enabled) const override; bool isEnabled(const QUrl& baseUrl) const override; QNetworkReply* post(const QNetworkRequest& request, const QByteArray& data) override; QNetworkReply* post(const QNetworkRequest& request, QIODevice* data) override; QNetworkReply* get(const QNetworkRequest& request) override; bool saveCredentials(const QUrl& baseUrl, const QString& user, const QString& password) override; bool hasCredentials(const QUrl& baseUrl) const override; bool loadCredentials(const QUrl& baseUrl, QString& user, QString& password) override; bool askForCredentials(const QUrl& baseUrl, QString& user, QString& password) override; QNetworkAccessManager* nam() override; private: bool openWallet(bool force); QNetworkRequest removeAuthFromRequest(const QNetworkRequest& request); KSharedConfigPtr m_config; QNetworkAccessManager* m_accessManager; KWallet::Wallet* m_wallet; QHash > m_passwords; }; } #endif diff --git a/dataengines/kimpanel/kimpanelagent.h b/dataengines/kimpanel/kimpanelagent.h index 57bb5bede..2ade15f18 100644 --- a/dataengines/kimpanel/kimpanelagent.h +++ b/dataengines/kimpanel/kimpanelagent.h @@ -1,122 +1,122 @@ /*************************************************************************** * Copyright (C) 2009 by Wang Hoi * * Copyright (C) 2011 by CSSlayer * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ #ifndef KIMPANEL_AGENT_H #define KIMPANEL_AGENT_H #include "kimpanelagenttype.h" // Qt #include #include #include class QDBusServiceWatcher; class Impanel2Adaptor; class ImpanelAdaptor; class PanelAgent: public QObject, protected QDBusContext { Q_OBJECT public: PanelAgent(QObject *parent); - virtual ~PanelAgent(); + ~PanelAgent() override; void configure(); void created(); void exit(); void reloadConfig(); void selectCandidate(int idx); void lookupTablePageUp(); void lookupTablePageDown(); void movePreeditCaret(int pos); void triggerProperty(const QString& key); public: // PROPERTIES public Q_SLOTS: // METHODS void UpdateLookupTable(const QStringList &labels, const QStringList &candis, const QStringList &attrlists, bool has_prev, bool has_next); void UpdatePreeditText(const QString &text, const QString &attr); void UpdateAux(const QString &text, const QString &attr); void UpdateScreen(int screen_id); void UpdateProperty(const QString &prop); void RegisterProperties(const QStringList &props); void ExecDialog(const QString &prop); void ExecMenu(const QStringList &entries); void SetSpotRect(int x, int y, int w, int h); void SetLookupTable(const QStringList &labels, const QStringList &candis, const QStringList &attrlists, bool hasPrev, bool hasNext, int cursor, int layout); void serviceUnregistered(const QString& service); Q_SIGNALS: // signals that from kimpanel void Configure(); void MovePreeditCaret(int position); void SelectCandidate(int index); void LookupTablePageUp(); void LookupTablePageDown(); void TriggerProperty(const QString &key); void PanelCreated(); void PanelCreated2(); void PanelRegistered(); void Exit(); void ReloadConfig(); // signals to inform kimpanel void enable(bool to_enable); void updatePreeditCaret(int pos); void updatePreeditText(const QString &text, const QList &attr); void updateAux(const QString &text, const QList &attr); void updateProperty(const KimpanelProperty &prop); void updateLookupTable(const KimpanelLookupTable &lookup_table); void updateLookupTableFull(const KimpanelLookupTable& lookup_table, int cursor, int layout); void updateSpotLocation(int x, int y); void updateSpotRect(int x, int y, int w ,int h); void registerProperties(const QList &props); void execDialog(const KimpanelProperty &prop); void execMenu(const QList &prop_list); void showPreedit(bool to_show); void showAux(bool to_show); void showLookupTable(bool to_show); void updateLookupTableCursor(int pos); private: bool m_show_aux; bool m_show_preedit; bool m_show_lookup_table; int m_spot_x; int m_spot_y; QString m_currentService; QStringList cached_props; ImpanelAdaptor* adaptor; Impanel2Adaptor* adaptor2; QDBusServiceWatcher* watcher; }; #endif // KIMPANEL_AGENT_H diff --git a/imports/activitymanager/sortedactivitiesmodel.h b/imports/activitymanager/sortedactivitiesmodel.h index f2a541ade..b51088592 100644 --- a/imports/activitymanager/sortedactivitiesmodel.h +++ b/imports/activitymanager/sortedactivitiesmodel.h @@ -1,94 +1,94 @@ /* * Copyright (C) 2016 Ivan Cukic * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * or (at your option) any later version, as published by the Free * Software Foundation * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef SORTED_ACTIVITY_MODEL #define SORTED_ACTIVITY_MODEL // Qt #include #include //For WId // KDE #include #include #include #include #include class SortedActivitiesModel : public QSortFilterProxyModel { Q_OBJECT Q_PROPERTY(bool inhibitUpdates READ inhibitUpdates WRITE setInhibitUpdates NOTIFY inhibitUpdatesChanged) public: SortedActivitiesModel(const QVector &states, QObject *parent = nullptr); - virtual ~SortedActivitiesModel(); + ~SortedActivitiesModel() override; QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override; QHash roleNames() const override; QString relativeActivity(int relative) const; protected: uint lastUsedTime(const QString &activity) const; bool lessThan(const QModelIndex & source_left, const QModelIndex & source_right) const override; enum AdditionalRoles { LastTimeUsed = KActivities::ActivitiesModel::UserRole, LastTimeUsedString = KActivities::ActivitiesModel::UserRole + 1, WindowCount = KActivities::ActivitiesModel::UserRole + 2, HasWindows = KActivities::ActivitiesModel::UserRole + 3 }; public Q_SLOTS: bool inhibitUpdates() const; void setInhibitUpdates(bool sortByLastUsedTime); void onBackgroundsUpdated(const QStringList &changedBackgrounds); void onCurrentActivityChanged(const QString ¤tActivity); QString activityIdForRow(int row) const; QString activityIdForIndex(const QModelIndex &index) const; int rowForActivityId(const QString &activity) const; void rowChanged(int row, const QVector &roles); void onWindowAdded(WId window); void onWindowRemoved(WId window); void onWindowChanged(WId window, NET::Properties properties, NET::Properties2 properties2); Q_SIGNALS: void inhibitUpdatesChanged(bool inhibitUpdates); private: bool m_inhibitUpdates; QString m_previousActivity; KActivities::ActivitiesModel *m_activitiesModel = nullptr; KActivities::Consumer *m_activities = nullptr; QHash> m_activitiesWindows; }; #endif // SORTED_ACTIVITY_MODEL diff --git a/kcms/access/kcmaccess.h b/kcms/access/kcmaccess.h index 361c70cc4..a8a39ce88 100644 --- a/kcms/access/kcmaccess.h +++ b/kcms/access/kcmaccess.h @@ -1,58 +1,58 @@ /* Copyright 2000 Matthias Hölzer-Klüpfel Copyright 2014 Frederik Gladhorn This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ #ifndef __kcmaccess_h__ #define __kcmaccess_h__ #include #include "ui_accessibility.h" class KAccessConfig : public KCModule { Q_OBJECT public: KAccessConfig(QWidget *parent, const QVariantList&); - virtual ~KAccessConfig(); + ~KAccessConfig() override; void load() override; void save() override; void defaults() override; protected Q_SLOTS: void configChanged(); void checkAccess(); void invertClicked(); void flashClicked(); void selectSound(); void changeFlashScreenColor(); void configureKNotify(); void launchOrcaConfiguration(); private: Ui::access ui; }; #endif diff --git a/kcms/colors/previewwidget.h b/kcms/colors/previewwidget.h index 66b2b62ff..0657c68a6 100644 --- a/kcms/colors/previewwidget.h +++ b/kcms/colors/previewwidget.h @@ -1,49 +1,49 @@ /* Preview widget for KDE Display color scheme setup module * Copyright (C) 2007 Matthew Woehlke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef __SCHEMEPREVIEW_H__ #define __SCHEMEPREVIEW_H__ #include #include #include #include "ui_preview.h" /** * The Desktop/Colors tab in kcontrol. */ class PreviewWidget : public QFrame, Ui::preview { Q_OBJECT public: PreviewWidget(QWidget *parent); - virtual ~PreviewWidget(); + ~PreviewWidget() override; void setPalette(const KSharedConfigPtr &config, QPalette::ColorGroup state = QPalette::Active); protected: void setPaletteRecursive(QWidget*, const QPalette&); bool eventFilter(QObject *, QEvent *) override; }; #endif diff --git a/kcms/colors/setpreviewwidget.h b/kcms/colors/setpreviewwidget.h index 3d29b4813..f4262324c 100644 --- a/kcms/colors/setpreviewwidget.h +++ b/kcms/colors/setpreviewwidget.h @@ -1,49 +1,49 @@ /* Colorset Preview widget for KDE Display color scheme setup module * Copyright (C) 2008 Matthew Woehlke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef __SCHEMEPREVIEWSET_H__ #define __SCHEMEPREVIEWSET_H__ #include #include #include #include #include "ui_setpreview.h" /** * The Desktop/Colors tab in kcontrol. */ class SetPreviewWidget : public QFrame, Ui::setpreview { Q_OBJECT public: SetPreviewWidget(QWidget *parent); - virtual ~SetPreviewWidget(); + ~SetPreviewWidget() override; void setPalette(const KSharedConfigPtr &config, KColorScheme::ColorSet); protected: void setPaletteRecursive(QWidget*, const QPalette&); bool eventFilter(QObject *, QEvent *) override; }; #endif diff --git a/kcms/componentchooser/componentchooser.h b/kcms/componentchooser/componentchooser.h index 2021ffe14..6647a6e3c 100644 --- a/kcms/componentchooser/componentchooser.h +++ b/kcms/componentchooser/componentchooser.h @@ -1,90 +1,90 @@ /*************************************************************************** componentchooser.h - description ------------------- copyright : (C) 2002 by Joseph Wenninger email : jowenn@kde.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License version 2 as * * published by the Free Software Foundationi * * * ***************************************************************************/ #ifndef _COMPONENTCHOOSER_H_ #define _COMPONENTCHOOSER_H_ #include "ui_componentchooser_ui.h" #include "ui_componentconfig_ui.h" #include //Added by qt3to4: #include #include class QListWidgetItem; class KConfig; /* The CfgPlugin class is an exception. It is LGPL. It will be parted of the plugin interface which I plan for KDE 3.2. */ class CfgPlugin { public: CfgPlugin(){} virtual ~CfgPlugin(){} virtual void load(KConfig *cfg)=0; virtual void save(KConfig *cfg)=0; virtual void defaults()=0; }; class CfgComponent: public QWidget, public Ui::ComponentConfig_UI, public CfgPlugin { Q_OBJECT public: CfgComponent(QWidget *parent); - virtual ~CfgComponent(); + ~CfgComponent() override; void load(KConfig *cfg) override; void save(KConfig *cfg) override; void defaults() override; protected: QHash m_lookupDict,m_revLookupDict; protected Q_SLOTS: void slotComponentChanged(const QString&); Q_SIGNALS: void changed(bool); }; class ComponentChooser : public QWidget, public Ui::ComponentChooser_UI { Q_OBJECT public: ComponentChooser(QWidget *parent=0); - virtual ~ComponentChooser(); + ~ComponentChooser() override; void load(); void save(); void restoreDefault(); private: QString latestEditedService; bool somethingChanged; QWidget *configWidget; QVBoxLayout *myLayout; protected Q_SLOTS: void emitChanged(bool); void slotServiceSelected(QListWidgetItem *); Q_SIGNALS: void changed(bool); }; #endif diff --git a/kcms/componentchooser/componentchooserbrowser.h b/kcms/componentchooser/componentchooserbrowser.h index 502110532..c6ca14d6e 100644 --- a/kcms/componentchooser/componentchooserbrowser.h +++ b/kcms/componentchooser/componentchooserbrowser.h @@ -1,44 +1,44 @@ /*************************************************************************** componentchooserbrowser.h ------------------- copyright : (C) 2002 by Joseph Wenninger email : jowenn@kde.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License version 2 as * * published by the Free Software Foundationi * * * ***************************************************************************/ #ifndef COMPONENTCHOOSERBROWSER_H #define COMPONENTCHOOSERBROWSER_H #include "ui_browserconfig_ui.h" #include "componentchooser.h" class CfgBrowser: public QWidget, public Ui::BrowserConfig_UI, public CfgPlugin { Q_OBJECT public: CfgBrowser(QWidget *parent); - virtual ~CfgBrowser(); + ~CfgBrowser() override; void load(KConfig *cfg) override; void save(KConfig *cfg) override; void defaults() override; protected Q_SLOTS: void selectBrowser(); void configChanged(); Q_SIGNALS: void changed(bool); private: QString m_browserExec; KService::Ptr m_browserService; }; #endif /* COMPONENTCHOOSERBROWSER_H */ diff --git a/kcms/componentchooser/componentchooseremail.h b/kcms/componentchooser/componentchooseremail.h index 9cec7c488..75f7337c8 100644 --- a/kcms/componentchooser/componentchooseremail.h +++ b/kcms/componentchooser/componentchooseremail.h @@ -1,45 +1,45 @@ /*************************************************************************** componentchooseremail.h ------------------- copyright : (C) 2002 by Joseph Wenninger email : jowenn@kde.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License version 2 as * * published by the Free Software Foundationi * * * ***************************************************************************/ #ifndef COMPONENTCHOOSEREMAIL_H #define COMPONENTCHOOSEREMAIL_H class KEMailSettings; #include "ui_emailclientconfig_ui.h" #include "componentchooser.h" class CfgEmailClient: public QWidget, public Ui::EmailClientConfig_UI, public CfgPlugin { Q_OBJECT public: CfgEmailClient(QWidget *parent); - virtual ~CfgEmailClient(); + ~CfgEmailClient() override; void load(KConfig *cfg) override; void save(KConfig *cfg) override; void defaults() override; private: KEMailSettings *pSettings; KService::Ptr m_emailClientService; protected Q_SLOTS: void selectEmailClient(); void configChanged(); Q_SIGNALS: void changed(bool); }; #endif diff --git a/kcms/componentchooser/componentchooserfilemanager.h b/kcms/componentchooser/componentchooserfilemanager.h index fcc0656cb..41374f022 100644 --- a/kcms/componentchooser/componentchooserfilemanager.h +++ b/kcms/componentchooser/componentchooserfilemanager.h @@ -1,48 +1,48 @@ /* This file is part of the KDE project Copyright (C) 2008 David Faure This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or ( at your option ) version 3 or, at the discretion of KDE e.V. ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef COMPONENTCHOOSERFILEMANAGER_H #define COMPONENTCHOOSERFILEMANAGER_H #include "ui_filemanagerconfig_ui.h" #include "componentchooser.h" class CfgFileManager: public QWidget, public Ui::FileManagerConfig_UI, public CfgPlugin { Q_OBJECT public: CfgFileManager(QWidget *parent); - virtual ~CfgFileManager(); + ~CfgFileManager() override; void load(KConfig *cfg) override; void save(KConfig *cfg) override; void defaults() override; protected Q_SLOTS: void slotAddFileManager(); void configChanged(); Q_SIGNALS: void changed(bool); private: QList mDynamicWidgets; }; #endif diff --git a/kcms/componentchooser/componentchooserterminal.h b/kcms/componentchooser/componentchooserterminal.h index 974f7a5f2..0ec0f9663 100644 --- a/kcms/componentchooser/componentchooserterminal.h +++ b/kcms/componentchooser/componentchooserterminal.h @@ -1,42 +1,42 @@ /*************************************************************************** componentchooserterminal.h - description ------------------- copyright : (C) 2002 by Joseph Wenninger email : jowenn@kde.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License version 2 as * * published by the Free Software Foundationi * * * ***************************************************************************/ #ifndef _COMPONENTCHOOSERTERMINAL_H_ #define _COMPONENTCHOOSERTERMINAL_H_ #include "ui_terminalemulatorconfig_ui.h" #include "componentchooser.h" class KConfig; class CfgPlugin; class CfgTerminalEmulator: public QWidget, public Ui::TerminalEmulatorConfig_UI, public CfgPlugin { Q_OBJECT public: CfgTerminalEmulator(QWidget *parent); - virtual ~CfgTerminalEmulator(); + ~CfgTerminalEmulator() override; void load(KConfig *cfg) override; void save(KConfig *cfg) override; void defaults() override; protected Q_SLOTS: void selectTerminalApp(); void configChanged(); Q_SIGNALS: void changed(bool); }; #endif diff --git a/kcms/icons/iconthemes.h b/kcms/icons/iconthemes.h index d37ca89a5..374e3184f 100644 --- a/kcms/icons/iconthemes.h +++ b/kcms/icons/iconthemes.h @@ -1,74 +1,74 @@ /** * Copyright (c) 2000 Antonio Larrosa * KDE Frameworks 5 port Copyright (C) 2013 Jonathan Riddell * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef ICONTHEMES_H #define ICONTHEMES_H #include #include #include class QStringList; class QPushButton; class QTreeWidget; class QTreeWidgetItem; Q_DECLARE_LOGGING_CATEGORY(KCM_ICONS) class IconThemesConfig : public KCModule { Q_OBJECT public: IconThemesConfig(QWidget *parent); - virtual ~IconThemesConfig(); + ~IconThemesConfig() override; void loadThemes(); bool installThemes(const QStringList &themes, const QString &archiveName); QStringList findThemeDirs(const QString &archiveName); void updateRemoveButton(); void load() override; void save() override; void defaults() override; int buttons(); protected Q_SLOTS: void themeSelected(QTreeWidgetItem *item); void installNewTheme(); void getNewTheme(); void removeSelectedTheme(); private: QTreeWidgetItem *iconThemeItem(const QString &name); QTreeWidget *m_iconThemes; QPushButton *m_removeButton; QLabel *m_previewExec; QLabel *m_previewFolder; QLabel *m_previewDocument; QTreeWidgetItem *m_defaultTheme; bool m_bChanged; }; #endif // ICONTHEMES_H diff --git a/kcms/keyboard/bindings.h b/kcms/keyboard/bindings.h index aa47543b8..d803eb7c6 100644 --- a/kcms/keyboard/bindings.h +++ b/kcms/keyboard/bindings.h @@ -1,51 +1,51 @@ /* * Copyright (C) 2010 Andriy Rysin (rysin@kde.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef BINDINGS_H_ #define BINDINGS_H_ #include struct Rules; struct LayoutUnit; template class QList; class KeyboardLayoutActionCollection : public KActionCollection { public: KeyboardLayoutActionCollection(QObject* parent, bool configAction); - virtual ~KeyboardLayoutActionCollection(); + ~KeyboardLayoutActionCollection() override; QAction* getToggleAction(); // KAction* getAction(const LayoutUnit& layoutUnit); QAction* createLayoutShortcutActon(const LayoutUnit& layoutUnit, const Rules* rules, bool autoload); // KAction* setShortcut(LayoutUnit& layoutUnit, const QKeySequence& keySequence, const Rules* rules); void setLayoutShortcuts(QList& layoutUnits, const Rules* rules); void setToggleShortcut(const QKeySequence& keySequence); void loadLayoutShortcuts(QList& layoutUnits, const Rules* rules); void resetLayoutShortcuts(); private: bool configAction; }; //KActionCollection* createGlobalActionCollection(QObject *parent, KAction** mainAction); //KAction* createLayoutShortcutActon(KActionCollection* actionCollection, const LayoutUnit& layoutUnit, const Rules* rules); #endif /* BINDINGS_H_ */ diff --git a/kcms/keyboard/flags.h b/kcms/keyboard/flags.h index b44ee4323..6d6be87ef 100644 --- a/kcms/keyboard/flags.h +++ b/kcms/keyboard/flags.h @@ -1,72 +1,72 @@ /* * Copyright (C) 2010 Andriy Rysin (rysin@kde.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef FLAGS_H_ #define FLAGS_H_ #include #include #include class QPixmap; class QIcon; struct LayoutUnit; class KeyboardConfig; struct Rules; class QPainter; namespace Plasma { class Svg; } class Flags : public QObject { Q_OBJECT public: Flags(); - virtual ~Flags(); + ~Flags() override; const QIcon getIcon(const QString& layout); const QIcon getIconWithText(const LayoutUnit& layoutUnit, const KeyboardConfig& keyboardConfig); const QPixmap& getTransparentPixmap() const { return *transparentPixmap; } static QString getLongText(const LayoutUnit& layoutUnit, const Rules* rules); static QString getShortText(const LayoutUnit& layoutUnit, const KeyboardConfig& keyboardConfig); static QString getFullText(const LayoutUnit& layoutUnit, const KeyboardConfig& keyboardConfig, const Rules* rules); public Q_SLOTS: void themeChanged(); void clearCache(); Q_SIGNALS: void pixmapChanged(); private: QIcon createIcon(const QString& layout); QString getCountryFromLayoutName(const QString& fullLayoutName) const; void drawLabel(QPainter& painter, const QString& layoutText, bool flagShown); Plasma::Svg* getSvg(); QMap iconMap; QMap iconOrTextMap; QPixmap* transparentPixmap; Plasma::Svg* svg; }; #endif /* FLAGS_H_ */ diff --git a/kcms/keyboard/kcm_keyboard.h b/kcms/keyboard/kcm_keyboard.h index 31c13bd10..abd218d76 100644 --- a/kcms/keyboard/kcm_keyboard.h +++ b/kcms/keyboard/kcm_keyboard.h @@ -1,47 +1,47 @@ /* * Copyright (C) 2010 Andriy Rysin (rysin@kde.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KCM_KEYBOARD_H_ #define KCM_KEYBOARD_H_ #include class KCMKeyboardWidget; class KeyboardConfig; struct Rules; class KCMKeyboard: public KCModule { Q_OBJECT public: KCMKeyboard(QWidget *parent, const QVariantList &); - virtual ~KCMKeyboard(); + ~KCMKeyboard() override; void save() override; void load() override; void defaults() override; private: Rules* rules; KeyboardConfig* keyboardConfig; KCMKeyboardWidget *widget; }; #endif /* KCM_KEYBOARD_H_ */ diff --git a/kcms/keyboard/kcm_keyboard_widget.h b/kcms/keyboard/kcm_keyboard_widget.h index 9d635d8c9..86b45f318 100644 --- a/kcms/keyboard/kcm_keyboard_widget.h +++ b/kcms/keyboard/kcm_keyboard_widget.h @@ -1,103 +1,103 @@ /* * Copyright (C) 2010 Andriy Rysin (rysin@kde.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KCM_KEYBOARD_WIDGET_H_ #define KCM_KEYBOARD_WIDGET_H_ #include "ui_kcm_keyboard.h" #include #include class QWidget; class KeyboardConfig; struct Rules; class Flags; class QString; class QPushButton; class LayoutsTableModel; class KCMiscKeyboardWidget; class KeyboardLayoutActionCollection; class KCMKeyboardWidget: public QTabWidget { Q_OBJECT public: KCMKeyboardWidget(Rules* rules, KeyboardConfig* keyboardConfig, const QVariantList &args, QWidget* parent=0); - virtual ~KCMKeyboardWidget(); + ~KCMKeyboardWidget() override; void updateUI(); void save(); //temp hack KCMiscKeyboardWidget* getKcmMiscWidget() const { return kcmMiscWidget; } Q_SIGNALS: void changed(bool state); private Q_SLOTS: void addLayout(); void removeLayout(); void layoutSelectionChanged(); void uiChanged(); void scrollToGroupShortcut(); void scrollTo3rdLevelShortcut(); void clearGroupShortcuts(); void clear3rdLevelShortcuts(); void updateXkbShortcutsButtons(); void moveUp(); void moveDown(); void configureLayoutsChanged(); void configureXkbOptionsChanged(); #ifdef NEW_GEOMETRY void previewLayout(); #endif private: Rules *rules; Flags *flags; Ui::TabWidget *uiWidget; KeyboardConfig *keyboardConfig; KeyboardLayoutActionCollection* actionCollection; LayoutsTableModel* layoutsTableModel; KCMiscKeyboardWidget* kcmMiscWidget; bool uiUpdating; void initializeLayoutsUI(); void initializeXkbOptionsUI(); void initializeKeyboardModelUI(); void updateHardwareUI(); void updateLayoutsUI(); void updateShortcutsUI(); void updateXkbOptionsUI(); void updateSwitcingPolicyUI(); void updateXkbShortcutButton(const QString& groupName, QPushButton* button); void clearXkbGroup(const QString& groupName); void moveSelectedLayouts(int shift); void populateWithCurrentLayouts(); void populateWithCurrentXkbOptions(); void updateLoopCount(); void handleParameters(const QVariantList &args); }; #endif /* KCM_KEYBOARD_WIDGET_H_ */ diff --git a/kcms/keyboard/keyboard_daemon.h b/kcms/keyboard/keyboard_daemon.h index 14728f0dd..a6ca3c063 100644 --- a/kcms/keyboard/keyboard_daemon.h +++ b/kcms/keyboard/keyboard_daemon.h @@ -1,77 +1,77 @@ /* * Copyright (C) 2010 Andriy Rysin (rysin@kde.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KEYBOARD_DAEMON_H_ #define KEYBOARD_DAEMON_H_ #include #include #include "layout_memory.h" #include "keyboard_dbus.h" #include "bindings.h" class XInputEventNotifier; class LayoutTrayIcon; class KeyboardConfig; struct Rules; class Q_DECL_EXPORT KeyboardDaemon : public KDEDModule { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.kde.KeyboardLayouts") KeyboardConfig keyboardConfig; KeyboardLayoutActionCollection *actionCollection; XInputEventNotifier* xEventNotifier; LayoutTrayIcon* layoutTrayIcon; LayoutMemory layoutMemory; LayoutUnit currentLayout; const Rules* rules; void registerListeners(); void registerShortcut(); void unregisterListeners(); void unregisterShortcut(); void setupTrayIcon(); private Q_SLOTS: void switchToNextLayout(); void configureKeyboard(); void configureMouse(); void layoutChanged(); void layoutMapChanged(); bool setLayout(QAction* action); public Q_SLOTS: Q_SCRIPTABLE bool setLayout(const QString& layout); Q_SCRIPTABLE QString getCurrentLayout(); Q_SCRIPTABLE QStringList getLayoutsList(); Q_SCRIPTABLE QString getLayoutDisplayName(const QString &layout); Q_SIGNALS: Q_SCRIPTABLE void currentLayoutChanged(QString layout); Q_SCRIPTABLE void layoutListChanged(); public: KeyboardDaemon(QObject *parent, const QList&); - virtual ~KeyboardDaemon(); + ~KeyboardDaemon() override; }; #endif /* KEYBOARD_DAEMON_H_ */ diff --git a/kcms/keyboard/layout_memory.h b/kcms/keyboard/layout_memory.h index eb6e47ac2..145946cb4 100644 --- a/kcms/keyboard/layout_memory.h +++ b/kcms/keyboard/layout_memory.h @@ -1,66 +1,66 @@ /* * Copyright (C) 2010 Andriy Rysin (rysin@kde.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LAYOUT_MEMORY_H_ #define LAYOUT_MEMORY_H_ #include #include #include //For WId #include "x11_helper.h" #include "keyboard_config.h" class LayoutMemoryPersister; class LayoutMemory : public QObject { Q_OBJECT // if there's some transient windows coming up we'll need to either ignore it // or in case of layout switcher popup menu to apply new layout to previous key QString previousLayoutMapKey; QList prevLayoutList; const KeyboardConfig& keyboardConfig; void registerListeners(); void unregisterListeners(); QString getCurrentMapKey(); void setCurrentLayoutFromMap(); public Q_SLOTS: void layoutMapChanged(); void layoutChanged(); void windowChanged(WId wId); void desktopChanged(int desktop); public: LayoutMemory(const KeyboardConfig& keyboardConfig); - virtual ~LayoutMemory(); + ~LayoutMemory() override; void configChanged(); protected: //QVariant does not support long for WId so we'll use QString for key instead QMap layoutMap; friend class LayoutMemoryPersister; }; #endif /* LAYOUT_MEMORY_H_ */ diff --git a/kcms/keyboard/layouts_menu.h b/kcms/keyboard/layouts_menu.h index ccf9e25d9..530d74ce7 100644 --- a/kcms/keyboard/layouts_menu.h +++ b/kcms/keyboard/layouts_menu.h @@ -1,56 +1,56 @@ /* * Copyright (C) 2010 Andriy Rysin (rysin@kde.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LAYOUTS_MENU_H_ #define LAYOUTS_MENU_H_ #include #include class QAction; class KeyboardConfig; class Flags; struct Rules; class QActionGroup; struct LayoutUnit; class LayoutsMenu : public QObject { Q_OBJECT public: LayoutsMenu(const KeyboardConfig& keyboardConfig, const Rules& rules, Flags& flags); - virtual ~LayoutsMenu(); + ~LayoutsMenu() override; QList contextualActions(); static int switchToLayout(const LayoutUnit& layoutUnit, const KeyboardConfig& keyboardConfig); private Q_SLOTS: void actionTriggered(QAction* action); private: const QIcon getFlag(const QString& layout) const; QAction* createAction(const LayoutUnit& layoutUnit) const; const KeyboardConfig& keyboardConfig; const Rules& rules; Flags& flags; QActionGroup* actionGroup; }; #endif /* LAYOUTS_MENU_H_ */ diff --git a/kcms/keyboard/preview/kbpreviewframe.h b/kcms/keyboard/preview/kbpreviewframe.h index 67e4f306c..618948739 100644 --- a/kcms/keyboard/preview/kbpreviewframe.h +++ b/kcms/keyboard/preview/kbpreviewframe.h @@ -1,95 +1,95 @@ /* * Copyright (C) 2012 Shivam Makkar (amourphious1992@gmail.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KBPREVIEWFRAME_H #define KBPREVIEWFRAME_H #include "keyboardlayout.h" #include "keysymhelper.h" #include "keyaliases.h" #include #include #include #include #include Q_DECLARE_LOGGING_CATEGORY(KEYBOARD_PREVIEW) class Geometry; class GShape; class KbPreviewFrame : public QFrame { Q_OBJECT private: static const int width = 1100, height = 490; KeySymHelper symbol; Aliases alias; QStringList tooltip; QList tipPoint; int l_id; Geometry &geometry; float scaleFactor; KbLayout keyboardLayout; void drawKeySymbols(QPainter &painter, QPoint temp[], const GShape &s, const QString &name); void drawShape(QPainter &painter, const GShape &s, int x, int y, int i, const QString &name); int itemAt(const QPoint &pos); protected: bool event(QEvent *event) override; public: explicit KbPreviewFrame(QWidget *parent = 0); - virtual ~KbPreviewFrame(); + ~KbPreviewFrame() override; void paintEvent(QPaintEvent *event) override; void generateKeyboardLayout(const QString &layout, const QString &layoutVariant, const QString &model); int getWidth() const; int getHeight() const; int getLevel() { return keyboardLayout.getLevel(); } void setL_id(int lId) { l_id = lId; repaint(); } QString getLayoutName() const { return keyboardLayout.getLayoutName(); } float getScaleFactor() { return scaleFactor; } }; #endif // KBPREVIEWFRAME_H diff --git a/kcms/keys/export_scheme_dialog.h b/kcms/keys/export_scheme_dialog.h index 8cc8c6634..b8a255557 100644 --- a/kcms/keys/export_scheme_dialog.h +++ b/kcms/keys/export_scheme_dialog.h @@ -1,59 +1,59 @@ #ifndef EXPORT_SCHEME_DIALOG_H #define EXPORT_SCHEME_DIALOG_H /** * Copyright (C) 2009 Michael Jansen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "ui_export_scheme_dialog.h" #include #include /** * @author Michael Jansen */ class ExportSchemeDialog : public KDialog { Q_OBJECT public: ExportSchemeDialog (QStringList components, QWidget *parent=NULL); - virtual ~ExportSchemeDialog(); + ~ExportSchemeDialog() override; // Get the list of currently selected components QStringList selectedComponents() const; private: Ui::ExportSchemeDialog ui; // list of components to choose from QStringList mComponents; // list of buttons for the components QButtonGroup mButtons; }; // ExportSchemeDialog #endif /* EXPORT_SCHEME_DIALOG_H */ diff --git a/kcms/kfontinst/kcmfontinst/FontList.h b/kcms/kfontinst/kcmfontinst/FontList.h index a535ef9a6..ab5834685 100644 --- a/kcms/kfontinst/kcmfontinst/FontList.h +++ b/kcms/kfontinst/kcmfontinst/FontList.h @@ -1,382 +1,382 @@ #ifndef __FONT_LIST_H__ #define __FONT_LIST_H__ /* * KFontInst - KDE Font Installer * * Copyright 2003-2007 Craig Drummond * * ---- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include "Misc.h" #include "JobRunner.h" #include "FontFilter.h" #include "FcQuery.h" #include "File.h" #include "Style.h" #include "Family.h" #include "FontInst.h" class KConfigGroup; class KFileItem; class KFileItemList; class QMenu; class QPixmap; class QMimeData; class QTimer; class QPoint; #define KFI_FONT_DRAG_MIME "kfontinst/fontlist" namespace KFI { class CFontItem; class CFontItem; class CFamilyItem; class CGroupListItem; class Style; enum EColumns { COL_FONT, COL_STATUS, NUM_COLS }; typedef QList CFamilyItemCont; typedef QList CFontItemCont; typedef QHash CFamilyItemHash; class CFontList : public QAbstractItemModel { Q_OBJECT private: enum EMsgType { MSG_ADD, MSG_DEL, NUM_MSGS_TYPES }; public: static const QStringList fontMimeTypes; public: static QStringList compact(const QStringList &fonts); CFontList(QWidget *parent=0); ~CFontList(); QVariant data(const QModelIndex &index, int role) const override; Qt::ItemFlags flags(const QModelIndex &index) const override; Qt::DropActions supportedDropActions() const override; QMimeData * mimeData(const QModelIndexList &indexes) const override; QStringList mimeTypes() const override; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; QModelIndex parent(const QModelIndex &index) const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; int columnCount(const QModelIndex &parent = QModelIndex()) const override; int row(const CFamilyItem *fam) const { return itsFamilies.indexOf((CFamilyItem *)fam); } void forceNewPreviews(); const CFamilyItemCont & families() const { return itsFamilies; } QModelIndex createIndex(int row, int column, void *data = 0) const { return QAbstractItemModel::createIndex(row, column, data); } bool hasFamily(const QString &family) { return NULL!=findFamily(family); } void refresh(bool allowSys, bool allowUser); bool allowSys() const { return itsAllowSys; } bool allowUser() const { return itsAllowUser; } void getFamilyStats(QSet &enabled, QSet &disabled, QSet &partial); void getFoundries(QSet &foundries) const; QString whatsThis() const; void setSlowUpdates(bool slow); bool slowUpdates() const { return itsSlowUpdates; } Q_SIGNALS: void listingPercent(int p); public Q_SLOTS: void unsetSlowUpdates(); void load(); private Q_SLOTS: void dbusServiceOwnerChanged(const QString &name, const QString &from, const QString &to); void fontList(int pid, const QList &families); void fontsAdded(const KFI::Families &families); void fontsRemoved(const KFI::Families &families); private: void storeSlowedMessage(const Families &families, EMsgType type); void actionSlowedUpdates(bool sys); void addFonts(const FamilyCont &families, bool sys); void removeFonts(const FamilyCont &families, bool sys); CFamilyItem * findFamily(const QString &familyName); private: CFamilyItemCont itsFamilies; CFamilyItemHash itsFamilyHash; bool itsBlockSignals, itsAllowSys, itsAllowUser, itsSlowUpdates; static int theirPreviewSize; FamilyCont itsSlowedMsgs[NUM_MSGS_TYPES][FontInst::FOLDER_COUNT]; }; class CFontModelItem { public: CFontModelItem(CFontModelItem *p) : itsParent(p), itsIsSystem(false) { } virtual ~CFontModelItem() { } CFontModelItem * parent() const { return itsParent; } bool isFamily() const { return NULL==itsParent; } bool isFont() const { return NULL!=itsParent; } bool isSystem() const { return itsIsSystem; } void setIsSystem(bool sys) { itsIsSystem=sys; } virtual int rowNumber() const = 0; protected: CFontModelItem *itsParent; bool itsIsSystem; }; class CFamilyItem : public CFontModelItem { public: enum EStatus { ENABLED, PARTIAL, DISABLED }; CFamilyItem(CFontList &p, const Family &f, bool sys); - virtual ~CFamilyItem(); + ~CFamilyItem() override; bool operator==(const CFamilyItem &other) const { return itsName==other.itsName; } bool addFonts(const StyleCont &styles, bool sys); const QString & name() const { return itsName; } const CFontItemCont & fonts() const { return itsFonts; } void addFont(CFontItem *font, bool update=true); void removeFont(CFontItem *font, bool update); void refresh(); bool updateStatus(); bool updateRegularFont(CFontItem *font); CFontItem * findFont(quint32 style, bool sys); int rowNumber() const override { return itsParent.row(this); } int row(const CFontItem *font) const { return itsFonts.indexOf((CFontItem *)font); } EStatus status() const { return itsStatus; } EStatus realStatus() const { return itsRealStatus; } CFontItem * regularFont() { return itsRegularFont; } int fontCount() const { return itsFontCount; } void getFoundries(QSet &foundries) const; bool slowUpdates() const { return itsParent.slowUpdates(); } private: bool usable(const CFontItem *font, bool root); private: QString itsName; CFontItemCont itsFonts; int itsFontCount; EStatus itsStatus, itsRealStatus; CFontItem *itsRegularFont; // 'RegularFont' is font nearest to 'Regular' style, and used for previews. CFontList &itsParent; }; class CFontItem : public CFontModelItem { public: CFontItem(CFontModelItem *p, const Style &s, bool sys); virtual ~CFontItem() { } void refresh(); QString name() const { return family()+QString::fromLatin1(", ")+itsStyleName; } bool isEnabled() const { return itsEnabled; } bool isHidden() const { return !itsEnabled; } bool isBitmap() const { return !itsStyle.scalable(); } const QString & fileName() const { return (*itsStyle.files().begin()).path(); } const QString & style() const { return itsStyleName; } quint32 styleInfo() const { return itsStyle.value(); } int index() const { return (*itsStyle.files().begin()).index(); } const QString & family() const { return (static_cast(parent()))->name(); } int rowNumber() const override { return (static_cast(parent()))->row(this); } const FileCont & files() const { return itsStyle.files(); } qulonglong writingSystems() const { return itsStyle.writingSystems(); } QUrl url() const { return CJobRunner::encode(family(), styleInfo(), isSystem()); } void removeFile(const File &f){ itsStyle.remove(f); } void removeFiles(const FileCont &f){ itsStyle.removeFiles(f); } void addFile(const File &f) { itsStyle.add(f); } void addFiles(const FileCont &f) { itsStyle.addFiles(f); } private: QString itsStyleName; Style itsStyle; bool itsEnabled; }; class CFontListSortFilterProxy : public QSortFilterProxyModel { Q_OBJECT public: CFontListSortFilterProxy(QObject *parent, QAbstractItemModel *model); virtual ~CFontListSortFilterProxy() { } QVariant data(const QModelIndex &idx, int role) const override; bool acceptFont(CFontItem *fnt, bool checkFontText) const; bool acceptFamily(CFamilyItem *fam) const; bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; void setFilterGroup(CGroupListItem *grp); CGroupListItem * filterGroup() { return itsGroup; } void setFilterText(const QString &text); void setFilterCriteria(CFontFilter::ECriteria crit, qulonglong ws, const QStringList &ft); private Q_SLOTS: void timeout(); void fcResults(); Q_SIGNALS: void refresh(); private: QString filterText() const { return CFontFilter::CRIT_FONTCONFIG==itsFilterCriteria ? (itsFcQuery ? itsFcQuery->font() : QString()) : itsFilterText; } private: CGroupListItem *itsGroup; QString itsFilterText; CFontFilter::ECriteria itsFilterCriteria; qulonglong itsFilterWs; QStringList itsFilterTypes; QTimer *itsTimer; CFcQuery *itsFcQuery; }; class CFontListView : public QTreeView { Q_OBJECT public: CFontListView(QWidget *parent, CFontList *model); virtual ~CFontListView() { } void getFonts(CJobRunner::ItemList &urls, QStringList &fontNames, QSet *fonts, bool selected, bool getEnabled=true, bool getDisabled=true); QSet getFiles(); void getPrintableFonts(QSet &items, bool selected); void setFilterGroup(CGroupListItem *grp); void stats(int &enabled, int &disabled, int &partial); void selectedStatus(bool &enabled, bool &disabled); QModelIndexList allFonts(); void selectFirstFont(); QModelIndexList getSelectedItems(); Q_SIGNALS: void del(); void print(); void enable(); void disable(); void fontsDropped(const QSet &); void itemsSelected(const QModelIndexList &); void refresh(); void reload(); public Q_SLOTS: void listingPercent(int percent); void refreshFilter(); void filterText(const QString &text); void filterCriteria(int crit, qulonglong ws, const QStringList &ft); private Q_SLOTS: void setSortColumn(int col); void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override; void itemCollapsed(const QModelIndex &index); void view(); private: QModelIndexList allIndexes(); void startDrag(Qt::DropActions supportedActions) override; void dragEnterEvent(QDragEnterEvent *event) override; void dropEvent(QDropEvent *event) override; void contextMenuEvent(QContextMenuEvent *ev) override; bool viewportEvent(QEvent *event) override; private: CFontListSortFilterProxy *itsProxy; CFontList *itsModel; QMenu *itsMenu; QAction *itsDeleteAct, *itsEnableAct, *itsDisableAct, *itsPrintAct, *itsViewAct; bool itsAllowDrops; }; } #endif diff --git a/kcms/kfontinst/kcmfontinst/KCmFontInst.h b/kcms/kfontinst/kcmfontinst/KCmFontInst.h index be0feb561..c8924a8ba 100644 --- a/kcms/kfontinst/kcmfontinst/KCmFontInst.h +++ b/kcms/kfontinst/kcmfontinst/KCmFontInst.h @@ -1,145 +1,145 @@ #ifndef __KCM_FONT_INST_H__ #define __KCM_FONT_INST_H__ /* * KFontInst - KDE Font Installer * * Copyright 2003-2007 Craig Drummond * * ---- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "GroupList.h" #include "JobRunner.h" #include #include #include #include #include class QPushButton; class QProgressDialog; class QTemporaryDir; class KToggleAction; class KActionMenu; class QAction; class QLabel; class QMenu; class QProcess; class QSplitter; class QComboBox; namespace KFI { class CFontFilter; class CFontList; class CFontPreview; class CUpdateDialog; class CFontListView; class CProgressBar; class CPreviewListView; class CKCmFontInst : public KCModule { Q_OBJECT public: explicit CKCmFontInst(QWidget *parent=NULL, const QVariantList &list=QVariantList()); - virtual ~CKCmFontInst(); + ~CKCmFontInst() override; public Q_SLOTS: QString quickHelp() const override; void previewMenu(const QPoint &pos); void splitterMoved(); void fontsSelected(const QModelIndexList &list); void groupSelected(const QModelIndex &index); void addFonts(); void deleteFonts(); void moveFonts(); void zipGroup(); void enableFonts(); void disableFonts(); void addGroup(); void removeGroup(); void enableGroup(); void disableGroup(); void changeText(); void duplicateFonts(); void downloadFonts(); void print(); void printGroup(); void listingPercent(int p); void refreshFontList(); void refreshFamilies(); void showInfo(const QString &info); void setStatusBar(); void addFonts(const QSet &src); private: void removeDeletedFontsFromGroups(); void selectGroup(CGroupListItem::EType grp); void print(bool all); void toggleGroup(bool enable); void toggleFonts(bool enable, const QString &grp=QString()); void toggleFonts(CJobRunner::ItemList &urls, const QStringList &fonts, bool enable, const QString &grp); void selectMainGroup(); void doCmd(CJobRunner::ECommand cmd, const CJobRunner::ItemList &urls, bool system=false); private: QSplitter *itsGroupSplitter, *itsPreviewSplitter; CFontPreview *itsPreview; CPreviewListView *itsPreviewList; KConfig itsConfig; QLabel *itsStatusLabel; CProgressBar *itsListingProgress; CFontList *itsFontList; CFontListView *itsFontListView; CGroupList *itsGroupList; CGroupListView *itsGroupListView; KActionMenu *itsToolsMenu; QPushButton *itsDeleteGroupControl, *itsEnableGroupControl, *itsDisableGroupControl, *itsAddFontControl, *itsDeleteFontControl; CFontFilter *itsFilter; QString itsLastStatusBarMsg; KIO::Job *itsJob; QProgressDialog *itsProgress; CUpdateDialog *itsUpdateDialog; QTemporaryDir *itsTempDir; QProcess *itsPrintProc; QSet itsDeletedFonts; QList itsModifiedUrls; CJobRunner *itsRunner; QMenu *itsPreviewMenu, *itsPreviewListMenu; QAction *itsDownloadFontsAct; QWidget *itsPreviewWidget; bool itsPreviewHidden; }; } #endif diff --git a/kcms/kfontinst/kio/FontInstInterface.h b/kcms/kfontinst/kio/FontInstInterface.h index 042338426..33427383a 100644 --- a/kcms/kfontinst/kio/FontInstInterface.h +++ b/kcms/kfontinst/kio/FontInstInterface.h @@ -1,75 +1,75 @@ #ifndef __FONTINST_INTERFACE_H__ #define __FONTINST_INTERFACE_H__ /* * KFontInst - KDE Font Installer * * Copyright 2003-2009 Craig Drummond * * ---- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include #include #include "Family.h" class QTimer; class OrgKdeFontinstInterface; namespace KFI { class FontInstInterface : public QObject { Q_OBJECT public: FontInstInterface(); - virtual ~FontInstInterface(); + ~FontInstInterface() override; int install(const QString &file, bool toSystem); int uninstall(const QString &name, bool fromSystem); int reconfigure(); Families list(bool system); Family statFont(const QString &file, bool system); QString folderName(bool sys); private: int waitForResponse(); private Q_SLOTS: void dbusServiceOwnerChanged(const QString &name, const QString &from, const QString &to); void status(int pid, int value); void fontList(int pid, const QList &families); void fontStat(int pid, const KFI::Family &font); private: OrgKdeFontinstInterface *itsInterface; bool itsActive; int itsStatus; Families itsFamilies; QEventLoop itsEventLoop; }; } #endif diff --git a/kcms/kfontinst/kio/KioFonts.h b/kcms/kfontinst/kio/KioFonts.h index 61b6ac013..a29d3b9fc 100644 --- a/kcms/kfontinst/kio/KioFonts.h +++ b/kcms/kfontinst/kio/KioFonts.h @@ -1,86 +1,86 @@ #ifndef __KIO_FONTS_H__ #define __KIO_FONTS_H__ /* * KFontInst - KDE Font Installer * * Copyright 2003-2007 Craig Drummond * * ---- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include #include #include class QTemporaryDir; class QUrl; namespace KFI { class Family; class Style; class FontInstInterface; class CKioFonts : public KIO::SlaveBase { public: enum EFolder { FOLDER_USER, FOLDER_SYS, FOLDER_ROOT, FOLDER_UNKNOWN }; CKioFonts(const QByteArray &pool, const QByteArray &app); - virtual ~CKioFonts(); + ~CKioFonts() override; void listDir(const QUrl &url) override; void put(const QUrl &url, int permissions, KIO::JobFlags flags) override; void get(const QUrl &url) override; void del(const QUrl &url, bool isFile) override; void copy(const QUrl &src, const QUrl &dest, int mode, KIO::JobFlags flags) override; void rename(const QUrl &src, const QUrl &dest, KIO::JobFlags flags) override; void statFont(const QUrl &url); void special(const QByteArray &a) override; private: int listFolder(KIO::UDSEntry &entry, EFolder folder); QString getUserName(uid_t uid); QString getGroupName(gid_t gid); bool createStatEntry(KIO::UDSEntry &entry, const QUrl &url, EFolder folder); void createUDSEntry(KIO::UDSEntry &entry, EFolder folder); bool createUDSEntry(KIO::UDSEntry &entry, EFolder folder, const Family &family, const Style &style); Family getFont(const QUrl &url, EFolder folder); void handleResp(int resp, const QString &file, const QString &tempFile=QString(), bool destIsSystem=false); private: FontInstInterface *itsInterface; QTemporaryDir *itsTempDir; QHash itsUserCache; QHash itsGroupCache; }; } #endif diff --git a/kcms/kfontinst/viewpart/FontPreview.h b/kcms/kfontinst/viewpart/FontPreview.h index 086ae3e1c..cb334a5e4 100644 --- a/kcms/kfontinst/viewpart/FontPreview.h +++ b/kcms/kfontinst/viewpart/FontPreview.h @@ -1,96 +1,96 @@ #ifndef __FONT_PREVIEW_H__ #define __FONT_PREVIEW_H__ /* * KFontInst - KDE Font Installer * * Copyright 2003-2007 Craig Drummond * * ---- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include #include #include #include #include "KfiConstants.h" #include "FcEngine.h" class QWheelEvent; namespace KFI { class CCharTip; class CFcEngine; class CFontPreview : public QWidget { Q_OBJECT public: CFontPreview(QWidget *parent); - virtual ~CFontPreview(); + ~CFontPreview() override; void paintEvent(QPaintEvent *) override; void mouseMoveEvent(QMouseEvent *event) override; void wheelEvent(QWheelEvent *e) override; QSize sizeHint() const override; QSize minimumSizeHint() const override; void showFont(const QString &name, // Thsi is either family name, or filename unsigned long styleInfo=KFI_NO_STYLE_INFO, int face=0); void showFont(); void showFace(int face); CFcEngine * engine() { return itsEngine; } public Q_SLOTS: void setUnicodeRange(const QList &r); void zoomIn(); void zoomOut(); Q_SIGNALS: void status(bool); void atMax(bool); void atMin(bool); private: QImage itsImage; int itsCurrentFace, itsLastWidth, itsLastHeight, itsStyleInfo; QString itsFontName; QList itsRange; QList itsChars; CFcEngine::TChar itsLastChar; CCharTip *itsTip; CFcEngine *itsEngine; friend class CCharTip; }; } #endif diff --git a/kcms/kfontinst/viewpart/FontViewPart.h b/kcms/kfontinst/viewpart/FontViewPart.h index 85913fe39..70cd6228e 100644 --- a/kcms/kfontinst/viewpart/FontViewPart.h +++ b/kcms/kfontinst/viewpart/FontViewPart.h @@ -1,123 +1,123 @@ #ifndef __FONT_VIEW_PART_H__ #define __FONT_VIEW_PART_H__ /* * KFontInst - KDE Font Installer * * Copyright 2003-2007 Craig Drummond * * ---- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include #include "KfiConstants.h" #include "Misc.h" #include "FontPreview.h" #include "Family.h" class QPushButton; class QLabel; class QProcess; class QAction; class QSpinBox; class QTemporaryDir; namespace KFI { class BrowserExtension; class FontInstInterface; class CFontViewPart : public KParts::ReadOnlyPart { Q_OBJECT public: CFontViewPart(QWidget *parentWidget, QObject *parent, const QList &args); - virtual ~CFontViewPart(); + ~CFontViewPart() override; bool openUrl(const QUrl &url) override; protected: bool openFile() override; public Q_SLOTS: void previewStatus(bool st); void timeout(); void install(); void installlStatus(); void dbusStatus(int pid, int status); void fontStat(int pid, const KFI::Family &font); void changeText(); void print(); void displayType(const QList &range); void showFace(int face); private: void checkInstallable(); // void getMetaInfo(int face); private: // QMap itsMetaInfo; CFontPreview *itsPreview; QPushButton *itsInstallButton; QWidget *itsFaceWidget; QFrame *itsFrame; QLabel *itsFaceLabel; // *itsMetaLabel; QSpinBox *itsFaceSelector; QAction *itsChangeTextAction; int itsFace; KSharedConfigPtr itsConfig; BrowserExtension *itsExtension; QProcess *itsProc; // KUrl itsMetaUrl; QTemporaryDir *itsTempDir; Misc::TFont itsFontDetails; FontInstInterface *itsInterface; bool itsOpening; }; class BrowserExtension : public KParts::BrowserExtension { Q_OBJECT public: BrowserExtension(CFontViewPart *parent); void enablePrint(bool enable); public Q_SLOTS: void print(); }; } #endif diff --git a/kcms/knotify/knotify.h b/kcms/knotify/knotify.h index bef888e3d..3eb4e69ca 100644 --- a/kcms/knotify/knotify.h +++ b/kcms/knotify/knotify.h @@ -1,59 +1,59 @@ /* Copyright (C) 2000,2002 Carsten Pfeiffer Copyright (C) 2005,2006 Olivier Goffart This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _KNOTIFY_H #define _KNOTIFY_H #include class KComboBox; class QPushButton; class KNotifyConfigWidget; class KCMKNotify : public KCModule { Q_OBJECT public: KCMKNotify(QWidget *parent, const QVariantList &); - virtual ~KCMKNotify(); + ~KCMKNotify() override; void defaults() override; void save() override; public Q_SLOTS: void load() override; private Q_SLOTS: void slotAppActivated( const int &); void slotDisableAllSounds(); private: KComboBox *m_appCombo; KNotifyConfigWidget *m_notifyWidget; QPushButton *m_psb; }; #endif diff --git a/kcms/launch/launchfeedback.h b/kcms/launch/launchfeedback.h index 95dc8f3a1..0b5798c82 100644 --- a/kcms/launch/launchfeedback.h +++ b/kcms/launch/launchfeedback.h @@ -1,69 +1,69 @@ /* * Copyright (C) 2001 Rik Hemsley (rikkus) * Copyright (C) 2017 Eike Hein * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software */ #ifndef LAUNCHFEEDBACK_H #define LAUNCHFEEDBACK_H #include class LaunchFeedback : public KQuickAddons::ConfigModule { Q_OBJECT Q_PROPERTY(int busyCursorCurrentIndex READ busyCursorCurrentIndex WRITE setBusyCursorCurrentIndex NOTIFY busyCursorCurrentIndexChanged) Q_PROPERTY(bool taskManagerNotification READ taskManagerNotification WRITE setTaskManagerNotification NOTIFY taskManagerNotificationChanged) Q_PROPERTY(int notificationTimeout READ notificationTimeout WRITE setNotificationTimeout NOTIFY notificationTimeoutChanged) public: explicit LaunchFeedback(QObject* parent = 0, const QVariantList &list = QVariantList()); - virtual ~LaunchFeedback(); + ~LaunchFeedback() override; int busyCursorCurrentIndex() const; void setBusyCursorCurrentIndex(int index); bool taskManagerNotification() const; void setTaskManagerNotification(bool enabled); int notificationTimeout() const; void setNotificationTimeout(int duration); public Q_SLOTS: void load(); void save(); void defaults(); Q_SIGNALS: void busyCursorCurrentIndexChanged() const; void taskManagerNotificationChanged() const; void notificationTimeoutChanged() const; private: void updateNeedsSave(); int m_busyCursorCurrentIndex; bool m_taskManagerNotification; int m_notificationTimeout; }; #endif diff --git a/kcms/phonon/devicepreference.h b/kcms/phonon/devicepreference.h index 82290ee2e..fcae4b2da 100644 --- a/kcms/phonon/devicepreference.h +++ b/kcms/phonon/devicepreference.h @@ -1,95 +1,95 @@ /* This file is part of the KDE project Copyright (C) 2006-2008 Matthias Kretz Copyright (C) 2011 Casian Andrei This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) version 3. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef DEVICEPREFERENCE_H_STUPID_UIC #define DEVICEPREFERENCE_H_STUPID_UIC #include "ui_devicepreference.h" #include #include #include #include namespace Phonon { class MediaObject; class AudioOutput; class VideoWidget; class DevicePreference : public QWidget, private Ui::DevicePreference { Q_OBJECT public: explicit DevicePreference(QWidget *parent = 0); - virtual ~DevicePreference(); + ~DevicePreference() override; void load(); void save(); void defaults(); void pulseAudioEnabled(); Q_SIGNALS: void changed(); protected: void changeEvent(QEvent *) override; private Q_SLOTS: void on_preferButton_clicked(); void on_deferButton_clicked(); void on_showAdvancedDevicesCheckBox_toggled(); void on_applyPreferencesButton_clicked(); void on_testPlaybackButton_toggled(bool down); void updateButtonsEnabled(); void updateDeviceList(); void updateAudioOutputDevices(); void updateAudioCaptureDevices(); void updateVideoCaptureDevices(); private: enum DeviceType {dtInvalidDevice, dtAudioOutput, dtAudioCapture, dtVideoCapture}; private: template void removeDevice(const ObjectDescription &deviceToRemove, QMap *> *modelMap); void loadCategoryDevices(); QList availableAudioOutputDevices() const; QList availableAudioCaptureDevices() const; QList availableVideoCaptureDevices() const; DeviceType shownModelType() const; private: QMap m_audioOutputModel; QMap m_audioCaptureModel; QMap m_videoCaptureModel; QStandardItemModel m_categoryModel; QStandardItemModel m_headerModel; DeviceType m_testingType; MediaObject *m_media; AudioOutput *m_audioOutput; VideoWidget *m_videoWidget; }; } // namespace Phonon #endif // DEVICEPREFERENCE_H_STUPID_UIC diff --git a/kcms/touchpad/src/backends/kwin_wayland/kwinwaylandtouchpad.h b/kcms/touchpad/src/backends/kwin_wayland/kwinwaylandtouchpad.h index 74c760c85..81ac40228 100644 --- a/kcms/touchpad/src/backends/kwin_wayland/kwinwaylandtouchpad.h +++ b/kcms/touchpad/src/backends/kwin_wayland/kwinwaylandtouchpad.h @@ -1,458 +1,458 @@ /* * Copyright 2017 Roman Gilg * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KWINWAYLANDTOUCHPAD_H #define KWINWAYLANDTOUCHPAD_H #include #include class QDBusInterface; class KWinWaylandTouchpad : public QObject { Q_OBJECT // // general Q_PROPERTY(QString name READ name CONSTANT) Q_PROPERTY(bool supportsDisableEvents READ supportsDisableEvents CONSTANT) Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) // // advanced Q_PROPERTY(Qt::MouseButtons supportedButtons READ supportedButtons CONSTANT) Q_PROPERTY(bool supportsLeftHanded READ supportsLeftHanded CONSTANT) Q_PROPERTY(bool leftHandedEnabledByDefault READ leftHandedEnabledByDefault CONSTANT) Q_PROPERTY(bool leftHanded READ isLeftHanded WRITE setLeftHanded NOTIFY leftHandedChanged) Q_PROPERTY(bool supportsDisableEventsOnExternalMouse READ supportsDisableEventsOnExternalMouse CONSTANT) Q_PROPERTY(bool supportsDisableWhileTyping READ supportsDisableWhileTyping CONSTANT) Q_PROPERTY(bool disableWhileTypingEnabledByDefault READ disableWhileTypingEnabledByDefault CONSTANT) Q_PROPERTY(bool disableWhileTyping READ isDisableWhileTyping WRITE setDisableWhileTyping NOTIFY disableWhileTypingChanged) Q_PROPERTY(bool supportsMiddleEmulation READ supportsMiddleEmulation CONSTANT) Q_PROPERTY(bool middleEmulationEnabledByDefault READ middleEmulationEnabledByDefault CONSTANT) Q_PROPERTY(bool middleEmulation READ isMiddleEmulation WRITE setMiddleEmulation NOTIFY middleEmulationChanged) // // acceleration speed and profile Q_PROPERTY(bool supportsPointerAcceleration READ supportsPointerAcceleration CONSTANT) Q_PROPERTY(qreal pointerAcceleration READ pointerAcceleration WRITE setPointerAcceleration NOTIFY pointerAccelerationChanged) Q_PROPERTY(bool supportsPointerAccelerationProfileFlat READ supportsPointerAccelerationProfileFlat CONSTANT) Q_PROPERTY(bool defaultPointerAccelerationProfileFlat READ defaultPointerAccelerationProfileFlat CONSTANT) Q_PROPERTY(bool pointerAccelerationProfileFlat READ pointerAccelerationProfileFlat WRITE setPointerAccelerationProfileFlat NOTIFY pointerAccelerationProfileChanged) Q_PROPERTY(bool supportsPointerAccelerationProfileAdaptive READ supportsPointerAccelerationProfileAdaptive CONSTANT) Q_PROPERTY(bool defaultPointerAccelerationProfileAdaptive READ defaultPointerAccelerationProfileAdaptive CONSTANT) Q_PROPERTY(bool pointerAccelerationProfileAdaptive READ pointerAccelerationProfileAdaptive WRITE setPointerAccelerationProfileAdaptive NOTIFY pointerAccelerationProfileChanged) // // tapping Q_PROPERTY(int tapFingerCount READ tapFingerCount CONSTANT) Q_PROPERTY(bool tapToClickEnabledByDefault READ tapToClickEnabledByDefault CONSTANT) Q_PROPERTY(bool tapToClick READ isTapToClick WRITE setTapToClick NOTIFY tapToClickChanged) Q_PROPERTY(bool supportsLmrTapButtonMap READ supportsLmrTapButtonMap CONSTANT) Q_PROPERTY(bool lmrTapButtonMapEnabledByDefault READ lmrTapButtonMapEnabledByDefault CONSTANT) Q_PROPERTY(bool lmrTapButtonMap READ lmrTapButtonMap WRITE setLmrTapButtonMap NOTIFY lmrTapButtonMapChanged) Q_PROPERTY(bool tapAndDragEnabledByDefault READ tapAndDragEnabledByDefault CONSTANT) Q_PROPERTY(bool tapAndDrag READ isTapAndDrag WRITE setTapAndDrag NOTIFY tapAndDragChanged) Q_PROPERTY(bool tapDragLockEnabledByDefault READ tapDragLockEnabledByDefault CONSTANT) Q_PROPERTY(bool tapDragLock READ isTapDragLock WRITE setTapDragLock NOTIFY tapDragLockChanged) // // scrolling Q_PROPERTY(bool supportsNaturalScroll READ supportsNaturalScroll CONSTANT) Q_PROPERTY(bool naturalScrollEnabledByDefault READ naturalScrollEnabledByDefault CONSTANT) Q_PROPERTY(bool naturalScroll READ isNaturalScroll WRITE setNaturalScroll NOTIFY naturalScrollChanged) Q_PROPERTY(bool supportsScrollTwoFinger READ supportsScrollTwoFinger CONSTANT) Q_PROPERTY(bool scrollTwoFingerEnabledByDefault READ scrollTwoFingerEnabledByDefault CONSTANT) Q_PROPERTY(bool scrollTwoFinger READ isScrollTwoFinger WRITE setScrollTwoFinger NOTIFY scrollMethodChanged) Q_PROPERTY(bool supportsScrollEdge READ supportsScrollEdge CONSTANT) Q_PROPERTY(bool scrollEdgeEnabledByDefault READ scrollEdgeEnabledByDefault CONSTANT) Q_PROPERTY(bool scrollEdge READ isScrollEdge WRITE setScrollEdge NOTIFY scrollMethodChanged) Q_PROPERTY(bool supportsScrollOnButtonDown READ supportsScrollOnButtonDown CONSTANT) Q_PROPERTY(bool scrollOnButtonDownEnabledByDefault READ scrollOnButtonDownEnabledByDefault CONSTANT) Q_PROPERTY(bool scrollOnButtonDown READ isScrollOnButtonDown WRITE setScrollOnButtonDown NOTIFY scrollMethodChanged) Q_PROPERTY(quint32 defaultScrollButton READ defaultScrollButton CONSTANT) Q_PROPERTY(quint32 scrollButton READ scrollButton WRITE setScrollButton NOTIFY scrollButtonChanged) public: KWinWaylandTouchpad(QString dbusName); - virtual ~KWinWaylandTouchpad(); + ~KWinWaylandTouchpad() override; bool init(); bool getConfig(); bool getDefaultConfig(); bool applyConfig(); bool isChangedConfig() const; // // general QString name() const { return m_name.val; } QString sysName() const { return m_sysName.val; } bool supportsDisableEvents() const { return m_supportsDisableEvents.val; } void setEnabled(bool enabled) { m_enabled.set(enabled); } bool isEnabled() const { return m_enabled.val; } Qt::MouseButtons supportedButtons() const { return m_supportedButtons.val; } // // advanced bool supportsLeftHanded() const { return m_supportsLeftHanded.val; } bool leftHandedEnabledByDefault() const { return m_leftHandedEnabledByDefault.val; } bool isLeftHanded() const { return m_leftHanded.val; } void setLeftHanded(bool set) { m_leftHanded.set(set); } bool supportsDisableEventsOnExternalMouse() const { return m_supportsDisableEventsOnExternalMouse.val; } bool supportsDisableWhileTyping() const { return m_supportsDisableWhileTyping.val; } bool disableWhileTypingEnabledByDefault() const { return m_disableWhileTypingEnabledByDefault.val; } bool isDisableWhileTyping() const { return m_disableWhileTyping.val; } void setDisableWhileTyping(bool set) { m_disableWhileTyping.set(set); } bool supportsMiddleEmulation() const { return m_supportsMiddleEmulation.val; } bool middleEmulationEnabledByDefault() const { return m_middleEmulationEnabledByDefault.val; } bool isMiddleEmulation() const { return m_middleEmulation.val; } void setMiddleEmulation(bool set) { m_middleEmulation.set(set); } // // acceleration speed and profile bool supportsPointerAcceleration() const { return m_supportsPointerAcceleration.val; } qreal pointerAcceleration() const { return m_pointerAcceleration.val; } void setPointerAcceleration(qreal acceleration) { m_pointerAcceleration.set(acceleration); } bool supportsPointerAccelerationProfileFlat() const { return m_supportsPointerAccelerationProfileFlat.val; } bool defaultPointerAccelerationProfileFlat() const { return m_defaultPointerAccelerationProfileFlat.val; } bool pointerAccelerationProfileFlat() const { return m_pointerAccelerationProfileFlat.val; } void setPointerAccelerationProfileFlat(bool set) { m_pointerAccelerationProfileFlat.set(set); } bool supportsPointerAccelerationProfileAdaptive() const { return m_supportsPointerAccelerationProfileAdaptive.val; } bool defaultPointerAccelerationProfileAdaptive() const { return m_defaultPointerAccelerationProfileAdaptive.val; } bool pointerAccelerationProfileAdaptive() const { return m_pointerAccelerationProfileAdaptive.val; } void setPointerAccelerationProfileAdaptive(bool set) { m_pointerAccelerationProfileAdaptive.set(set); } // // tapping int tapFingerCount() const { return m_tapFingerCount.val; } bool tapToClickEnabledByDefault() const { return m_tapToClickEnabledByDefault.val; } bool isTapToClick() const { return m_tapToClick.val; } void setTapToClick(bool set) { m_tapToClick.set(set); } bool supportsLmrTapButtonMap() const { return m_tapFingerCount.val > 1; } bool lmrTapButtonMapEnabledByDefault() const { return m_lmrTapButtonMapEnabledByDefault.val; } bool lmrTapButtonMap() const { return m_lmrTapButtonMap.val; } void setLmrTapButtonMap(bool set) { m_lmrTapButtonMap.set(set); } bool tapAndDragEnabledByDefault() const { return m_tapAndDragEnabledByDefault.val; } bool isTapAndDrag() const { return m_tapAndDrag.val; } void setTapAndDrag(bool set) { m_tapAndDrag.set(set); } bool tapDragLockEnabledByDefault() const { return m_tapDragLockEnabledByDefault.val; } bool isTapDragLock() const { return m_tapDragLock.val; } void setTapDragLock(bool set) { m_tapDragLock.set(set); } // // scrolling bool supportsNaturalScroll() const { return m_supportsNaturalScroll.val; } bool naturalScrollEnabledByDefault() const { return m_naturalScrollEnabledByDefault.val; } bool isNaturalScroll() const { return m_naturalScroll.val; } void setNaturalScroll(bool set) { m_naturalScroll.set(set); } bool supportsScrollTwoFinger() const { return m_supportsScrollTwoFinger.val; } bool scrollTwoFingerEnabledByDefault() const { return m_scrollTwoFingerEnabledByDefault.val; } bool isScrollTwoFinger() const { return m_isScrollTwoFinger.val; } void setScrollTwoFinger(bool set) { m_isScrollTwoFinger.set(set); } bool supportsScrollEdge() const { return m_supportsScrollEdge.val; } bool scrollEdgeEnabledByDefault() const { return m_scrollEdgeEnabledByDefault.val; } bool isScrollEdge() const { return m_isScrollEdge.val; } void setScrollEdge(bool set) { m_isScrollEdge.set(set); } bool supportsScrollOnButtonDown() const { return m_supportsScrollOnButtonDown.val; } bool scrollOnButtonDownEnabledByDefault() const { return m_scrollOnButtonDownEnabledByDefault.val; } bool isScrollOnButtonDown() const { return m_isScrollOnButtonDown.val; } void setScrollOnButtonDown(bool set) { m_isScrollOnButtonDown.set(set); } quint32 defaultScrollButton() const { return m_defaultScrollButton.val; } quint32 scrollButton() const { return m_scrollButton.val; } void setScrollButton(quint32 button) { m_scrollButton.set(button); } Q_SIGNALS: void leftHandedChanged(); void pointerAccelerationChanged(); void pointerAccelerationProfileChanged(); void enabledChanged(); void tapToClickChanged(); void tapAndDragChanged(); void tapDragLockChanged(); void lmrTapButtonMapChanged(); void disableWhileTypingChanged(); void middleEmulationChanged(); void naturalScrollChanged(); void scrollMethodChanged(); void scrollButtonChanged(); private: template struct Prop { explicit Prop(const QByteArray &dbusName) : dbus(dbusName) {} void set(T newVal) { if (avail && val != newVal) { val = newVal; } } void set(const Prop &p) { if (avail && val != p.val) { val = p.val; } } bool changed() const { return avail && (old != val); } QByteArray dbus; bool avail; T old; T val; }; template bool valueLoader(Prop &prop); template QString valueWriter(const Prop &prop); // // general Prop m_name = Prop("name"); Prop m_sysName = Prop("sysName"); Prop m_supportsDisableEvents = Prop("supportsDisableEvents"); Prop m_enabled = Prop("enabled"); // // advanced Prop m_supportedButtons = Prop("supportedButtons"); Prop m_supportsLeftHanded = Prop("supportsLeftHanded"); Prop m_leftHandedEnabledByDefault = Prop("leftHandedEnabledByDefault"); Prop m_leftHanded = Prop("leftHanded"); Prop m_supportsDisableEventsOnExternalMouse = Prop("supportsDisableEventsOnExternalMouse"); Prop m_supportsDisableWhileTyping = Prop("supportsDisableWhileTyping"); Prop m_disableWhileTypingEnabledByDefault = Prop("disableWhileTypingEnabledByDefault"); Prop m_disableWhileTyping = Prop("disableWhileTyping"); Prop m_supportsMiddleEmulation = Prop("supportsMiddleEmulation"); Prop m_middleEmulationEnabledByDefault = Prop("middleEmulationEnabledByDefault"); Prop m_middleEmulation = Prop("middleEmulation"); // // acceleration speed and profile Prop m_supportsPointerAcceleration = Prop("supportsPointerAcceleration"); Prop m_defaultPointerAcceleration = Prop("defaultPointerAcceleration"); Prop m_pointerAcceleration = Prop("pointerAcceleration"); Prop m_supportsPointerAccelerationProfileFlat = Prop("supportsPointerAccelerationProfileFlat"); Prop m_defaultPointerAccelerationProfileFlat = Prop("defaultPointerAccelerationProfileFlat"); Prop m_pointerAccelerationProfileFlat = Prop("pointerAccelerationProfileFlat"); Prop m_supportsPointerAccelerationProfileAdaptive = Prop("supportsPointerAccelerationProfileAdaptive"); Prop m_defaultPointerAccelerationProfileAdaptive = Prop("defaultPointerAccelerationProfileAdaptive"); Prop m_pointerAccelerationProfileAdaptive = Prop("pointerAccelerationProfileAdaptive"); // // tapping Prop m_tapFingerCount = Prop("tapFingerCount"); Prop m_tapToClickEnabledByDefault = Prop("tapToClickEnabledByDefault"); Prop m_tapToClick = Prop("tapToClick"); Prop m_lmrTapButtonMapEnabledByDefault = Prop("lmrTapButtonMapEnabledByDefault"); Prop m_lmrTapButtonMap = Prop("lmrTapButtonMap"); Prop m_tapAndDragEnabledByDefault = Prop("tapAndDragEnabledByDefault"); Prop m_tapAndDrag = Prop("tapAndDrag"); Prop m_tapDragLockEnabledByDefault = Prop("tapDragLockEnabledByDefault"); Prop m_tapDragLock = Prop("tapDragLock"); // // scrolling Prop m_supportsNaturalScroll = Prop("supportsNaturalScroll"); Prop m_naturalScrollEnabledByDefault = Prop("naturalScrollEnabledByDefault"); Prop m_naturalScroll = Prop("naturalScroll"); Prop m_supportsScrollTwoFinger = Prop("supportsScrollTwoFinger"); Prop m_scrollTwoFingerEnabledByDefault = Prop("scrollTwoFingerEnabledByDefault"); Prop m_isScrollTwoFinger = Prop("scrollTwoFinger"); Prop m_supportsScrollEdge = Prop("supportsScrollEdge"); Prop m_scrollEdgeEnabledByDefault = Prop("scrollEdgeEnabledByDefault"); Prop m_isScrollEdge = Prop("scrollEdge"); Prop m_supportsScrollOnButtonDown = Prop("supportsScrollOnButtonDown"); Prop m_scrollOnButtonDownEnabledByDefault = Prop("scrollOnButtonDownEnabledByDefault"); Prop m_isScrollOnButtonDown = Prop("scrollOnButtonDown"); Prop m_defaultScrollButton = Prop("defaultScrollButton"); Prop m_scrollButton = Prop("scrollButton"); QDBusInterface *m_iface; }; #endif diff --git a/kcms/touchpad/src/kcm/xlib/touchpadconfigxlib.h b/kcms/touchpad/src/kcm/xlib/touchpadconfigxlib.h index a9434851e..e7a8863b1 100644 --- a/kcms/touchpad/src/kcm/xlib/touchpadconfigxlib.h +++ b/kcms/touchpad/src/kcm/xlib/touchpadconfigxlib.h @@ -1,103 +1,103 @@ /* * Copyright (C) 2013 Alexander Mezin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef TOUCHPADCONFIGXLIB_H #define TOUCHPADCONFIGXLIB_H #include "../touchpadconfigplugin.h" #include #include #include "touchpadparameters.h" #include "testarea.h" #include "kdedsettings.h" #include "ui_pointermotion.h" #include "ui_tap.h" #include "ui_scroll.h" #include "ui_sensitivity.h" #include "ui_kded.h" class TouchpadConfigContainer; class TouchpadBackend; class KMessageWidget; class OrgKdeTouchpadInterface; class CustomConfigDialogManager; class QAction; class KShortcutsDialog; class QTabWidget; class KComboBox; class QDBusPendingCallWatcher; class QHideEvent; class TouchpadConfigXlib : public TouchpadConfigPlugin { Q_OBJECT public: explicit TouchpadConfigXlib(TouchpadConfigContainer *parent, const QVariantList &args = QVariantList()); - virtual ~TouchpadConfigXlib(); + ~TouchpadConfigXlib() override; static void kcmInit(); void load() override; void save() override; void defaults() override; void hideEvent(QHideEvent *) override; private Q_SLOTS: void beginTesting(); void endTesting(); void onChanged(); void checkChanges(); void loadActiveConfig(); void updateTestAreaEnabled(); void updateMouseList(); void showConfigureNotificationsDialog(); void gotReplyFromDaemon(QDBusPendingCallWatcher *); private: QVariantHash getActiveConfig(); TouchpadParameters m_config; QScopedPointer m_prevConfig; CustomConfigDialogManager *m_manager; TouchpadDisablerSettings m_daemonSettings; KConfigDialogManager *m_daemonConfigManager; KMessageWidget *m_errorMessage, *m_configOutOfSyncMessage; TestArea *m_testArea; OrgKdeTouchpadInterface *m_daemon; QAction *m_loadActiveConfiguration; bool m_configOutOfSync; QScopedPointer m_shortcutsDialog; QWidget *m_kdedTab; QTabWidget *m_tabs; KComboBox *m_mouseCombo; Ui::PointerMotionForm m_pointerMotion; Ui::TapForm m_tapping; Ui::ScrollForm m_scrolling; Ui::SensitivityForm m_sensitivity; Ui::KdedForm m_kded; }; #endif // TOUCHPADCONFIGXLIB_H diff --git a/kcms/translations/kcmtranslations.h b/kcms/translations/kcmtranslations.h index 335b2e9f7..9082a98b9 100644 --- a/kcms/translations/kcmtranslations.h +++ b/kcms/translations/kcmtranslations.h @@ -1,84 +1,84 @@ /* This file is part of the KDE's Plasma workspace * Copyright 2014 John Layt * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KCMTRANSLATIONS_H #define KCMTRANSLATIONS_H #include #include #include class QListWidgetItem; class KMessageWidget; namespace Ui { class KCMTranslationsWidget; } /** * @short A KCM to configure KDE Gui Translations * * This module is for changing the User's Gui Translations settings. */ class KCMTranslations : public KCModule { Q_OBJECT public: KCMTranslations(QWidget *parent, const QVariantList &); - virtual ~KCMTranslations(); + ~KCMTranslations() override; void load() override; void save() override; void defaults() override; QString quickHelp() const override; private Q_SLOTS: void changedTranslationsAvailable(QListWidgetItem *item); void changedTranslationsSelected(QListWidgetItem *item); void installTranslations(); private: void loadTranslations(); void changedTranslations(); void initWidgets(); void initTranslations(); void initTranslationsInstall(); // The list of translations currently set in the KCM QStringList m_kcmTranslations; // The currently saved list of user translations, used to check if value changed QString m_configTranslations; // The currently installed translations, used to check if users translations are valid QStringList m_installedTranslations; KConfigGroup m_config; Ui::KCMTranslationsWidget *m_ui; KMessageWidget *m_messageWidget; }; #endif //KCMTRANSLATIONS_H diff --git a/solid-device-automounter/kcm/DeviceAutomounterKCM.h b/solid-device-automounter/kcm/DeviceAutomounterKCM.h index 7d688c211..a130e948a 100644 --- a/solid-device-automounter/kcm/DeviceAutomounterKCM.h +++ b/solid-device-automounter/kcm/DeviceAutomounterKCM.h @@ -1,57 +1,57 @@ /************************************************************************** * Copyright (C) 2009-2010 Trever Fischer * * Copyright (C) 2015 Kai Uwe Broulik * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ #ifndef DEVICEAUTOMOUNTERKCM_H #define DEVICEAUTOMOUNTERKCM_H #include #include "ui_DeviceAutomounterKCM.h" class QStandardItemModel; class QStandardItem; class DeviceModel; class DeviceAutomounterKCM : public KCModule, public Ui::DeviceAutomounterKCM { Q_OBJECT public: explicit DeviceAutomounterKCM(QWidget *parent = nullptr, const QVariantList &args = QVariantList()); - virtual ~DeviceAutomounterKCM(); + ~DeviceAutomounterKCM() override; public slots: void load() override; void save() override; private slots: void enabledChanged(); void updateForgetDeviceButton(); void forgetSelectedDevices(); private: void saveLayout(); void loadLayout(); DeviceModel *m_devices; }; #endif diff --git a/solid-device-automounter/kded/DeviceAutomounter.h b/solid-device-automounter/kded/DeviceAutomounter.h index de9088f8e..4a5668f11 100644 --- a/solid-device-automounter/kded/DeviceAutomounter.h +++ b/solid-device-automounter/kded/DeviceAutomounter.h @@ -1,43 +1,43 @@ /*************************************************************************** * Copyright (C) 2009 by Trever Fischer * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ #ifndef DEVICEAUTOMOUNTER_H #define DEVICEAUTOMOUNTER_H #include #include #include "AutomounterSettings.h" class DeviceAutomounter : public KDEDModule { Q_OBJECT public: explicit DeviceAutomounter(QObject *parent = nullptr, const QVariantList &args = QVariantList()); - virtual ~DeviceAutomounter(); + ~DeviceAutomounter() override; private slots: void init(); void deviceAdded(const QString &udi); void deviceMountChanged(bool accessible, const QString &udi); private: void automountDevice(Solid::Device &dev, AutomounterSettings::AutomountType type); }; #endif