Add interface to open widget explorer from panel config
This commit is contained in:
parent
27e5a2ab46
commit
ea7802a787
@ -26,13 +26,16 @@
|
|||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
#include <QQmlContext>
|
#include <QQmlContext>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
#include <klocalizedstring.h>
|
#include <klocalizedstring.h>
|
||||||
#include <kwindoweffects.h>
|
#include <kwindoweffects.h>
|
||||||
|
#include <KActionCollection>
|
||||||
|
|
||||||
#include <Plasma/Containment>
|
#include <Plasma/Containment>
|
||||||
#include <Plasma/Corona>
|
#include <Plasma/Corona>
|
||||||
#include <Plasma/PluginLoader>
|
#include <Plasma/PluginLoader>
|
||||||
|
#include <X11/extensions/XInput2.h>
|
||||||
|
|
||||||
//////////////////////////////PanelConfigView
|
//////////////////////////////PanelConfigView
|
||||||
PanelConfigView::PanelConfigView(Plasma::Containment *containment, PanelView *panelView, QWindow *parent)
|
PanelConfigView::PanelConfigView(Plasma::Containment *containment, PanelView *panelView, QWindow *parent)
|
||||||
@ -68,6 +71,14 @@ void PanelConfigView::init()
|
|||||||
syncGeometry();
|
syncGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PanelConfigView::showAddWidgetDialog()
|
||||||
|
{
|
||||||
|
QAction *addWidgetAction = m_containment->actions()->action("add widgets");
|
||||||
|
if (addWidgetAction) {
|
||||||
|
addWidgetAction->trigger();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PanelConfigView::syncGeometry()
|
void PanelConfigView::syncGeometry()
|
||||||
{
|
{
|
||||||
if (!m_containment) {
|
if (!m_containment) {
|
||||||
|
@ -47,6 +47,9 @@ public:
|
|||||||
|
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
void showAddWidgetDialog();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void focusOutEvent(QFocusEvent *ev);
|
void focusOutEvent(QFocusEvent *ev);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user