[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/konqueror
From: Stephan Binner <binner () kde ! org>
Date: 2003-05-26 16:06:53
[Download RAW message or body]
CVS commit by binner:
Enabled mouse tab reordering.
M +12 -13 konq_tabs.cc 1.4
M +2 -1 konq_tabs.h 1.3
--- kdebase/konqueror/konq_tabs.cc #1.3:1.4
@@ -85,4 +85,7 @@ KonqFrameTabs::KonqFrameTabs(QWidget* pa
}
#endif
+
+ setTabReorderingEnabled( true );
+ connect( this, SIGNAL( movedTab( const int, const int ) ), SLOT( slotMovedTab( \
const int, const int ) ) ); }
@@ -232,11 +235,5 @@ void KonqFrameTabs::moveTabLeft(int inde
if ( index == 0 )
return;
- KonqFrameBase* currentFrame = m_pChildFrameList->at(index );
- kdDebug()<<" currentFrame :"<<currentFrame<<" index :"<<index<<endl;
- removePage(currentFrame->widget());
- m_pChildFrameList->remove(currentFrame);
-
- insertChildFrame( currentFrame, index-1 );
- setCurrentPage( index-1 );
+ moveTab( index, index-1 );
}
@@ -245,11 +242,13 @@ void KonqFrameTabs::moveTabRight(int ind
if ( index == count()-1 )
return;
- KonqFrameBase* currentFrame = m_pChildFrameList->at(index );
- kdDebug()<<" currentFrame :"<<currentFrame<<" index :"<<index<<endl;
- removePage(currentFrame->widget());
- m_pChildFrameList->remove(currentFrame);
+ moveTab( index, index+1 );
+}
- insertChildFrame( currentFrame, index+1 );
- setCurrentPage( index+1 );
+void KonqFrameTabs::slotMovedTab(const int from, const int to)
+{
+ KonqFrameBase* currentFrame = m_pChildFrameList->at( from );
+ kdDebug()<<" currentFrame: "<<currentFrame<<" index: "<<from<<endl;
+ m_pChildFrameList->remove( currentFrame );
+ m_pChildFrameList->insert( to, currentFrame );
}
--- kdebase/konqueror/konq_tabs.h #1.2:1.3
@@ -97,4 +97,5 @@ private slots:
void slotContextMenu( QWidget*, const QPoint& );
void slotCloseRequest( QWidget* );
+ void slotMovedTab( const int, const int );
private:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic