diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 20:16:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 20:16:47 +0000 |
commit | 495d08bc2db58ee7fc4ea55a7158f2f61b82fc56 (patch) | |
tree | daabcb652c07b9a17cad88ca50b63a2d91ead4a3 /kxkb/layoutmap.cpp | |
parent | 50001f1757f97510e80cb1990e2f2d5b00144c2a (diff) | |
download | tdebase-495d08bc2db58ee7fc4ea55a7158f2f61b82fc56.tar.gz tdebase-495d08bc2db58ee7fc4ea55a7158f2f61b82fc56.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1211357 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 9c13fc49b..93641d850 100644 --- a/kxkb/layoutmap.cpp +++ b/kxkb/layoutmap.cpp @@ -1,5 +1,5 @@ // -// C++ Implementation: layoutmap +// C++ Implementation: tqlayoutmap // // Description: // @@ -69,13 +69,13 @@ TQPtrQueue<LayoutState>& LayoutMap::getCurrentLayoutQueueInternal(WId winId) //LayoutQueue& TQPtrQueue<LayoutState>& LayoutMap::getCurrentLayoutQueue(WId winId) { - TQPtrQueue<LayoutState>& layoutQueue = getCurrentLayoutQueueInternal(winId); - if( layoutQueue.count() == 0 ) { - initLayoutQueue(layoutQueue); - kdDebug() << "map: Created queue for " << winId << " size: " << layoutQueue.count() << endl; + TQPtrQueue<LayoutState>& tqlayoutQueue = getCurrentLayoutQueueInternal(winId); + if( tqlayoutQueue.count() == 0 ) { + initLayoutQueue(tqlayoutQueue); + kdDebug() << "map: Created queue for " << winId << " size: " << tqlayoutQueue.count() << endl; } - return layoutQueue; + return tqlayoutQueue; } LayoutState& LayoutMap::getCurrentLayout() { @@ -83,50 +83,50 @@ LayoutState& LayoutMap::getCurrentLayout() { } LayoutState& LayoutMap::getNextLayout() { - LayoutQueue& layoutQueue = getCurrentLayoutQueue(m_currentWinId); - LayoutState* layoutState = layoutQueue.dequeue(); - layoutQueue.enqueue(layoutState); + LayoutQueue& tqlayoutQueue = getCurrentLayoutQueue(m_currentWinId); + LayoutState* tqlayoutState = tqlayoutQueue.dequeue(); + tqlayoutQueue.enqueue(tqlayoutState); - kdDebug() << "map: Next layout: " << layoutQueue.head()->layoutUnit.toPair() - << " group: " << layoutQueue.head()->layoutUnit.defaultGroup << " for " << m_currentWinId << endl; + kdDebug() << "map: Next tqlayout: " << tqlayoutQueue.head()->tqlayoutUnit.toPair() + << " group: " << tqlayoutQueue.head()->tqlayoutUnit.defaultGroup << " for " << m_currentWinId << endl; - return *layoutQueue.head(); + return *tqlayoutQueue.head(); } void LayoutMap::setCurrentGroup(int group) { getCurrentLayout().group = group; } -void LayoutMap::setCurrentLayout(const LayoutUnit& layoutUnit) { - LayoutQueue& layoutQueue = getCurrentLayoutQueue(m_currentWinId); - kdDebug() << "map: Storing layout: " << layoutUnit.toPair() - << " group: " << layoutUnit.defaultGroup << " for " << m_currentWinId << endl; +void LayoutMap::setCurrentLayout(const LayoutUnit& tqlayoutUnit) { + LayoutQueue& tqlayoutQueue = getCurrentLayoutQueue(m_currentWinId); + kdDebug() << "map: Storing tqlayout: " << tqlayoutUnit.toPair() + << " group: " << tqlayoutUnit.defaultGroup << " for " << m_currentWinId << endl; - int queueSize = (int)layoutQueue.count(); + int queueSize = (int)tqlayoutQueue.count(); for(int ii=0; ii<queueSize; ii++) { - if( layoutQueue.head()->layoutUnit == layoutUnit ) + if( tqlayoutQueue.head()->tqlayoutUnit == tqlayoutUnit ) return; // if present return when it's in head - LayoutState* layoutState = layoutQueue.dequeue(); + LayoutState* tqlayoutState = tqlayoutQueue.dequeue(); if( ii < queueSize - 1 ) { - layoutQueue.enqueue(layoutState); + tqlayoutQueue.enqueue(tqlayoutState); } else { - delete layoutState; - layoutQueue.enqueue(new LayoutState(layoutUnit)); + delete tqlayoutState; + tqlayoutQueue.enqueue(new LayoutState(tqlayoutUnit)); } } for(int ii=0; ii<queueSize - 1; ii++) { - LayoutState* layoutState = layoutQueue.dequeue(); - layoutQueue.enqueue(layoutState); + LayoutState* tqlayoutState = tqlayoutQueue.dequeue(); + tqlayoutQueue.enqueue(tqlayoutState); } } // private -void LayoutMap::initLayoutQueue(LayoutQueue& layoutQueue) { +void LayoutMap::initLayoutQueue(LayoutQueue& tqlayoutQueue) { int queueSize = ( m_kxkbConfig.m_stickySwitching ) - ? m_kxkbConfig.m_stickySwitchingDepth : m_kxkbConfig.m_layouts.count(); + ? m_kxkbConfig.m_stickySwitchingDepth : m_kxkbConfig.m_tqlayouts.count(); for(int ii=0; ii<queueSize; ii++) { - layoutQueue.enqueue( new LayoutState(m_kxkbConfig.m_layouts[ii]) ); + tqlayoutQueue.enqueue( new LayoutState(m_kxkbConfig.m_tqlayouts[ii]) ); } } |