[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-workspace/plasma/sreich/sal-qml] plasma/netbook/containments/sal/shell: add a dbus interface to
From: Shaun Reich <shaun.reich () kdemail ! net>
Date: 2012-04-15 23:15:27
Message-ID: 20120415231527.AA967A60A9 () git ! kde ! org
[Download RAW message or body]
Git commit 2564b8e75b31a1ffd8074407f987bde823d07799 by Shaun Reich.
Committed on 08/04/2012 at 23:21.
Pushed by sreich into branch 'plasma/sreich/sal-qml'.
add a dbus interface to salviewer so the launcher can launch it
M +5 -0 plasma/netbook/containments/sal/shell/CMakeLists.txt
M +7 -0 plasma/netbook/containments/sal/shell/fullview.cpp
M +4 -0 plasma/netbook/containments/sal/shell/fullview.h
A +9 -0 plasma/netbook/containments/sal/shell/org.kde.salviewer.xml
http://commits.kde.org/kde-workspace/2564b8e75b31a1ffd8074407f987bde823d07799
diff --git a/plasma/netbook/containments/sal/shell/CMakeLists.txt \
b/plasma/netbook/containments/sal/shell/CMakeLists.txt index 9b99498..da25f0b 100644
--- a/plasma/netbook/containments/sal/shell/CMakeLists.txt
+++ b/plasma/netbook/containments/sal/shell/CMakeLists.txt
@@ -3,9 +3,14 @@ set(salviewer_SRCS
main.cpp
)
+qt4_add_dbus_adaptor(salviewer_SRCS org.kde.salviewer.xml
+ fullview.h FullView)
+
+
kde4_add_executable(salviewer ${salviewer_SRCS})
target_link_libraries(salviewer ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS})
+
install(TARGETS salviewer ${INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/plasma/netbook/containments/sal/shell/fullview.cpp \
b/plasma/netbook/containments/sal/shell/fullview.cpp index 4aae753..47798be 100644
--- a/plasma/netbook/containments/sal/shell/fullview.cpp
+++ b/plasma/netbook/containments/sal/shell/fullview.cpp
@@ -27,6 +27,8 @@
#include "fullview.h"
+#include "salvieweradaptor.h"
+
#include <QApplication>
#include <QDir>
#include <QFileInfo>
@@ -59,6 +61,7 @@ FullView::FullView(const QString &ff, const QString &loc, bool \
persistent, QWidg m_appletShotTimer(0),
m_persistentConfig(persistent)
{
+ new SalViewerAdaptor(this);
m_view = new QGraphicsView(this);
setCentralWidget(m_view);
@@ -131,6 +134,10 @@ FullView::~FullView()
// storeCurrentApplet();
}
+void FullView::showPopup(int x, int y)
+{
+
+}
void FullView::keyPressEvent(QKeyEvent *event)
{
diff --git a/plasma/netbook/containments/sal/shell/fullview.h \
b/plasma/netbook/containments/sal/shell/fullview.h index ec584a4..a400604 100644
--- a/plasma/netbook/containments/sal/shell/fullview.h
+++ b/plasma/netbook/containments/sal/shell/fullview.h
@@ -44,6 +44,7 @@ namespace Plasma
class FullView : public KMainWindow
{
Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.kde.salViewer")
public:
explicit FullView(const QString &formfactor = "planar", const QString &location \
= "floating", bool persistentConfig = false, QWidget *parent = 0); @@ -53,6 +54,9 @@ \
public:
const QString& wallpaper, const QVariantList &args = \
QVariantList()); void screenshotAll();
+public Q_SLOTS:
+ void showPopup(int x, int y);
+
protected:
void showEvent(QShowEvent *event);
virtual void focusOutEvent(QFocusEvent *event);
diff --git a/plasma/netbook/containments/sal/shell/org.kde.salviewer.xml \
b/plasma/netbook/containments/sal/shell/org.kde.salviewer.xml new file mode 100644
index 0000000..b9039d3
--- /dev/null
+++ b/plasma/netbook/containments/sal/shell/org.kde.salviewer.xml
@@ -0,0 +1,9 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" \
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> +<node>
+ <interface name="org.kde.salViewer">
+ <method name="showPopup">
+ <arg name="x" type="i" direction="in"/>
+ <arg name="y" type="i" direction="in"/>
+ </method>
+ </interface>
+</node>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic