diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp index 5de486ec39..ff4084cace 100644 --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -330,6 +330,7 @@ TabBox::TabBox(QObject *parent) m_desktopListConfig.setLayout(TabBoxConfig::VerticalLayout); m_tabBox = new TabBoxHandlerImpl(this); connect(m_tabBox, SIGNAL(ready()), SLOT(handlerReady())); + connect(m_tabBox, SIGNAL(selectedIndexChanged()), SIGNAL(itemSelected())); m_tabBoxMode = TabBoxDesktopMode; // init variables connect(&m_delayedShowTimer, SIGNAL(timeout()), this, SLOT(show())); diff --git a/tabbox/tabbox.h b/tabbox/tabbox.h index 184b01c998..6d4e2b2479 100644 --- a/tabbox/tabbox.h +++ b/tabbox/tabbox.h @@ -220,6 +220,7 @@ public slots: signals: void tabBoxAdded(int); Q_SCRIPTABLE void tabBoxClosed(); + Q_SCRIPTABLE void itemSelected(); void tabBoxUpdated(); void tabBoxKeyEvent(QKeyEvent*); diff --git a/tabbox/tabboxhandler.cpp b/tabbox/tabboxhandler.cpp index da3216ae5d..00c0343f0b 100644 --- a/tabbox/tabboxhandler.cpp +++ b/tabbox/tabboxhandler.cpp @@ -559,6 +559,7 @@ void TabBoxHandler::setCurrentIndex(const QModelIndex& index) d->updateHighlightWindows(); } } + emit selectedIndexChanged(); } const QModelIndex& TabBoxHandler::currentIndex() const diff --git a/tabbox/tabboxhandler.h b/tabbox/tabboxhandler.h index 00cc3e7590..a20801b2db 100644 --- a/tabbox/tabboxhandler.h +++ b/tabbox/tabboxhandler.h @@ -359,6 +359,7 @@ signals: void configChanged(); void ready(); void embeddedChanged(bool enabled); + void selectedIndexChanged(); private: friend class TabBoxHandlerPrivate;