Changeset View
Changeset View
Standalone View
Standalone View
src/mobile/KexiMobileToolbar.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | |||||
60 | 60 | | |||
61 | KexiMobileToolbar::~KexiMobileToolbar() | 61 | KexiMobileToolbar::~KexiMobileToolbar() | ||
62 | { | 62 | { | ||
63 | 63 | | |||
64 | } | 64 | } | ||
65 | 65 | | |||
66 | void KexiMobileToolbar::gotoNavigatorClicked() | 66 | void KexiMobileToolbar::gotoNavigatorClicked() | ||
67 | { | 67 | { | ||
68 | qDebug() << "Goto Navigator"; | 68 | //qDebug() << "Goto Navigator"; | ||
69 | emit(pageNavigator()); | 69 | emit(pageNavigator()); | ||
70 | } | 70 | } | ||
71 | 71 | | |||
72 | void KexiMobileToolbar::openFileClicked() | 72 | void KexiMobileToolbar::openFileClicked() | ||
73 | { | 73 | { | ||
74 | qDebug() << "Open File"; | 74 | //qDebug() << "Open File"; | ||
75 | emit(pageOpenFile()); | 75 | emit(pageOpenFile()); | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | void KexiMobileToolbar::recordNext() | 78 | void KexiMobileToolbar::recordNext() | ||
79 | { | 79 | { | ||
80 | if (m_recordHandler) { | 80 | if (m_recordHandler) { | ||
81 | m_recordHandler->moveToNextRecordRequested(); | 81 | m_recordHandler->moveToNextRecordRequested(); | ||
82 | updatePage(); | 82 | updatePage(); | ||
83 | } | 83 | } | ||
84 | } | 84 | } | ||
85 | 85 | | |||
86 | void KexiMobileToolbar::recordPrevious() | 86 | void KexiMobileToolbar::recordPrevious() | ||
87 | { | 87 | { | ||
88 | if (m_recordHandler) { | 88 | if (m_recordHandler) { | ||
89 | m_recordHandler->moveToPreviousRecordRequested(); | 89 | m_recordHandler->moveToPreviousRecordRequested(); | ||
90 | updatePage(); | 90 | updatePage(); | ||
91 | } | 91 | } | ||
92 | } | 92 | } | ||
93 | 93 | | |||
94 | void KexiMobileToolbar::setRecordHandler(KexiRecordNavigatorHandler* handler) | 94 | void KexiMobileToolbar::setRecordHandler(KexiRecordNavigatorHandler* handler) | ||
95 | { | 95 | { | ||
96 | qDebug() << handler; | 96 | //qDebug() << handler; | ||
97 | m_recordHandler = handler; | 97 | m_recordHandler = handler; | ||
98 | updatePage(); | 98 | updatePage(); | ||
99 | } | 99 | } | ||
100 | 100 | | |||
101 | void KexiMobileToolbar::updatePage() | 101 | void KexiMobileToolbar::updatePage() | ||
102 | { | 102 | { | ||
103 | if (m_recordHandler) { | 103 | if (m_recordHandler) { | ||
104 | m_recordNumber->setText(QString("%1 of %2").arg(m_recordHandler->currentRecord()).arg(m_recordHandler->recordCount())); | 104 | m_recordNumber->setText(QString("%1 of %2").arg(m_recordHandler->currentRecord()).arg(m_recordHandler->recordCount())); | ||
105 | } | 105 | } | ||
106 | } | 106 | } | ||
107 | 107 | |