diff --git a/abstractmodel.h b/abstractmodel.h index 3e619248c..20d2c1b4c 100644 --- a/abstractmodel.h +++ b/abstractmodel.h @@ -1,86 +1,86 @@ /*************************************************************************** * Copyright (C) 2014-2015 by 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 ABSTRACTMODEL_H #define ABSTRACTMODEL_H #include class AbstractEntry; class AbstractModel : public QAbstractListModel { Q_OBJECT Q_PROPERTY(QString description READ description NOTIFY descriptionChanged) Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(int separatorCount READ separatorCount NOTIFY separatorCountChanged) Q_PROPERTY(int iconSize READ iconSize WRITE setIconSize NOTIFY iconSizeChanged) Q_PROPERTY(AbstractModel* favoritesModel READ favoritesModel WRITE setFavoritesModel NOTIFY favoritesModelChanged) public: explicit AbstractModel(QObject *parent = nullptr); - ~AbstractModel(); + ~AbstractModel() override; QHash roleNames() const override; virtual QString description() const = 0; int count() const; virtual int separatorCount() const; int columnCount(const QModelIndex &parent = QModelIndex()) const override; int iconSize() const; void setIconSize(int size); Q_INVOKABLE virtual bool trigger(int row, const QString &actionId, const QVariant &argument) = 0; Q_INVOKABLE virtual void refresh(); Q_INVOKABLE virtual QString labelForRow(int row); Q_INVOKABLE virtual AbstractModel *modelForRow(int row); Q_INVOKABLE virtual int rowForModel(AbstractModel *model); virtual bool hasActions() const; virtual QVariantList actions() const; virtual AbstractModel* favoritesModel(); virtual void setFavoritesModel(AbstractModel *model); AbstractModel* rootModel(); virtual void entryChanged(AbstractEntry *entry); Q_SIGNALS: void descriptionChanged() const; void countChanged() const; void separatorCountChanged() const; void iconSizeChanged() const; void favoritesModelChanged() const; protected: AbstractModel *m_favoritesModel; private: int m_iconSize; }; #endif diff --git a/appsmodel.h b/appsmodel.h index 516e0268a..84e8bc7a4 100644 --- a/appsmodel.h +++ b/appsmodel.h @@ -1,159 +1,159 @@ /*************************************************************************** * Copyright (C) 2012 Aurélien Gâteau * * Copyright (C) 2013-2015 by 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 APPSMODEL_H #define APPSMODEL_H #include "abstractmodel.h" #include "appentry.h" #include #include class AppGroupEntry; class QTimer; class AppsModel : public AbstractModel, public QQmlParserStatus { Q_OBJECT Q_INTERFACES(QQmlParserStatus) Q_PROPERTY(bool autoPopulate READ autoPopulate WRITE setAutoPopulate NOTIFY autoPopulateChanged) Q_PROPERTY(bool paginate READ paginate WRITE setPaginate NOTIFY paginateChanged) Q_PROPERTY(int pageSize READ pageSize WRITE setPageSize NOTIFY pageSizeChanged) Q_PROPERTY(bool flat READ flat WRITE setFlat NOTIFY flatChanged) Q_PROPERTY(bool sorted READ sorted WRITE setSorted NOTIFY sortedChanged) Q_PROPERTY(bool showSeparators READ showSeparators WRITE setShowSeparators NOTIFY showSeparatorsChanged) Q_PROPERTY(bool showTopLevelItems READ showTopLevelItems WRITE setShowTopLevelItems NOTIFY showTopLevelItemsChanged) Q_PROPERTY(int appNameFormat READ appNameFormat WRITE setAppNameFormat NOTIFY appNameFormatChanged) Q_PROPERTY(QObject* appletInterface READ appletInterface WRITE setAppletInterface NOTIFY appletInterfaceChanged) public: explicit AppsModel(const QString &entryPath = QString(), bool paginate = false, int pageSize = 24, bool flat = false, bool sorted = true, bool separators = true, QObject *parent = nullptr); explicit AppsModel(const QList entryList, bool deleteEntriesOnDestruction, QObject *parent = nullptr); - ~AppsModel(); + ~AppsModel() override; QString description() const override; void setDescription(const QString &text); QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; bool autoPopulate() const; void setAutoPopulate(bool populate); Q_INVOKABLE AbstractModel *modelForRow(int row) override; Q_INVOKABLE int rowForModel(AbstractModel *model) override; int separatorCount() const override; bool paginate() const; void setPaginate(bool paginate); int pageSize() const; void setPageSize(int size); bool flat() const; void setFlat(bool flat); bool sorted() const; void setSorted(bool sorted); bool showSeparators() const; void setShowSeparators(bool showSeparators); bool showTopLevelItems() const; void setShowTopLevelItems(bool showTopLevelItems); int appNameFormat() const; void setAppNameFormat(int format); QObject *appletInterface() const; void setAppletInterface(QObject *appletInterface); QStringList hiddenEntries() const; void entryChanged(AbstractEntry *entry) override; void classBegin() override; void componentComplete() override; Q_SIGNALS: void cleared() const; void autoPopulateChanged() const; void paginateChanged() const; void pageSizeChanged() const; void flatChanged() const; void sortedChanged() const; void showSeparatorsChanged() const; void showTopLevelItemsChanged() const; void appNameFormatChanged() const; void appletInterfaceChanged() const; void hiddenEntriesChanged() const; protected Q_SLOTS: void refresh() override; protected: void refreshInternal(); bool m_complete; bool m_paginate; int m_pageSize; QList m_entryList; bool m_deleteEntriesOnDestruction; int m_separatorCount; bool m_showSeparators; bool m_showTopLevelItems; QObject *m_appletInterface; private Q_SLOTS: void checkSycocaChanges(const QStringList &changes); private: void processServiceGroup(KServiceGroup::Ptr group); void sortEntries(); bool m_autoPopulate; QString m_description; QString m_entryPath; bool m_staticEntryList; QTimer *m_changeTimer; bool m_flat; bool m_sorted; AppEntry::NameFormat m_appNameFormat; QStringList m_hiddenEntries; static MenuEntryEditor *m_menuEntryEditor; }; #endif diff --git a/computermodel.h b/computermodel.h index 7d16fc4f6..273fc1595 100644 --- a/computermodel.h +++ b/computermodel.h @@ -1,119 +1,119 @@ /*************************************************************************** * Copyright (C) 2015 by 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 COMPUTERMODEL_H #define COMPUTERMODEL_H #include "forwardingmodel.h" #include "appentry.h" #include #include class SimpleFavoritesModel; class KConcatenateRowsProxyModel; class KFilePlacesModel; namespace Solid { class Device; } class FilteredPlacesModel : public QSortFilterProxyModel { Q_OBJECT public: FilteredPlacesModel(QObject *parent = nullptr); - ~FilteredPlacesModel(); + ~FilteredPlacesModel() override; QUrl url(const QModelIndex &index) const; bool isDevice(const QModelIndex &index) const; Solid::Device deviceForIndex(const QModelIndex &index) const; protected: bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; private: KFilePlacesModel *m_placesModel; }; class RunCommandModel : public AbstractModel { Q_OBJECT public: RunCommandModel(QObject *parent = nullptr); - ~RunCommandModel(); + ~RunCommandModel() override; QString description() const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; }; class ComputerModel : public ForwardingModel { Q_OBJECT Q_PROPERTY(int appNameFormat READ appNameFormat WRITE setAppNameFormat NOTIFY appNameFormatChanged) Q_PROPERTY(QObject* appletInterface READ appletInterface WRITE setAppletInterface NOTIFY appletInterfaceChanged) Q_PROPERTY(QStringList systemApplications READ systemApplications WRITE setSystemApplications NOTIFY systemApplicationsChanged) public: explicit ComputerModel(QObject *parent = nullptr); - ~ComputerModel(); + ~ComputerModel() override; QString description() const override; int appNameFormat() const; void setAppNameFormat(int format); QObject *appletInterface() const; void setAppletInterface(QObject *appletInterface); QStringList systemApplications() const; void setSystemApplications(const QStringList &apps); QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; Q_SIGNALS: void appNameFormatChanged() const; void appletInterfaceChanged() const; void systemApplicationsChanged() const; private Q_SLOTS: void onSetupDone(Solid::ErrorType error, QVariant errorData, const QString &udi); private: KConcatenateRowsProxyModel *m_concatProxy; RunCommandModel *m_runCommandModel; SimpleFavoritesModel *m_systemAppsModel; FilteredPlacesModel *m_filteredPlacesModel; AppEntry::NameFormat m_appNameFormat; QObject *m_appletInterface; }; #endif diff --git a/containmentinterface.h b/containmentinterface.h index 94ab39fef..20a11e464 100644 --- a/containmentinterface.h +++ b/containmentinterface.h @@ -1,59 +1,59 @@ /*************************************************************************** * Copyright (C) 2014 by 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 CONTAINMENTINTERFACE_H #define CONTAINMENTINTERFACE_H #include #include namespace Plasma { class Applet; class Containment; } class ContainmentInterface : public QObject { Q_OBJECT public: enum Target { Desktop = 0, Panel, TaskManager }; Q_ENUM(Target) ContainmentInterface(QObject *parent = nullptr); - ~ContainmentInterface(); + ~ContainmentInterface() override; static Q_INVOKABLE bool mayAddLauncher(QObject *appletInterface, Target target, const QString &entryPath = QString()); static Q_INVOKABLE void addLauncher(QObject *appletInterface, Target target, const QString &entryPath); static Q_INVOKABLE QObject* screenContainment(QObject *appletInterface); static Q_INVOKABLE bool screenContainmentMutable(QObject *appletInterface); static Q_INVOKABLE void ensureMutable(Plasma::Containment *containment); private: static QStringList m_knownTaskManagers; }; #endif diff --git a/draghelper.h b/draghelper.h index 84c9f4f39..d414d1830 100644 --- a/draghelper.h +++ b/draghelper.h @@ -1,55 +1,55 @@ /*************************************************************************** * Copyright (C) 2013 by 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 DRAGHELPER_H #define DRAGHELPER_H #include #include #include class QQuickItem; class DragHelper : public QObject { Q_OBJECT Q_PROPERTY(int dragIconSize READ dragIconSize WRITE setDragIconSize NOTIFY dragIconSizeChanged) public: DragHelper(QObject *parent = nullptr); - ~DragHelper(); + ~DragHelper() override; int dragIconSize() const; void setDragIconSize(int size); Q_INVOKABLE bool isDrag(int oldX, int oldY, int newX, int newY) const; Q_INVOKABLE void startDrag(QQuickItem* item, const QUrl &url = QUrl(), const QIcon &icon = QIcon(), const QString &extraMimeType = QString(), const QString &extraMimeData = QString()); Q_SIGNALS: void dragIconSizeChanged() const; void dropped() const; private: int m_dragIconSize; Q_INVOKABLE void doDrag(QQuickItem* item, const QUrl &url = QUrl(), const QIcon &icon = QIcon(), const QString &extraMimeType = QString(), const QString &extraMimeData = QString()) const; }; #endif diff --git a/fileentry.h b/fileentry.h index 53db190b9..42ddc385f 100644 --- a/fileentry.h +++ b/fileentry.h @@ -1,53 +1,53 @@ /*************************************************************************** * Copyright (C) 2015 by 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 FILEENTRY_H #define FILEENTRY_H #include "abstractentry.h" class KFileItem; class FileEntry : public AbstractEntry { public: explicit FileEntry(AbstractModel *owner, const QUrl &url); - ~FileEntry(); + ~FileEntry() override; EntryType type() const override { return RunnableType; } bool isValid() const override; QIcon icon() const override; QString name() const override; QString description() const override; QString id() const override; QUrl url() const override; bool hasActions() const override; QVariantList actions() const override; bool run(const QString& actionId = QString(), const QVariant &argument = QVariant()) override; private: KFileItem *m_fileItem; }; #endif diff --git a/forwardingmodel.h b/forwardingmodel.h index 3ab31aca9..b059028b0 100644 --- a/forwardingmodel.h +++ b/forwardingmodel.h @@ -1,77 +1,77 @@ /*************************************************************************** * Copyright (C) 2015 by 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 FORWARDINGMODEL_H #define FORWARDINGMODEL_H #include "abstractmodel.h" #include class ForwardingModel : public AbstractModel { Q_OBJECT Q_PROPERTY(QAbstractItemModel* sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged) public: explicit ForwardingModel(QObject *parent = nullptr); - ~ForwardingModel(); + ~ForwardingModel() override; QString description() const override; QAbstractItemModel *sourceModel() const; virtual void setSourceModel(QAbstractItemModel *sourceModel); bool canFetchMore(const QModelIndex &parent) const override; void fetchMore(const QModelIndex &parent) override; QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; QModelIndex parent(const QModelIndex &index) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; Q_INVOKABLE QString labelForRow(int row) override; Q_INVOKABLE AbstractModel *modelForRow(int row) override; AbstractModel* favoritesModel() override; int separatorCount() const override; public Q_SLOTS: void reset(); Q_SIGNALS: void sourceModelChanged() const; protected: QModelIndex indexToSourceIndex(const QModelIndex &index) const; void connectSignals(); void disconnectSignals(); QPointer m_sourceModel; }; #endif diff --git a/funnelmodel.h b/funnelmodel.h index b3feeb401..6077ff747 100644 --- a/funnelmodel.h +++ b/funnelmodel.h @@ -1,36 +1,36 @@ /*************************************************************************** * Copyright (C) 2014 by 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 FUNNELMODEL_H #define FUNNELMODEL_H #include "forwardingmodel.h" class FunnelModel : public ForwardingModel { Q_OBJECT public: explicit FunnelModel(QObject *parent = nullptr); - ~FunnelModel(); + ~FunnelModel() override; void setSourceModel(QAbstractItemModel *model) override; }; #endif diff --git a/kastatsfavoritesmodel.h b/kastatsfavoritesmodel.h index a4104225a..570940929 100644 --- a/kastatsfavoritesmodel.h +++ b/kastatsfavoritesmodel.h @@ -1,117 +1,117 @@ /*************************************************************************** * Copyright (C) 2014-2015 by Eike Hein * * Copyright (C) 2016-2017 by Ivan Cukic * * * * 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 FAVORITESMODEL_H #define FAVORITESMODEL_H #include "placeholdermodel.h" #include #include #include class PlaceholderModel; namespace KActivities { class Consumer; namespace Stats { class ResultModel; namespace Terms { class Activity; } // namespace Terms } // namespace Stats } // namespace KActivities class KAStatsFavoritesModel : public PlaceholderModel { Q_OBJECT Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) Q_PROPERTY(QStringList favorites READ favorites WRITE setFavorites NOTIFY favoritesChanged) Q_PROPERTY(int maxFavorites READ maxFavorites WRITE setMaxFavorites NOTIFY maxFavoritesChanged) Q_PROPERTY(QObject* activities READ activities CONSTANT) public: explicit KAStatsFavoritesModel(QObject *parent = nullptr); - ~KAStatsFavoritesModel(); + ~KAStatsFavoritesModel() override; - QString description() const; + QString description() const override; - Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument); + Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; bool enabled() const; void setEnabled(bool enable); QStringList favorites() const; void setFavorites(const QStringList &favorites); int maxFavorites() const; void setMaxFavorites(int max); Q_INVOKABLE bool isFavorite(const QString &id) const; Q_INVOKABLE void addFavorite(const QString &id, int index = -1); Q_INVOKABLE void removeFavorite(const QString &id); Q_INVOKABLE void addFavoriteTo(const QString &id, const QString &activityId, int index = -1); Q_INVOKABLE void removeFavoriteFrom(const QString &id, const QString &activityId); Q_INVOKABLE void setFavoriteOn(const QString &id, const QString &activityId); Q_INVOKABLE void portOldFavorites(const QStringList &ids); Q_INVOKABLE QStringList linkedActivitiesFor(const QString &id) const; Q_INVOKABLE void moveRow(int from, int to); Q_INVOKABLE void initForClient(const QString &client); QObject *activities() const; Q_INVOKABLE QString activityNameForId(const QString &activityId) const; - AbstractModel* favoritesModel(); + AbstractModel* favoritesModel() override; public Q_SLOTS: - virtual void refresh(); + void refresh() override; Q_SIGNALS: void enabledChanged() const; void favoritesChanged() const; void maxFavoritesChanged() const; private: class Private; Private * d; AbstractEntry *favoriteFromId(const QString &id) const; void addFavoriteTo(const QString &id, const KActivities::Stats::Terms::Activity &activityId, int index = -1); void removeFavoriteFrom(const QString &id, const KActivities::Stats::Terms::Activity &activityId); bool m_enabled; int m_maxFavorites; KActivities::Consumer *m_activities; }; #endif diff --git a/menuentryeditor.h b/menuentryeditor.h index 7484afba3..f3abd772c 100644 --- a/menuentryeditor.h +++ b/menuentryeditor.h @@ -1,39 +1,39 @@ /*************************************************************************** * Copyright (C) 2014 by 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 MENUENTRYEDITOR_H #define MENUENTRYEDITOR_H #include class MenuEntryEditor : public QObject { Q_OBJECT public: MenuEntryEditor(QObject *parent = nullptr); - ~MenuEntryEditor(); + ~MenuEntryEditor() override; bool canEdit(const QString &entryPath) const; public Q_SLOTS: void edit(const QString &entryPath, const QString &menuId); }; #endif diff --git a/placeholdermodel.h b/placeholdermodel.h index 977f9f271..68bd5b028 100644 --- a/placeholdermodel.h +++ b/placeholdermodel.h @@ -1,94 +1,94 @@ /*************************************************************************** * Copyright (C) 2015 by Eike Hein * * Copyright (C) 2017 by Ivan Cukic * * * * 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 PLACEHOLDERMODEL_H #define PLACEHOLDERMODEL_H #include "abstractmodel.h" #include #include class PlaceholderModel : public AbstractModel { Q_OBJECT Q_PROPERTY(QAbstractItemModel* sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged); Q_PROPERTY(int dropPlaceholderIndex READ dropPlaceholderIndex WRITE setDropPlaceholderIndex NOTIFY dropPlaceholderIndexChanged) public: explicit PlaceholderModel(QObject *parent = nullptr); - ~PlaceholderModel(); + ~PlaceholderModel() override; - QString description() const; + QString description() const override; QAbstractItemModel *sourceModel() const; virtual void setSourceModel(QAbstractItemModel *sourceModel); - bool canFetchMore(const QModelIndex &parent) const; - void fetchMore(const QModelIndex &parent); + bool canFetchMore(const QModelIndex &parent) const override; + void fetchMore(const QModelIndex &parent) override; - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; - QModelIndex parent(const QModelIndex &index) const; + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; + QModelIndex parent(const QModelIndex &index) const override; - virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - int rowCount(const QModelIndex &parent = QModelIndex()) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; - Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument); + Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; - Q_INVOKABLE QString labelForRow(int row); + Q_INVOKABLE QString labelForRow(int row) override; - Q_INVOKABLE AbstractModel *modelForRow(int row); + Q_INVOKABLE AbstractModel *modelForRow(int row) override; - AbstractModel* favoritesModel(); + AbstractModel* favoritesModel() override; - int separatorCount() const; + int separatorCount() const override; int dropPlaceholderIndex() const; void setDropPlaceholderIndex(int index); public Q_SLOTS: void reset(); Q_SIGNALS: void sourceModelChanged() const; void dropPlaceholderIndexChanged(); protected: void inhibitTriggering(); private: QModelIndex indexToSourceIndex(const QModelIndex &index) const; QModelIndex sourceIndexToIndex(const QModelIndex &index) const; int sourceRowToRow(int sourceRow) const; int rowToSourceRow(int row) const; void connectSignals(); void disconnectSignals(); QPointer m_sourceModel; int m_dropPlaceholderIndex; bool m_isTriggerInhibited; QTimer m_triggerInhibitor; }; #endif diff --git a/processrunner.h b/processrunner.h index a9005e333..85c41f71b 100644 --- a/processrunner.h +++ b/processrunner.h @@ -1,36 +1,36 @@ /*************************************************************************** * Copyright (C) 2013 by 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 PROCESSRUNNER_H #define PROCESSRUNNER_H #include class ProcessRunner : public QObject { Q_OBJECT public: ProcessRunner(QObject *parent = nullptr); - ~ProcessRunner(); + ~ProcessRunner() override; Q_INVOKABLE void runMenuEditor(); }; #endif diff --git a/recentcontactsmodel.h b/recentcontactsmodel.h index 5f5d3be31..7bc374856 100644 --- a/recentcontactsmodel.h +++ b/recentcontactsmodel.h @@ -1,59 +1,59 @@ /*************************************************************************** * Copyright (C) 2012 by Aurélien Gâteau * * Copyright (C) 2014-2015 by 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 RECENTCONTACTSMODEL_H #define RECENTCONTACTSMODEL_H #include "forwardingmodel.h" namespace KPeople { class PersonData; } class RecentContactsModel : public ForwardingModel { Q_OBJECT public: explicit RecentContactsModel(QObject *parent = nullptr); - ~RecentContactsModel(); + ~RecentContactsModel() override; QString description() const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; bool hasActions() const override; QVariantList actions() const override; private Q_SLOTS: void refresh() override; void buildCache(); void personDataChanged(); private: void insertPersonData(const QString &id, int row); QHash m_idToData; QHash m_dataToRow; }; #endif diff --git a/recentusagemodel.h b/recentusagemodel.h index 816e0a86a..04c5936a2 100644 --- a/recentusagemodel.h +++ b/recentusagemodel.h @@ -1,115 +1,115 @@ /*************************************************************************** * Copyright (C) 2014-2015 by 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 RECENTUSAGEMODEL_H #define RECENTUSAGEMODEL_H #include "forwardingmodel.h" #include #include class GroupSortProxy : public QSortFilterProxyModel { Q_OBJECT public: explicit GroupSortProxy(AbstractModel *parentModel, QAbstractItemModel *sourceModel); - ~GroupSortProxy(); + ~GroupSortProxy() override; protected: bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; }; class InvalidAppsFilterProxy : public QSortFilterProxyModel { Q_OBJECT public: explicit InvalidAppsFilterProxy(AbstractModel *parentModel, QAbstractItemModel *sourceModel); - ~InvalidAppsFilterProxy(); + ~InvalidAppsFilterProxy() override; protected: bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const override; bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; private Q_SLOTS: void connectNewFavoritesModel(); private: QPointer m_parentModel; }; class RecentUsageModel : public ForwardingModel, public QQmlParserStatus { Q_OBJECT Q_INTERFACES(QQmlParserStatus) Q_PROPERTY(int ordering READ ordering WRITE setOrdering NOTIFY orderingChanged) public: enum IncludeUsage { AppsAndDocs, OnlyApps, OnlyDocs }; enum Ordering { Recent, Popular }; explicit RecentUsageModel( QObject *parent = nullptr, IncludeUsage usage = AppsAndDocs, int ordering = Recent); - ~RecentUsageModel(); + ~RecentUsageModel() override; QString description() const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; bool hasActions() const override; QVariantList actions() const override; IncludeUsage usage() const; void setOrdering(int ordering); int ordering() const; void classBegin() override; void componentComplete() override; Q_SIGNALS: void orderingChanged(int ordering); private Q_SLOTS: void refresh() override; private: QVariant appData(const QString &resource, int role) const; QVariant docData(const QString &resource, int role) const; QString resourceAt(int row) const; QString forgetAllActionName() const; IncludeUsage m_usage; QPointer m_activitiesModel; Ordering m_ordering; bool m_complete; }; #endif diff --git a/rootmodel.h b/rootmodel.h index 3f1d425f9..0b32f5dfa 100644 --- a/rootmodel.h +++ b/rootmodel.h @@ -1,121 +1,121 @@ /*************************************************************************** * Copyright (C) 2014-2015 by 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 ROOTMODEL_H #define ROOTMODEL_H #include "appsmodel.h" class KAStatsFavoritesModel; class RecentContactsModel; class RecentUsageModel; class SystemModel; class RootModel; class GroupEntry : public AbstractGroupEntry { public: GroupEntry(AppsModel *parentModel, const QString &name, const QString &iconName, AbstractModel *childModel); QIcon icon() const override; QString name() const override; bool hasChildren() const override; AbstractModel *childModel() const override; private: QString m_name; QString m_iconName; QPointer m_childModel; }; class RootModel : public AppsModel { Q_OBJECT Q_PROPERTY(QObject* systemFavoritesModel READ systemFavoritesModel NOTIFY systemFavoritesModelChanged) Q_PROPERTY(bool showAllApps READ showAllApps WRITE setShowAllApps NOTIFY showAllAppsChanged) Q_PROPERTY(bool showRecentApps READ showRecentApps WRITE setShowRecentApps NOTIFY showRecentAppsChanged) Q_PROPERTY(bool showRecentDocs READ showRecentDocs WRITE setShowRecentDocs NOTIFY showRecentDocsChanged) Q_PROPERTY(bool showRecentContacts READ showRecentContacts WRITE setShowRecentContacts NOTIFY showRecentContactsChanged) Q_PROPERTY(int recentOrdering READ recentOrdering WRITE setRecentOrdering NOTIFY recentOrderingChanged) Q_PROPERTY(bool showPowerSession READ showPowerSession WRITE setShowPowerSession NOTIFY showPowerSessionChanged) public: explicit RootModel(QObject *parent = nullptr); - ~RootModel(); + ~RootModel() override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; bool showAllApps() const; void setShowAllApps(bool show); bool showRecentApps() const; void setShowRecentApps(bool show); bool showRecentDocs() const; void setShowRecentDocs(bool show); bool showRecentContacts() const; void setShowRecentContacts(bool show); int recentOrdering() const; void setRecentOrdering(int ordering); bool showPowerSession() const; void setShowPowerSession(bool show); AbstractModel* favoritesModel() override; AbstractModel* systemFavoritesModel(); Q_SIGNALS: void refreshed() const; void systemFavoritesModelChanged() const; void showAllAppsChanged() const; void showRecentAppsChanged() const; void showRecentDocsChanged() const; void showRecentContactsChanged() const; void showPowerSessionChanged() const; void recentOrderingChanged() const; void recentAppsModelChanged() const; protected Q_SLOTS: void refresh() override; private: KAStatsFavoritesModel *m_favorites; SystemModel *m_systemModel; bool m_showAllApps; bool m_showRecentApps; bool m_showRecentDocs; bool m_showRecentContacts; int m_recentOrdering; bool m_showPowerSession; RecentUsageModel *m_recentAppsModel; RecentUsageModel *m_recentDocsModel; RecentContactsModel *m_recentContactsModel; }; #endif diff --git a/runnermodel.h b/runnermodel.h index 65c23f6d1..9320202e1 100644 --- a/runnermodel.h +++ b/runnermodel.h @@ -1,108 +1,108 @@ /*************************************************************************** * Copyright (C) 2012 by Aurélien Gâteau * * Copyright (C) 2014 by 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 RUNNERMODEL_H #define RUNNERMODEL_H #include "abstractmodel.h" #include #include #include namespace Plasma { class RunnerManager; } class AbstractModel; class RunnerMatchesModel; class RunnerModel : public QAbstractListModel { Q_OBJECT Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(AbstractModel* favoritesModel READ favoritesModel WRITE setFavoritesModel NOTIFY favoritesModelChanged) Q_PROPERTY(QObject* appletInterface READ appletInterface WRITE setAppletInterface NOTIFY appletInterfaceChanged) Q_PROPERTY(QStringList runners READ runners WRITE setRunners NOTIFY runnersChanged) Q_PROPERTY(QString query READ query WRITE setQuery NOTIFY queryChanged) Q_PROPERTY(bool mergeResults READ mergeResults WRITE setMergeResults NOTIFY mergeResultsChanged) Q_PROPERTY(bool deleteWhenEmpty READ deleteWhenEmpty WRITE setDeleteWhenEmpty NOTIFY deleteWhenEmptyChanged) public: explicit RunnerModel(QObject *parent = nullptr); - ~RunnerModel(); + ~RunnerModel() override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; QHash roleNames() const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; int count() const; Q_INVOKABLE QObject *modelForRow(int row); QStringList runners() const; void setRunners(const QStringList &runners); QString query() const; void setQuery(const QString &query); AbstractModel *favoritesModel() const; void setFavoritesModel(AbstractModel *model); QObject *appletInterface() const; void setAppletInterface(QObject *appletInterface); bool mergeResults() const; void setMergeResults(bool merge); bool deleteWhenEmpty() const; void setDeleteWhenEmpty(bool deleteWhenEmpty); Q_SIGNALS: void countChanged() const; void favoritesModelChanged() const; void appletInterfaceChanged() const; void runnersChanged() const; void queryChanged() const; void mergeResultsChanged() const; void deleteWhenEmptyChanged(); private Q_SLOTS: void startQuery(); void matchesChanged(const QList &matches); private: void createManager(); void clear(); AbstractModel *m_favoritesModel; QObject *m_appletInterface; Plasma::RunnerManager *m_runnerManager; QStringList m_runners; QList m_models; QString m_query; QTimer m_queryTimer; bool m_mergeResults; bool m_deleteWhenEmpty; }; #endif diff --git a/simplefavoritesmodel.h b/simplefavoritesmodel.h index 4d4253b56..f01ca569a 100644 --- a/simplefavoritesmodel.h +++ b/simplefavoritesmodel.h @@ -1,91 +1,91 @@ /*************************************************************************** * Copyright (C) 2014-2015 by 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 SIMPLEFAVORITESMODEL_H #define SIMPLEFAVORITESMODEL_H #include "abstractmodel.h" #include #include class SimpleFavoritesModel : public AbstractModel { Q_OBJECT Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) Q_PROPERTY(QStringList favorites READ favorites WRITE setFavorites NOTIFY favoritesChanged) Q_PROPERTY(int maxFavorites READ maxFavorites WRITE setMaxFavorites NOTIFY maxFavoritesChanged) Q_PROPERTY(int dropPlaceholderIndex READ dropPlaceholderIndex WRITE setDropPlaceholderIndex NOTIFY dropPlaceholderIndexChanged) public: explicit SimpleFavoritesModel(QObject *parent = nullptr); - ~SimpleFavoritesModel(); + ~SimpleFavoritesModel() override; QString description() const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; bool enabled() const; void setEnabled(bool enable); QStringList favorites() const; void setFavorites(const QStringList &favorites); int maxFavorites() const; void setMaxFavorites(int max); Q_INVOKABLE bool isFavorite(const QString &id) const; Q_INVOKABLE void addFavorite(const QString &id, int index = -1); Q_INVOKABLE void removeFavorite(const QString &id); Q_INVOKABLE void moveRow(int from, int to); int dropPlaceholderIndex() const; void setDropPlaceholderIndex(int index); AbstractModel* favoritesModel() override; public Q_SLOTS: void refresh() override; Q_SIGNALS: void enabledChanged() const; void favoritesChanged() const; void maxFavoritesChanged() const; void dropPlaceholderIndexChanged(); private: AbstractEntry *favoriteFromId(const QString &id); bool m_enabled; QList m_entryList; QStringList m_favorites; int m_maxFavorites; int m_dropPlaceholderIndex; }; #endif diff --git a/submenu.h b/submenu.h index 2ceaa4523..b4c4289c0 100644 --- a/submenu.h +++ b/submenu.h @@ -1,57 +1,57 @@ /*************************************************************************** * Copyright (C) 2014 by David Edmundson * * Copyright (C) 2014 by 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 SUBMENU_H #define SUBMENU_H #include class QScreen; class SubMenu : public PlasmaQuick::Dialog { Q_OBJECT Q_PROPERTY(int offset READ offset WRITE setOffset NOTIFY offsetChanged) Q_PROPERTY(bool facingLeft READ facingLeft NOTIFY facingLeftChanged) public: SubMenu(QQuickItem *parent = nullptr); - ~SubMenu(); + ~SubMenu() override; Q_INVOKABLE QRect availableScreenRectForItem(QQuickItem *item) const; QPoint popupPosition(QQuickItem *item, const QSize &size) override; int offset() const; void setOffset(int offset); bool facingLeft() const { return m_facingLeft; } Q_SIGNALS: void offsetChanged() const; void facingLeftChanged() const; private: int m_offset; bool m_facingLeft; }; #endif diff --git a/systemmodel.h b/systemmodel.h index ff0a0c835..56baef2dc 100644 --- a/systemmodel.h +++ b/systemmodel.h @@ -1,52 +1,52 @@ /*************************************************************************** * Copyright (C) 2014-2015 by 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 SYSTEMMODEL_H #define SYSTEMMODEL_H #include "abstractmodel.h" class SystemEntry; class SystemModel : public AbstractModel { Q_OBJECT public: explicit SystemModel(QObject *parent = nullptr); - ~SystemModel(); + ~SystemModel() override; QString description() const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) override; protected Q_SLOTS: void refresh() override; private: void init(); QList m_entryList; }; #endif diff --git a/systemsettings.h b/systemsettings.h index 0d6c762cd..d75d76017 100644 --- a/systemsettings.h +++ b/systemsettings.h @@ -1,36 +1,36 @@ /*************************************************************************** * Copyright (C) 2015 by 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 SYSTEMSETTINGS_H #define SYSTEMSETTINGS_H #include class SystemSettings : public QObject { Q_OBJECT public: SystemSettings(QObject *parent = nullptr); - ~SystemSettings(); + ~SystemSettings() override; Q_INVOKABLE QString picturesLocation() const; }; #endif diff --git a/wheelinterceptor.h b/wheelinterceptor.h index 612f718b4..8f126032b 100644 --- a/wheelinterceptor.h +++ b/wheelinterceptor.h @@ -1,52 +1,52 @@ /************************************************************************** * Copyright (C) 2014-2015 by 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 WHEELINTERCEPTOR_H #define WHEELINTERCEPTOR_H #include #include class WheelInterceptor : public QQuickItem { Q_OBJECT Q_PROPERTY(QQuickItem* destination READ destination WRITE setDestination NOTIFY destinationChanged) public: WheelInterceptor(QQuickItem *parent = nullptr); - ~WheelInterceptor(); + ~WheelInterceptor() override; QQuickItem *destination() const; void setDestination(QQuickItem *destination); Q_INVOKABLE QQuickItem *findWheelArea(QQuickItem *parent) const; Q_SIGNALS: void destinationChanged() const; void wheelMoved(QPoint delta) const; protected: void wheelEvent(QWheelEvent *event) override; private: QPointer m_destination; }; #endif diff --git a/windowsystem.h b/windowsystem.h index 3e0a94382..7d0fc216c 100644 --- a/windowsystem.h +++ b/windowsystem.h @@ -1,53 +1,53 @@ /*************************************************************************** * Copyright (C) 2014 by 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 WINDOWSYSTEM_H #define WINDOWSYSTEM_H #include #include class QQuickItem; class WindowSystem : public QObject { Q_OBJECT public: explicit WindowSystem(QObject *parent = nullptr); - ~WindowSystem(); + ~WindowSystem() override; bool eventFilter(QObject *watched, QEvent *event) override; Q_INVOKABLE void forceActive(QQuickItem *item); Q_INVOKABLE bool isActive(QQuickItem *item); Q_INVOKABLE void monitorWindowFocus(QQuickItem *item); Q_INVOKABLE void monitorWindowVisibility(QQuickItem *item); Q_SIGNALS: void focusIn(QQuickWindow *window) const; void hidden(QQuickWindow *window) const; private Q_SLOTS: void monitoredWindowVisibilityChanged(QWindow::Visibility visibility) const; }; #endif