focusControl => FocusControl
This commit is contained in:
parent
5e492e8392
commit
25a24bf38c
4 changed files with 12 additions and 12 deletions
|
|
@ -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!";
|
||||
|
|
@ -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;
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ void ListViewFocusController::resetFocusChain()
|
|||
|
||||
void ListViewFocusController::reloadFocusChain()
|
||||
{
|
||||
m_focusChain = focusControl::getItemsChain(currentDelegate());
|
||||
m_focusChain = FocusControl::getItemsChain(currentDelegate());
|
||||
}
|
||||
|
||||
bool ListViewFocusController::isFirstFocusItemInDelegate() const
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include <QQuickItem>
|
||||
#include <QQuickWindow>
|
||||
|
||||
namespace focusControl
|
||||
namespace FocusControl
|
||||
{
|
||||
QPointF getItemCenterPointOnScene(QQuickItem *item)
|
||||
{
|
||||
|
|
@ -125,4 +125,4 @@ namespace focusControl
|
|||
qDebug() << prefix << " Item: " << i << " with coords: " << coords;
|
||||
}
|
||||
}
|
||||
} // namespace focusControl
|
||||
} // namespace FocusControl
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
#include <QList>
|
||||
#include <QObject>
|
||||
|
||||
namespace focusControl
|
||||
namespace FocusControl
|
||||
{
|
||||
bool isEnabled(QObject *item);
|
||||
bool isVisible(QObject *item);
|
||||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue