diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 04:10:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 04:10:07 +0000 |
commit | fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf (patch) | |
tree | 9eda848e56fcb862fdfdf479adeccd95b6fe387a /kxkb/layoutmap.cpp | |
parent | 02f67d0e1355b79b1806746efb0f2f640e57f13d (diff) | |
download | tdebase-fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf.tar.gz tdebase-fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf.zip |
Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1212480 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kxkb/layoutmap.cpp')
-rw-r--r-- | kxkb/layoutmap.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kxkb/layoutmap.cpp b/kxkb/layoutmap.cpp index 93641d850..9c13fc49b 100644 --- a/kxkb/layoutmap.cpp +++ b/kxkb/layoutmap.cpp @@ -1,5 +1,5 @@ // -// C++ Implementation: tqlayoutmap +// C++ Implementation: layoutmap // // Description: // @@ -69,13 +69,13 @@ TQPtrQueue<LayoutState>& LayoutMap::getCurrentLayoutQueueInternal(WId winId) //LayoutQueue& TQPtrQueue<LayoutState>& LayoutMap::getCurrentLayoutQueue(WId winId) { - TQPtrQueue<LayoutState>& tqlayoutQueue = getCurrentLayoutQueueInternal(winId); - if( tqlayoutQueue.count() == 0 ) { - initLayoutQueue(tqlayoutQueue); - kdDebug() << "map: Created queue for " << winId << " size: " << tqlayoutQueue.count() << endl; + TQPtrQueue<LayoutState>& layoutQueue = getCurrentLayoutQueueInternal(winId); + if( layoutQueue.count() == 0 ) { + initLayoutQueue(layoutQueue); + kdDebug() << "map: Created queue for " << winId << " size: " << layoutQueue.count() << endl; } - return tqlayoutQueue; + return layoutQueue; } LayoutState& LayoutMap::getCurrentLayout() { @@ -83,50 +83,50 @@ LayoutState& LayoutMap::getCurrentLayout() { } LayoutState& LayoutMap::getNextLayout() { - LayoutQueue& tqlayoutQueue = getCurrentLayoutQueue(m_currentWinId); - LayoutState* tqlayoutState = tqlayoutQueue.dequeue(); - tqlayoutQueue.enqueue(tqlayoutState); + LayoutQueue& layoutQueue = getCurrentLayoutQueue(m_currentWinId); + LayoutState* layoutState = layoutQueue.dequeue(); + layoutQueue.enqueue(layoutState); - kdDebug() << "map: Next tqlayout: " << tqlayoutQueue.head()->tqlayoutUnit.toPair() - << " group: " << tqlayoutQueue.head()->tqlayoutUnit.defaultGroup << " for " << m_currentWinId << endl; + kdDebug() << "map: Next layout: " << layoutQueue.head()->layoutUnit.toPair() + << " group: " << layoutQueue.head()->layoutUnit.defaultGroup << " for " << m_currentWinId << endl; - return *tqlayoutQueue.head(); + return *layoutQueue.head(); } void LayoutMap::setCurrentGroup(int group) { getCurrentLayout().group = group; } -void LayoutMap::setCurrentLayout(const LayoutUnit& tqlayoutUnit) { - LayoutQueue& tqlayoutQueue = getCurrentLayoutQueue(m_currentWinId); - kdDebug() << "map: Storing tqlayout: " << tqlayoutUnit.toPair() - << " group: " << tqlayoutUnit.defaultGroup << " for " << m_currentWinId << endl; +void LayoutMap::setCurrentLayout(const LayoutUnit& layoutUnit) { + LayoutQueue& layoutQueue = getCurrentLayoutQueue(m_currentWinId); + kdDebug() << "map: Storing layout: " << layoutUnit.toPair() + << " group: " << layoutUnit.defaultGroup << " for " << m_currentWinId << endl; - int queueSize = (int)tqlayoutQueue.count(); + int queueSize = (int)layoutQueue.count(); for(int ii=0; ii<queueSize; ii++) { - if( tqlayoutQueue.head()->tqlayoutUnit == tqlayoutUnit ) + if( layoutQueue.head()->layoutUnit == layoutUnit ) return; // if present return when it's in head - LayoutState* tqlayoutState = tqlayoutQueue.dequeue(); + LayoutState* layoutState = layoutQueue.dequeue(); if( ii < queueSize - 1 ) { - tqlayoutQueue.enqueue(tqlayoutState); + layoutQueue.enqueue(layoutState); } else { - delete tqlayoutState; - tqlayoutQueue.enqueue(new LayoutState(tqlayoutUnit)); + delete layoutState; + layoutQueue.enqueue(new LayoutState(layoutUnit)); } } for(int ii=0; ii<queueSize - 1; ii++) { - LayoutState* tqlayoutState = tqlayoutQueue.dequeue(); - tqlayoutQueue.enqueue(tqlayoutState); + LayoutState* layoutState = layoutQueue.dequeue(); + layoutQueue.enqueue(layoutState); } } // private -void LayoutMap::initLayoutQueue(LayoutQueue& tqlayoutQueue) { +void LayoutMap::initLayoutQueue(LayoutQueue& layoutQueue) { int queueSize = ( m_kxkbConfig.m_stickySwitching ) - ? m_kxkbConfig.m_stickySwitchingDepth : m_kxkbConfig.m_tqlayouts.count(); + ? m_kxkbConfig.m_stickySwitchingDepth : m_kxkbConfig.m_layouts.count(); for(int ii=0; ii<queueSize; ii++) { - tqlayoutQueue.enqueue( new LayoutState(m_kxkbConfig.m_tqlayouts[ii]) ); + layoutQueue.enqueue( new LayoutState(m_kxkbConfig.m_layouts[ii]) ); } } |