Skip to content

Commit

Permalink
focusControl => FocusControl
Browse files Browse the repository at this point in the history
  • Loading branch information
CyAn84 committed Dec 30, 2024
1 parent 5e492e8 commit 25a24bf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions client/ui/controllers/focusController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ void FocusController::reload(Direction direction)
return;
}

m_focusChain.append(focusControl::getSubChain(rootObject));
m_focusChain.append(FocusControl::getSubChain(rootObject));

std::sort(m_focusChain.begin(), m_focusChain.end(),
direction == Direction::Forward ? focusControl::isLess : focusControl::isMore);
direction == Direction::Forward ? FocusControl::isLess : FocusControl::isMore);

if (m_focusChain.empty()) {
qWarning() << "Focus chain is empty!";
Expand All @@ -125,7 +125,7 @@ void FocusController::nextItem(Direction direction)
{
reload(direction);

if (m_lvfc && focusControl::isListView(m_focusedItem)) {
if (m_lvfc && FocusControl::isListView(m_focusedItem)) {
direction == Direction::Forward ? focusNextListViewItem() : focusPreviousListViewItem();

return;
Expand Down Expand Up @@ -155,7 +155,7 @@ void FocusController::nextItem(Direction direction)
return;
}

if (focusControl::isListView(focusedItem)) {
if (FocusControl::isListView(focusedItem)) {
m_lvfc = new ListViewFocusController(focusedItem, this);
m_focusedItem = focusedItem;
if (direction == Direction::Forward) {
Expand Down
6 changes: 3 additions & 3 deletions client/ui/controllers/listViewFocusController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void ListViewFocusController::resetFocusChain()

void ListViewFocusController::reloadFocusChain()
{
m_focusChain = focusControl::getItemsChain(currentDelegate());
m_focusChain = FocusControl::getItemsChain(currentDelegate());
}

bool ListViewFocusController::isFirstFocusItemInDelegate() const
Expand All @@ -257,12 +257,12 @@ bool ListViewFocusController::isLastFocusItemInDelegate() const

bool ListViewFocusController::hasHeader() const
{
return m_header && !focusControl::getItemsChain(m_header).isEmpty();
return m_header && !FocusControl::getItemsChain(m_header).isEmpty();
}

bool ListViewFocusController::hasFooter() const
{
return m_footer && !focusControl::getItemsChain(m_footer).isEmpty();
return m_footer && !FocusControl::getItemsChain(m_footer).isEmpty();
}

bool ListViewFocusController::isFirstFocusItemInListView() const
Expand Down
4 changes: 2 additions & 2 deletions client/utils/qmlUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <QQuickItem>
#include <QQuickWindow>

namespace focusControl
namespace FocusControl
{
QPointF getItemCenterPointOnScene(QQuickItem *item)
{
Expand Down Expand Up @@ -125,4 +125,4 @@ namespace focusControl
qDebug() << prefix << " Item: " << i << " with coords: " << coords;
}
}
} // namespace focusControl
} // namespace FocusControl
6 changes: 3 additions & 3 deletions client/utils/qmlUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <QList>
#include <QObject>

namespace focusControl
namespace FocusControl
{
bool isEnabled(QObject *item);
bool isVisible(QObject *item);
Expand All @@ -25,6 +25,6 @@ namespace focusControl
QList<QObject *> getItemsChain(QObject *object);

void printItems(const QList<QObject *> &items, QObject *current_item);
}
} // namespace FocusControl

#endif // FOCUSCONTROL_H
#endif // FOCUSCONTROL_H

0 comments on commit 25a24bf

Please sign in to comment.