summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainview.cpp10
-rw-r--r--src/mainview.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index c67d70a6..3b5db52e 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -70,6 +70,7 @@ MainView::MainView(QWidget *parent)
connect(m_tabBar, SIGNAL(closeOtherTabs(int)), this, SLOT(slotCloseOtherTabs(int)));
connect(m_tabBar, SIGNAL(reloadTab(int)), this, SLOT(slotReloadTab(int)));
connect(m_tabBar, SIGNAL(reloadAllTabs()), this, SLOT(slotReloadAllTabs()));
+ connect(m_tabBar, SIGNAL(tabMoved(int,int)), this, SLOT(moveTab(int,int)));
// Recently Closed Tab Action
m_recentlyClosedTabsMenu = new KMenu(this);
@@ -665,3 +666,12 @@ void MainView::previousTab()
next = count() - 1;
setCurrentIndex(next);
}
+
+
+void MainView::moveTab(int fromIndex, int toIndex)
+{
+ QWidget *lineEdit = m_lineEdits->widget(fromIndex);
+ m_lineEdits->removeWidget(lineEdit);
+ m_lineEdits->insertWidget(toIndex, lineEdit);
+}
+
diff --git a/src/mainview.h b/src/mainview.h
index 9085aa46..617d81db 100644
--- a/src/mainview.h
+++ b/src/mainview.h
@@ -132,6 +132,8 @@ private slots:
private:
+ void moveTab(int fromIndex, int toIndex);
+
KAction *m_recentlyClosedTabsAction;
KMenu *m_recentlyClosedTabsMenu;