┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-12-26 22:42:49 +0100
committerPeter Penz <[email protected]>2011-12-26 22:44:26 +0100
commit84033839269fe4cb8695ebc25b5634df97036650 (patch)
tree94eb195e45c1755261fb0961e4542330db53f3fe /src/kitemviews
parent2e2a6ae24c7c34fbed3f81b281f1ee19e95350f5 (diff)
Minor cleanup: Rename m_keyboardAnchorXPos to m_keyboardAnchorPos
Diffstat (limited to 'src/kitemviews')
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp18
-rw-r--r--src/kitemviews/kitemlistcontroller.h2
2 files changed, 10 insertions, 10 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index 0cf62f8e0..7798fc364 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -52,7 +52,7 @@ KItemListController::KItemListController(QObject* parent) :
m_autoActivationTimer(0),
m_oldSelection(),
m_keyboardAnchorIndex(-1),
- m_keyboardAnchorXPos(0)
+ m_keyboardAnchorPos(0)
{
connect(m_keyboardManager, SIGNAL(changeCurrentItem(QString,bool)),
this, SLOT(slotChangeCurrentItem(QString,bool)));
@@ -213,7 +213,7 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
if (index > 0) {
--index;
m_keyboardAnchorIndex = index;
- m_keyboardAnchorXPos = keyboardAnchorPos(index);
+ m_keyboardAnchorPos = keyboardAnchorPos(index);
}
break;
@@ -221,7 +221,7 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
if (index < itemCount - 1) {
++index;
m_keyboardAnchorIndex = index;
- m_keyboardAnchorXPos = keyboardAnchorPos(index);
+ m_keyboardAnchorPos = keyboardAnchorPos(index);
}
break;
@@ -951,11 +951,11 @@ void KItemListController::updateKeyboardAnchor()
{
const bool validAnchor = m_keyboardAnchorIndex >= 0 &&
m_keyboardAnchorIndex < m_model->count() &&
- keyboardAnchorPos(m_keyboardAnchorIndex) == m_keyboardAnchorXPos;
+ keyboardAnchorPos(m_keyboardAnchorIndex) == m_keyboardAnchorPos;
if (!validAnchor) {
const int index = m_selectionManager->currentItem();
m_keyboardAnchorIndex = index;
- m_keyboardAnchorXPos = keyboardAnchorPos(index);
+ m_keyboardAnchorPos = keyboardAnchorPos(index);
}
}
@@ -984,10 +984,10 @@ int KItemListController::nextRowIndex() const
// that is below the current index
int nextRowIndex = lastColumnIndex + 1;
int searchIndex = nextRowIndex;
- qreal minDiff = qAbs(m_keyboardAnchorXPos - keyboardAnchorPos(nextRowIndex));
+ qreal minDiff = qAbs(m_keyboardAnchorPos - keyboardAnchorPos(nextRowIndex));
while (searchIndex < maxIndex && keyboardAnchorPos(searchIndex + 1) > keyboardAnchorPos(searchIndex)) {
++searchIndex;
- const qreal searchDiff = qAbs(m_keyboardAnchorXPos - keyboardAnchorPos(searchIndex));
+ const qreal searchDiff = qAbs(m_keyboardAnchorPos - keyboardAnchorPos(searchIndex));
if (searchDiff < minDiff) {
minDiff = searchDiff;
nextRowIndex = searchIndex;
@@ -1017,10 +1017,10 @@ int KItemListController::previousRowIndex() const
// that is above the current index
int previousRowIndex = firstColumnIndex - 1;
int searchIndex = previousRowIndex;
- qreal minDiff = qAbs(m_keyboardAnchorXPos - keyboardAnchorPos(previousRowIndex));
+ qreal minDiff = qAbs(m_keyboardAnchorPos - keyboardAnchorPos(previousRowIndex));
while (searchIndex > 0 && keyboardAnchorPos(searchIndex - 1) < keyboardAnchorPos(searchIndex)) {
--searchIndex;
- const qreal searchDiff = qAbs(m_keyboardAnchorXPos - keyboardAnchorPos(searchIndex));
+ const qreal searchDiff = qAbs(m_keyboardAnchorPos - keyboardAnchorPos(searchIndex));
if (searchDiff < minDiff) {
minDiff = searchDiff;
previousRowIndex = searchIndex;
diff --git a/src/kitemviews/kitemlistcontroller.h b/src/kitemviews/kitemlistcontroller.h
index b2c7d65b2..b8de195eb 100644
--- a/src/kitemviews/kitemlistcontroller.h
+++ b/src/kitemviews/kitemlistcontroller.h
@@ -283,7 +283,7 @@ private:
* similar behavior like in a text editor:
*/
int m_keyboardAnchorIndex;
- qreal m_keyboardAnchorXPos;
+ qreal m_keyboardAnchorPos;
};
#endif