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 <QQmlContext>
|
||||
#include <QScreen>
|
||||
#include <QAction>
|
||||
|
||||
#include <klocalizedstring.h>
|
||||
#include <kwindoweffects.h>
|
||||
#include <KActionCollection>
|
||||
|
||||
#include <Plasma/Containment>
|
||||
#include <Plasma/Corona>
|
||||
#include <Plasma/PluginLoader>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
|
||||
//////////////////////////////PanelConfigView
|
||||
PanelConfigView::PanelConfigView(Plasma::Containment *containment, PanelView *panelView, QWindow *parent)
|
||||
@ -68,6 +71,14 @@ void PanelConfigView::init()
|
||||
syncGeometry();
|
||||
}
|
||||
|
||||
void PanelConfigView::showAddWidgetDialog()
|
||||
{
|
||||
QAction *addWidgetAction = m_containment->actions()->action("add widgets");
|
||||
if (addWidgetAction) {
|
||||
addWidgetAction->trigger();
|
||||
}
|
||||
}
|
||||
|
||||
void PanelConfigView::syncGeometry()
|
||||
{
|
||||
if (!m_containment) {
|
||||
|
@ -47,6 +47,9 @@ public:
|
||||
|
||||
void init();
|
||||
|
||||
public Q_SLOTS:
|
||||
void showAddWidgetDialog();
|
||||
|
||||
protected:
|
||||
void focusOutEvent(QFocusEvent *ev);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user