diff --git a/applets/appmenu/lib/appmenuapplet.h b/applets/appmenu/lib/appmenuapplet.h index d08013f6c..c6a870f6c 100644 --- a/applets/appmenu/lib/appmenuapplet.h +++ b/applets/appmenu/lib/appmenuapplet.h @@ -1,97 +1,97 @@ /* * Copyright 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) 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 . * */ #pragma once #include #include class KDBusMenuImporter; class QQuickItem; class QMenu; class AppMenuModel; class AppMenuApplet : public Plasma::Applet { Q_OBJECT Q_PROPERTY(bool appletEnabled READ appletEnabled NOTIFY appletEnabledChanged) Q_PROPERTY(AppMenuModel* model READ model WRITE setModel NOTIFY modelChanged) Q_PROPERTY(int view READ view WRITE setView NOTIFY viewChanged) Q_PROPERTY(int currentIndex READ currentIndex NOTIFY currentIndexChanged) Q_PROPERTY(QQuickItem *buttonGrid READ buttonGrid WRITE setButtonGrid NOTIFY buttonGridChanged) public: enum ViewType { FullView, CompactView }; explicit AppMenuApplet(QObject *parent, const QVariantList &data); ~AppMenuApplet() override; void init() override; int currentIndex() const; QQuickItem *buttonGrid() const; void setButtonGrid(QQuickItem *buttonGrid); AppMenuModel *model() const; void setModel(AppMenuModel *model); int view() const; void setView(int type); bool appletEnabled() const; signals: void modelChanged(); void viewChanged(); void currentIndexChanged(); void buttonGridChanged(); void appletEnabledChanged(); void requestActivateIndex(int index); public slots: void updateAppletEnabled(); void trigger(QQuickItem *ctx, int idx); protected: - bool eventFilter(QObject *watched, QEvent *event); + bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; private: QMenu *createMenu(int idx) const; void setCurrentIndex(int currentIndex); void onMenuAboutToHide(); int m_currentIndex = -1; int m_viewType = FullView; bool m_appletEnabled = true; QPointer m_currentMenu; QPointer m_buttonGrid; QPointer m_model; }; diff --git a/applets/appmenu/plugin/appmenumodel.h b/applets/appmenu/plugin/appmenumodel.h index 77ad5e9d1..9b4605db9 100644 --- a/applets/appmenu/plugin/appmenumodel.h +++ b/applets/appmenu/plugin/appmenumodel.h @@ -1,76 +1,76 @@ /****************************************************************** * Copyright 2016 Chinmoy Ranjan Pradhan * * 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 . * ******************************************************************/ #include #include #include #include class QMenu; class QAction; class QModelIndex; class KDBusMenuImporter; class AppMenuModel : public QAbstractListModel { Q_OBJECT Q_PROPERTY(bool menuAvailable READ menuAvailable WRITE setMenuAvailable NOTIFY menuAvailableChanged) public: explicit AppMenuModel(QObject *parent = 0); ~AppMenuModel(); enum AppMenuRole { MenuRole = Qt::UserRole+1, ActionRole }; - QVariant data(const QModelIndex &index, int role) const; - int rowCount(const QModelIndex &parent = QModelIndex()) const; - QHash roleNames() const; + QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; + int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; + QHash roleNames() const Q_DECL_OVERRIDE; void updateApplicationMenu(const QString &serviceName, const QString &menuObjectPath); bool menuAvailable() const; void setMenuAvailable(bool set); private Q_SLOTS: void onActiveWindowChanged(WId id); void update(); signals: void menuAvailableChanged(); void modelNeedsUpdate(); private: bool m_menuAvailable; QPointer m_menu; QStringList m_activeMenu; QList m_activeActions; QString m_serviceName; QString m_menuObjectPath; QPointer m_importer; }; diff --git a/applets/systemtray/tests/statusnotifier/pumpjob.h b/applets/systemtray/tests/statusnotifier/pumpjob.h index cc98536fc..f767952a8 100644 --- a/applets/systemtray/tests/statusnotifier/pumpjob.h +++ b/applets/systemtray/tests/statusnotifier/pumpjob.h @@ -1,56 +1,56 @@ /****************************************************************************** * Copyright 2013 Sebastian Kügler * * * * 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 PUMPJOB_H #define PUMPJOB_H #include #include class PumpJobPrivate; class PumpJob : public KIO::Job { Q_OBJECT public: PumpJob(int interval = 0); virtual ~PumpJob(); - virtual void start(); - virtual bool doKill(); - virtual bool doSuspend(); - virtual bool doResume(); + void start() Q_DECL_OVERRIDE; + bool doKill() Q_DECL_OVERRIDE; + bool doSuspend() Q_DECL_OVERRIDE; + bool doResume() Q_DECL_OVERRIDE; virtual bool isSuspended() const; void init(); Q_SIGNALS: void suspended(KJob *job); void resumed(KJob *job); public Q_SLOTS: void timeout(); private: PumpJobPrivate* d; }; #endif diff --git a/components/shellprivate/widgetexplorer/widgetexplorer.h b/components/shellprivate/widgetexplorer/widgetexplorer.h index eb7562396..b58820967 100644 --- a/components/shellprivate/widgetexplorer/widgetexplorer.h +++ b/components/shellprivate/widgetexplorer/widgetexplorer.h @@ -1,182 +1,182 @@ /* * Copyright (C) 2007 by Ivan Cukic * Copyright (C) 2009 by Ana Cecília Martins * Copyright 2013 by Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library/Lesser 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 Library/Lesser 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 WIDGETEXPLORER_H #define WIDGETEXPLORER_H #include #include #include #include "plasmaappletitemmodel_p.h" namespace Plasma { class Corona; class Containment; class Applet; } class WidgetExplorerPrivate; class PlasmaQuickView; //We need to access the separator property that is not exported by QAction class WidgetAction : public QAction { Q_OBJECT Q_PROPERTY(bool separator READ isSeparator WRITE setSeparator NOTIFY separatorChanged) public: WidgetAction(QObject *parent = 0); WidgetAction(const QIcon &icon, const QString &text, QObject *parent); Q_SIGNALS: void separatorChanged(); }; class WidgetExplorer : public QObject, public QQmlParserStatus { Q_OBJECT Q_INTERFACES(QQmlParserStatus) /** * Model that lists all applets */ Q_PROPERTY(QObject * widgetsModel READ widgetsModel CONSTANT) /** * Model that lists all applets filters and categories */ Q_PROPERTY(QObject * filterModel READ filterModel CONSTANT) /** * Whether to show special filters such as "Running" and "Uninstallable" in the filterModel. */ Q_PROPERTY(bool showSpecialFilters READ showSpecialFilters WRITE setShowSpecialFilters NOTIFY showSpecialFiltersChanged) /** * Actions for adding widgets, like download plasma widgets, download google gadgets, install from local file */ Q_PROPERTY(QList widgetsMenuActions READ widgetsMenuActions NOTIFY widgetsMenuActionsChanged) /** * Extra actions assigned by the shell, like switch to activity manager */ Q_PROPERTY(QList extraActions READ extraActions NOTIFY extraActionsChanged) /** * The application that owns the widget list. different application may show different lists */ Q_PROPERTY(QString application READ application WRITE setApplication NOTIFY applicationChanged) /** * Set the features the listed applets must provide: needed for listing alternatives * to a particular applet */ Q_PROPERTY(QStringList provides READ provides WRITE setProvides NOTIFY providesChanged) Q_PROPERTY(Plasma::Containment *containment READ containment WRITE setContainment NOTIFY containmentChanged) public: explicit WidgetExplorer(QObject *parent = 0); ~WidgetExplorer() override; QString application(); /** * Populates the widget list for the given application. This must be called * before the widget explorer will be usable as the widget list will remain * empty up to that point. * * @arg application the application which the widgets should be loaded for. */ void setApplication(const QString &application = QString()); QStringList provides() const; void setProvides(const QStringList &provides); /** * Changes the current default containment to add applets to * * @arg containment the new default */ void setContainment(Plasma::Containment *containment); /** * @return the current default containment to add applets to */ Plasma::Containment *containment() const; /** * @return the current corona this widget is added to */ Plasma::Corona *corona() const; QObject *widgetsModel() const; QObject *filterModel() const; bool showSpecialFilters() const; void setShowSpecialFilters(bool show); QList widgetsMenuActions(); QList extraActions() const; /** * Uninstall a plasmoid with a given plugin name. only user-installed ones are uninstallable */ Q_INVOKABLE void uninstall(const QString &pluginName); - void classBegin(); - void componentComplete(); + void classBegin() Q_DECL_OVERRIDE; + void componentComplete() Q_DECL_OVERRIDE; Q_SIGNALS: void widgetsMenuActionsChanged(); void extraActionsChanged(); void shouldClose(); void viewChanged(); void applicationChanged(); void containmentChanged(); void providesChanged(); public Q_SLOTS: /** * Adds currently selected applets */ void addApplet(const QString &pluginName); void openWidgetFile(); void downloadWidgets(); Q_SIGNALS: void showSpecialFiltersChanged() const; protected Q_SLOTS: void immutabilityChanged(Plasma::Types::ImmutabilityType); private: Q_PRIVATE_SLOT(d, void appletAdded(Plasma::Applet*)) Q_PRIVATE_SLOT(d, void appletRemoved(Plasma::Applet*)) Q_PRIVATE_SLOT(d, void containmentDestroyed()) WidgetExplorerPrivate * const d; friend class WidgetExplorerPrivate; }; #endif // WIDGETEXPLORER_H diff --git a/libtaskmanager/declarative/taskmanagerplugin.h b/libtaskmanager/declarative/taskmanagerplugin.h index bb544de95..c6b3e4f27 100644 --- a/libtaskmanager/declarative/taskmanagerplugin.h +++ b/libtaskmanager/declarative/taskmanagerplugin.h @@ -1,41 +1,41 @@ /******************************************************************** Copyright 2015-2016 Eike Hein 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 TASKMANAGERPLUGIN_H #define TASKMANAGERPLUGIN_H #include #include namespace TaskManager { class TaskManagerPlugin : public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: - virtual void registerTypes(const char *uri); + void registerTypes(const char *uri) Q_DECL_OVERRIDE; }; } #endif diff --git a/plasmacalendarintegration/qmlhelper/holidayeventshelperplugin.h b/plasmacalendarintegration/qmlhelper/holidayeventshelperplugin.h index 32a0e684b..065a28566 100644 --- a/plasmacalendarintegration/qmlhelper/holidayeventshelperplugin.h +++ b/plasmacalendarintegration/qmlhelper/holidayeventshelperplugin.h @@ -1,33 +1,33 @@ /* Copyright (c) 2015 Martin Klapetek 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 HOLIDAYEVENTSHELPERPLUGIN_H #define HOLIDAYEVENTSHELPERPLUGIN_H #include class HolidayEventsHelperPlugin : public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: - virtual void registerTypes(const char* uri); + void registerTypes(const char* uri) Q_DECL_OVERRIDE; }; #endif // HOLIDAYEVENTSHELPERPLUGIN_H