summaryrefslogtreecommitdiffstats
path: root/kxkb/layoutmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kxkb/layoutmap.cpp')
-rw-r--r--kxkb/layoutmap.cpp54
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]) );
}
}