Merge branch 'mart/singleQmlEngineExperiment'

Conflicts:
	shell/desktopview.cpp
	shell/panelview.cpp
	shell/panelview.h
wilder-5.14
Marco Martin 11 years ago
commit 72e735e1fd
  1. 3
      applets/activitybar/metadata.desktop
  2. 2
      applets/analog-clock/contents/ui/analogclock.qml
  3. 2
      applets/analog-clock/metadata.desktop
  4. 2
      applets/batterymonitor/package/contents/ui/BatteryItem.qml
  5. 2
      applets/batterymonitor/package/contents/ui/CompactRepresentation.qml
  6. 2
      applets/batterymonitor/package/contents/ui/PopupDialog.qml
  7. 2
      applets/batterymonitor/package/contents/ui/batterymonitor.qml
  8. 2
      applets/batterymonitor/package/metadata.desktop
  9. 1
      applets/lock_logout/metadata.desktop
  10. 0
      applets/notifications/package/contents/code/uiproperties.js
  11. 3
      applets/notifications/package/contents/ui/main.qml
  12. 2
      applets/notifications/package/metadata.desktop
  13. 1
      applets/systemtray/package/contents/ui/TaskDelegate.qml
  14. 2
      applets/systemtray/package/metadata.desktop
  15. 1
      shell/CMakeLists.txt
  16. 6
      shell/desktopview.cpp
  17. 4
      shell/desktopview.h
  18. 14
      shell/panelview.cpp
  19. 5
      shell/panelview.h
  20. 35
      shell/plasmaquick/containmentview.h

@ -154,6 +154,3 @@ X-KDE-PluginInfo-Category=Windows and Tasks
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true X-KDE-PluginInfo-EnabledByDefault=true
X-Plasma-Requires-FileDialog=Unused
X-Plasma-Requires-LaunchApp=Unused

@ -25,7 +25,7 @@ import org.kde.plasma.calendar 2.0 as PlasmaCalendar
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import "plasmapackage:/code/logic.js" as Logic import "logic.js" as Logic
Item { Item {
id: analogclock id: analogclock

@ -161,7 +161,7 @@ X-Plasma-StandAloneApp=true
X-KDE-PluginInfo-Author=Marco Martin X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Email=mart@kde.org X-KDE-PluginInfo-Email=mart@kde.org
X-KDE-PluginInfo-Name=org.kde.plasma.analogclock X-KDE-PluginInfo-Name=org.kde.plasma.analogclock
X-KDE-PluginInfo-Version=1.0 X-KDE-PluginInfo-Version=3.0
X-KDE-PluginInfo-Website=http://userbase.kde.org/Plasma/Clocks X-KDE-PluginInfo-Website=http://userbase.kde.org/Plasma/Clocks
X-KDE-PluginInfo-Category=Date and Time X-KDE-PluginInfo-Category=Date and Time
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=

@ -26,7 +26,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.workspace.components 2.0 import org.kde.plasma.workspace.components 2.0
import org.kde.kcoreaddons 1.0 as KCoreAddons import org.kde.kcoreaddons 1.0 as KCoreAddons
import "plasmapackage:/code/logic.js" as Logic import "logic.js" as Logic
Item { Item {
id: batteryItem id: batteryItem

@ -24,7 +24,7 @@ import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as Components import org.kde.plasma.components 2.0 as Components
import org.kde.plasma.workspace.components 2.0 import org.kde.plasma.workspace.components 2.0
import "plasmapackage:/code/logic.js" as Logic import "logic.js" as Logic
MouseArea { MouseArea {
id: root id: root

@ -23,7 +23,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as Components import org.kde.plasma.components 2.0 as Components
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
import "plasmapackage:/code/logic.js" as Logic import "logic.js" as Logic
FocusScope { FocusScope {
id: dialog id: dialog

@ -25,7 +25,7 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kcoreaddons 1.0 as KCoreAddons import org.kde.kcoreaddons 1.0 as KCoreAddons
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
import "plasmapackage:/code/logic.js" as Logic import "logic.js" as Logic
Item { Item {
id: batterymonitor id: batterymonitor

@ -162,7 +162,7 @@ X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Email=sebas@kde.org, kde@privat.broulik.de X-KDE-PluginInfo-Email=sebas@kde.org, kde@privat.broulik.de
X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-Name=org.kde.plasma.battery X-KDE-PluginInfo-Name=org.kde.plasma.battery
X-KDE-PluginInfo-Version=2.0 X-KDE-PluginInfo-Version=3.0
X-KDE-PluginInfo-Website=http://vizZzion.org X-KDE-PluginInfo-Website=http://vizZzion.org
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-EnabledByDefault=true X-KDE-PluginInfo-EnabledByDefault=true

@ -216,4 +216,3 @@ X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=LGPL X-KDE-PluginInfo-License=LGPL
X-KDE-PluginInfo-EnabledByDefault=true X-KDE-PluginInfo-EnabledByDefault=true

@ -28,8 +28,7 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.private.notifications 1.0 import org.kde.plasma.private.notifications 1.0
import "plasmapackage:/ui/uiproperties.js" as UiProperties import "uiproperties.js" as UiProperties
//import "../ui/uiproperties.js" as UiProperties
MouseEventListener { MouseEventListener {
id: notificationsApplet id: notificationsApplet

@ -154,7 +154,7 @@ X-KDE-PluginInfo-Category=Tasks
X-KDE-PluginInfo-Email=davide.bettio@kdemail.net X-KDE-PluginInfo-Email=davide.bettio@kdemail.net
X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-Name=org.kde.plasma.notifications X-KDE-PluginInfo-Name=org.kde.plasma.notifications
X-KDE-PluginInfo-Version=0.1 X-KDE-PluginInfo-Version=3.0
X-KDE-PluginInfo-Website=http://plasma.kde.org/ X-KDE-PluginInfo-Website=http://plasma.kde.org/
X-KDE-ServiceTypes=Plasma/Applet X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-API=declarativeappletscript X-Plasma-API=declarativeappletscript

@ -22,7 +22,6 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddonsComponents import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddonsComponents
import org.kde.private.systemtray 2.0 as SystemTray import org.kde.private.systemtray 2.0 as SystemTray
//import "plasmapackage:/code/Layout.js" as LayoutManager
KQuickControlsAddonsComponents.MouseEventListener { KQuickControlsAddonsComponents.MouseEventListener {

@ -163,7 +163,7 @@ Type=Service
X-KDE-PluginInfo-Author=Sebastian Kügler X-KDE-PluginInfo-Author=Sebastian Kügler
X-KDE-PluginInfo-Email=sebas@kde.org X-KDE-PluginInfo-Email=sebas@kde.org
X-KDE-PluginInfo-Name=org.kde.plasma.systemtray X-KDE-PluginInfo-Name=org.kde.plasma.systemtray
X-KDE-PluginInfo-Version=2.0 X-KDE-PluginInfo-Version=3.0
X-KDE-PluginInfo-Website=http://plasma.kde.org/ X-KDE-PluginInfo-Website=http://plasma.kde.org/
X-KDE-PluginInfo-Category=Windows and Tasks X-KDE-PluginInfo-Category=Windows and Tasks
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=

@ -81,6 +81,7 @@ target_link_libraries(plasmashell
KF5::DBusAddons KF5::DBusAddons
KF5::Screen KF5::Screen
KF5::Declarative KF5::Declarative
KF5::QuickAddons
KF5::XmlGui KF5::XmlGui
KF5::Package KF5::Package
KF5::WaylandClient KF5::WaylandClient

@ -36,7 +36,7 @@
#include <KWayland/Client/surface.h> #include <KWayland/Client/surface.h>
DesktopView::DesktopView(Plasma::Corona *corona, QScreen *targetScreen) DesktopView::DesktopView(Plasma::Corona *corona, QScreen *targetScreen)
: PlasmaQuick::View(corona, 0), : PlasmaQuick::ContainmentView(corona, 0),
m_windowType(Desktop), m_windowType(Desktop),
m_shellSurface(nullptr) m_shellSurface(nullptr)
{ {
@ -203,7 +203,7 @@ bool DesktopView::event(QEvent *e)
} }
} }
return PlasmaQuick::View::event(e); return PlasmaQuick::ContainmentView::event(e);
} }
void DesktopView::keyPressEvent(QKeyEvent *e) void DesktopView::keyPressEvent(QKeyEvent *e)
@ -219,7 +219,7 @@ void DesktopView::keyPressEvent(QKeyEvent *e)
} }
} }
QQuickView::keyPressEvent(e); ContainmentView::keyPressEvent(e);
} }

@ -20,7 +20,7 @@
#define DESKTOVIEW_H #define DESKTOVIEW_H
#include "plasmaquick/view.h" #include "plasmaquick/containmentview.h"
#include "panelconfigview.h" #include "panelconfigview.h"
#include <QtCore/qpointer.h> #include <QtCore/qpointer.h>
@ -32,7 +32,7 @@ namespace KWayland
} }
} }
class DesktopView : public PlasmaQuick::View class DesktopView : public PlasmaQuick::ContainmentView
{ {
Q_OBJECT Q_OBJECT

@ -51,7 +51,7 @@
static const int MINSIZE = 10; static const int MINSIZE = 10;
PanelView::PanelView(ShellCorona *corona, QScreen *targetScreen, QWindow *parent) PanelView::PanelView(ShellCorona *corona, QScreen *targetScreen, QWindow *parent)
: PlasmaQuick::View(corona, parent), : PlasmaQuick::ContainmentView(corona, parent),
m_offset(0), m_offset(0),
m_maxLength(0), m_maxLength(0),
m_minLength(0), m_minLength(0),
@ -67,7 +67,7 @@ PanelView::PanelView(ShellCorona *corona, QScreen *targetScreen, QWindow *parent
setPosition(targetScreen->geometry().topLeft()); setPosition(targetScreen->geometry().topLeft());
setScreen(targetScreen); setScreen(targetScreen);
} }
setResizeMode(QQuickView::SizeRootObjectToView); setResizeMode(QuickViewSharedEngine::SizeRootObjectToView);
setClearBeforeRendering(true); setClearBeforeRendering(true);
setColor(QColor(Qt::transparent)); setColor(QColor(Qt::transparent));
setFlags(Qt::FramelessWindowHint|Qt::WindowDoesNotAcceptFocus); setFlags(Qt::FramelessWindowHint|Qt::WindowDoesNotAcceptFocus);
@ -94,7 +94,7 @@ PanelView::PanelView(ShellCorona *corona, QScreen *targetScreen, QWindow *parent
&m_positionPaneltimer, SLOT(start())); &m_positionPaneltimer, SLOT(start()));
connect(this, SIGNAL(containmentChanged()), connect(this, SIGNAL(containmentChanged()),
this, SLOT(containmentChanged())); this, SLOT(containmentChanged()));
connect(this, &View::locationChanged, [this] () { connect(this, &ContainmentView::locationChanged, [this] () {
emit m_corona->availableScreenRectChanged(); emit m_corona->availableScreenRectChanged();
emit m_corona->availableScreenRegionChanged(); emit m_corona->availableScreenRegionChanged();
}); });
@ -690,13 +690,13 @@ void PanelView::resizeEvent(QResizeEvent *ev)
if (m_shellSurface) { if (m_shellSurface) {
m_shellSurface->setPosition(pos); m_shellSurface->setPosition(pos);
} }
PlasmaQuick::View::resizeEvent(ev); PlasmaQuick::ContainmentView::resizeEvent(ev);
} }
void PanelView::moveEvent(QMoveEvent *ev) void PanelView::moveEvent(QMoveEvent *ev)
{ {
updateMask(); updateMask();
PlasmaQuick::View::moveEvent(ev); PlasmaQuick::ContainmentView::moveEvent(ev);
} }
void PanelView::integrateScreen() void PanelView::integrateScreen()
@ -715,7 +715,7 @@ void PanelView::integrateScreen()
void PanelView::showEvent(QShowEvent *event) void PanelView::showEvent(QShowEvent *event)
{ {
PanelShadows::self()->addWindow(this); PanelShadows::self()->addWindow(this);
PlasmaQuick::View::showEvent(event); PlasmaQuick::ContainmentView::showEvent(event);
integrateScreen(); integrateScreen();
//When the screen is set, the screen is recreated internally, so we need to //When the screen is set, the screen is recreated internally, so we need to
@ -827,7 +827,7 @@ bool PanelView::event(QEvent *e)
break; break;
} }
return View::event(e); return ContainmentView::event(e);
} }
bool PanelView::containmentContainsPosition(const QPointF &point) const bool PanelView::containmentContainsPosition(const QPointF &point) const

@ -23,7 +23,7 @@
#include <Plasma/Theme> #include <Plasma/Theme>
#include <QTimer> #include <QTimer>
#include "plasmaquick/view.h" #include "plasmaquick/containmentview.h"
#include "plasmaquick/configview.h" #include "plasmaquick/configview.h"
class ShellCorona; class ShellCorona;
@ -36,7 +36,8 @@ namespace KWayland
} }
} }
class PanelView : public PlasmaQuick::View class PanelView : public PlasmaQuick::ContainmentView
{ {
Q_OBJECT Q_OBJECT
/** /**

@ -16,10 +16,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifndef PLASMAQUICKVIEW_H #ifndef PLASMAQUICKCONTAINMENTVIEW_H
#define PLASMAQUICKVIEW_H #define PLASMAQUICKCONTAINMENTVIEW_H
#include <QtQuick/QQuickView> #include <kquickaddons/quickviewsharedengine.h>
#include "plasma/corona.h" #include "plasma/corona.h"
#include "plasma/containment.h" #include "plasma/containment.h"
@ -38,9 +38,9 @@
namespace PlasmaQuick namespace PlasmaQuick
{ {
class ViewPrivate; class ContainmentViewPrivate;
class View : public QQuickView class ContainmentView : public KQuickAddons::QuickViewSharedEngine
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(Plasma::Types::Location location READ location WRITE setLocation NOTIFY locationChanged) Q_PROPERTY(Plasma::Types::Location location READ location WRITE setLocation NOTIFY locationChanged)
@ -50,10 +50,10 @@ class View : public QQuickView
public: public:
/** /**
* @param corona the corona of this view * @param corona the corona of this view
* @param parent the QWindow this View is parented to * @param parent the QWindow this ContainmentView is parented to
**/ **/
explicit View(Plasma::Corona *corona, QWindow *parent = 0); explicit ContainmentView(Plasma::Corona *corona, QWindow *parent = 0);
virtual ~View(); virtual ~ContainmentView();
/** /**
* @return the corona of this view * @return the corona of this view
@ -72,28 +72,28 @@ public:
void setContainment(Plasma::Containment *cont); void setContainment(Plasma::Containment *cont);
/** /**
* @return the containment of this View * @return the containment of this ContainmentView
**/ **/
Plasma::Containment *containment() const; Plasma::Containment *containment() const;
/** /**
* @return the location of this View * @return the location of this ContainmentView
**/ **/
Plasma::Types::Location location() const; Plasma::Types::Location location() const;
/** /**
* Sets the location of the View * Sets the location of the ContainmentView
* @param location the location of the View * @param location the location of the ContainmentView
**/ **/
void setLocation(Plasma::Types::Location location); void setLocation(Plasma::Types::Location location);
/** /**
* @return the formfactor of the View * @return the formfactor of the ContainmentView
**/ **/
Plasma::Types::FormFactor formFactor() const; Plasma::Types::FormFactor formFactor() const;
/** /**
* @return the screenGeometry of the View * @return the screenGeometry of the ContainmentView
**/ **/
QRectF screenGeometry(); QRectF screenGeometry();
@ -125,10 +125,11 @@ Q_SIGNALS:
void screenGeometryChanged(); void screenGeometryChanged();
private: private:
ViewPrivate *const d; ContainmentViewPrivate *const d;
friend class ViewPrivate; Q_PRIVATE_SLOT(d, void updateDestroyed(bool))
friend class ContainmentViewPrivate;
}; };
} }
#endif // View_H #endif // CONTAINMENTVIEW_H
Loading…
Cancel
Save