summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <[email protected]>2017-01-09 13:49:21 +0000
committerDavid Edmundson <[email protected]>2017-01-09 13:50:04 +0000
commit04c54f4e582808acf235f60f7764a1e3639046e7 (patch)
tree677d4e63cb6853335cd21b6ad9bc48fc88e00ec4
parent8f74e49c82c62e8a5195750874df87794441f635 (diff)
Remove shell's copy of PlasmaQuick headers
Summary: It's exported and we're including the include path in our cmake so we had two paths to the same thing included. Test Plan: Compiled Reviewers: #plasma, markg Reviewed By: markg Subscribers: markg, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D4030
-rw-r--r--shell/desktopview.h4
-rw-r--r--shell/panelconfigview.h5
-rw-r--r--shell/panelview.h4
-rw-r--r--shell/plasmaquick/configmodel.h126
-rw-r--r--shell/plasmaquick/configview.h92
-rw-r--r--shell/plasmaquick/containmentview.h135
-rw-r--r--shell/shellcorona.cpp1
-rw-r--r--shell/standaloneappcorona.cpp3
8 files changed, 10 insertions, 360 deletions
diff --git a/shell/desktopview.h b/shell/desktopview.h
index d0696df..baef925 100644
--- a/shell/desktopview.h
+++ b/shell/desktopview.h
@@ -20,8 +20,8 @@
#define DESKTOVIEW_H
-#include "plasmaquick/containmentview.h"
-#include "panelconfigview.h"
+#include <PlasmaQuick/ContainmentView>
+#include <PlasmaQuick/ConfigView>
#include <QtCore/qpointer.h>
namespace KWayland
diff --git a/shell/panelconfigview.h b/shell/panelconfigview.h
index 4716bac..e4c4fef 100644
--- a/shell/panelconfigview.h
+++ b/shell/panelconfigview.h
@@ -20,7 +20,9 @@
#ifndef PANELCONFIGVIEW_H
#define PANELCONFIGVIEW_H
-#include "plasmaquick/configview.h"
+#include <PlasmaQuick/ConfigView>
+#include <Plasma/Theme>
+
#include "panelview.h"
#include <QQuickItem>
@@ -29,7 +31,6 @@
#include <QQmlListProperty>
#include <QStandardItemModel>
#include <QPointer>
-#include <Plasma/Theme>
class PanelView;
diff --git a/shell/panelview.h b/shell/panelview.h
index ed08422..0e1422c 100644
--- a/shell/panelview.h
+++ b/shell/panelview.h
@@ -23,8 +23,8 @@
#include <Plasma/Theme>
#include <QTimer>
-#include "plasmaquick/containmentview.h"
-#include "plasmaquick/configview.h"
+#include <PlasmaQuick/ContainmentView>
+#include <PlasmaQuick/ConfigView>
class ShellCorona;
diff --git a/shell/plasmaquick/configmodel.h b/shell/plasmaquick/configmodel.h
deleted file mode 100644
index e1f9c4f..0000000
--- a/shell/plasmaquick/configmodel.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2013 Marco Martin <[email protected]>
- * Copyright 2015 Eike Hein <[email protected]>
- *
- * 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 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 CONFIGMODEL_H
-#define CONFIGMODEL_H
-
-#include <QQmlListProperty>
-#include <QAbstractListModel>
-
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the public Plasma API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-namespace Plasma
-{
-class Applet;
-}
-
-namespace PlasmaQuick
-{
-
-class ConfigPropertyMap;
-
-class ConfigCategoryPrivate;
-
-class ConfigModelPrivate;
-class ConfigCategory;
-
-/*
- * This model contains all the possible config categories for a dialog,
- * such as categories of the config dialog for an Applet
- * TODO: it should probably become an import instead of a library?
- */
-class ConfigModel : public QAbstractListModel
-{
- Q_OBJECT
- Q_PROPERTY(QQmlListProperty<PlasmaQuick::ConfigCategory> categories READ categories CONSTANT)
- Q_CLASSINFO("DefaultProperty", "categories")
- Q_PROPERTY(int count READ count NOTIFY countChanged)
-
-public:
- enum Roles {
- NameRole = Qt::UserRole + 1,
- IconRole,
- SourceRole,
- PluginNameRole,
- VisibleRole
- };
- ConfigModel(QObject *parent = 0);
- ~ConfigModel() override;
-
- /**
- * add a new category in the model
- * @param ConfigCategory the new category
- **/
- void appendCategory(const QString &iconName, const QString &name,
- const QString &path, const QString &pluginName);
-
- void appendCategory(const QString &iconName, const QString &name,
- const QString &path, const QString &pluginName, bool visible);
-
- /**
- * clears the model
- **/
- void clear();
-
- void setApplet(Plasma::Applet *interface);
- Plasma::Applet *applet() const;
-
- int count()
- {
- return rowCount();
- }
- int rowCount(const QModelIndex &index = QModelIndex()) const Q_DECL_OVERRIDE;
- QVariant data(const QModelIndex &, int) const Q_DECL_OVERRIDE;
-
- /**
- * @param row the row for which the data will be returned
- * @raturn the data of the specified row
- **/
- Q_INVOKABLE QVariant get(int row) const;
-
- /**
- * @return the categories of the model
- **/
- QQmlListProperty<ConfigCategory> categories();
-
-Q_SIGNALS:
- /**
- * emitted when the count is changed
- **/
- void countChanged();
-
-private:
- friend class ConfigModelPrivate;
- ConfigModelPrivate *const d;
-};
-
-}
-
-#endif // multiple inclusion guard
diff --git a/shell/plasmaquick/configview.h b/shell/plasmaquick/configview.h
deleted file mode 100644
index eef3f58..0000000
--- a/shell/plasmaquick/configview.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2013 Marco Martin <[email protected]>
- *
- * 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 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 CONFIGVIEW_H
-#define CONFIGVIEW_H
-
-#include <QQuickView>
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the public Plasma API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-namespace Plasma
-{
-class Applet;
-}
-
-namespace PlasmaQuick
-{
-
-class ConfigViewPrivate;
-
-class ConfigModel;
-
-class ConfigView : public QQuickView
-{
- Q_OBJECT
- Q_PROPERTY(PlasmaQuick::ConfigModel *configModel READ configModel CONSTANT)
- Q_PROPERTY(QString appletGlobalShortcut READ appletGlobalShortcut WRITE setAppletGlobalShortcut NOTIFY appletGlobalShortcutChanged)
-
-public:
- /**
- * @param applet the applet of this ConfigView
- * @param parent the QWindow in which this ConfigView is parented to
- **/
- ConfigView(Plasma::Applet *applet, QWindow *parent = 0);
- ~ConfigView() override;
-
- virtual void init();
-
- Plasma::Applet *applet();
-
- QString appletGlobalShortcut() const;
- void setAppletGlobalShortcut(const QString &shortcut);
-
- /**
- * @return the ConfigModel of the ConfigView
- **/
- PlasmaQuick::ConfigModel *configModel() const;
-
-Q_SIGNALS:
- void appletGlobalShortcutChanged();
-
-protected:
- void hideEvent(QHideEvent *ev) override;
- void resizeEvent(QResizeEvent *re) override;
-
-private:
- ConfigViewPrivate *const d;
-
- Q_PRIVATE_SLOT(d, void updateMinimumWidth())
- Q_PRIVATE_SLOT(d, void updateMinimumHeight())
- Q_PRIVATE_SLOT(d, void updateMaximumWidth())
- Q_PRIVATE_SLOT(d, void updateMaximumHeight())
-};
-
-}
-
-#endif // multiple inclusion guard
diff --git a/shell/plasmaquick/containmentview.h b/shell/plasmaquick/containmentview.h
deleted file mode 100644
index 809e957..0000000
--- a/shell/plasmaquick/containmentview.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright 2012 Marco Martin <[email protected]>
- *
- * 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 PLASMAQUICKCONTAINMENTVIEW_H
-#define PLASMAQUICKCONTAINMENTVIEW_H
-
-#include <kquickaddons/quickviewsharedengine.h>
-
-#include "plasma/corona.h"
-#include "plasma/containment.h"
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the public Plasma API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-namespace PlasmaQuick
-{
-
-class ContainmentViewPrivate;
-
-class ContainmentView : public KQuickAddons::QuickViewSharedEngine
-{
- Q_OBJECT
- Q_PROPERTY(Plasma::Types::Location location READ location WRITE setLocation NOTIFY locationChanged)
- Q_PROPERTY(Plasma::Types::FormFactor formFactor READ formFactor NOTIFY formFactorChanged)
- Q_PROPERTY(QRectF screenGeometry READ screenGeometry NOTIFY screenGeometryChanged)
-
-public:
- /**
- * @param corona the corona of this view
- * @param parent the QWindow this ContainmentView is parented to
- **/
- explicit ContainmentView(Plasma::Corona *corona, QWindow *parent = 0);
- ~ContainmentView() override;
-
- /**
- * @return the corona of this view
- **/
- Plasma::Corona *corona() const;
-
- /**
- * @return the KConfigGroup of this view
- **/
- virtual KConfigGroup config() const;
-
- /**
- * sets the containment for this view
- * @param cont the containment of this view
- **/
- void setContainment(Plasma::Containment *cont);
-
- /**
- * @return the containment of this ContainmentView
- **/
- Plasma::Containment *containment() const;
-
- /**
- * @return the location of this ContainmentView
- **/
- Plasma::Types::Location location() const;
-
- /**
- * Sets the location of the ContainmentView
- * @param location the location of the ContainmentView
- **/
- void setLocation(Plasma::Types::Location location);
-
- /**
- * @return the formfactor of the ContainmentView
- **/
- Plasma::Types::FormFactor formFactor() const;
-
- /**
- * @return the screenGeometry of the ContainmentView
- **/
- QRectF screenGeometry();
-
-protected Q_SLOTS:
- /**
- * It will be called when the configuration is requested
- */
- virtual void showConfigurationInterface(Plasma::Applet *applet);
-
-Q_SIGNALS:
- /**
- * emitted when the location is changed
- **/
- void locationChanged(Plasma::Types::Location location);
-
- /**
- * emitted when the formfactor is changed
- **/
- void formFactorChanged(Plasma::Types::FormFactor formFactor);
-
- /**
- * emitted when the containment is changed
- **/
- void containmentChanged();
-
- /**
- * emitted when the screenGeometry is changed
- **/
- void screenGeometryChanged();
-
-private:
- ContainmentViewPrivate *const d;
- Q_PRIVATE_SLOT(d, void updateDestroyed(bool))
- friend class ContainmentViewPrivate;
-};
-
-}
-
-#endif // CONTAINMENTVIEW_H
diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
index 923f227..3c55626 100644
--- a/shell/shellcorona.cpp
+++ b/shell/shellcorona.cpp
@@ -61,7 +61,6 @@
#include "desktopview.h"
#include "panelview.h"
#include "scripting/scriptengine.h"
-#include "plasmaquick/configview.h"
#include "shellmanager.h"
#include "osd.h"
#include "screenpool.h"
diff --git a/shell/standaloneappcorona.cpp b/shell/standaloneappcorona.cpp
index 2d6e1d7..85bef18 100644
--- a/shell/standaloneappcorona.cpp
+++ b/shell/standaloneappcorona.cpp
@@ -21,8 +21,11 @@
#include "standaloneappcorona.h"
#include "desktopview.h"
+#include "panelview.h"
+
#include <QDebug>
#include <QAction>
+#include <QQuickItem>
#include <kactivities/consumer.h>
#include <KActionCollection>