kexi
KexiRecordNavigator Class Reference
#include <kexirecordnavigator.h>
Detailed Description
KexiRecordNavigator class provides a record navigator.Record navigator is usually used for data tables (e.g. KexiTableView) or data-aware forms.
You can plug KexiRecordNavigator object to your data-aware object in two ways: 1) By connectiong to slots prevButtonClicked(), etc. 2) A bit cleaner way: by inheriting from KexiRecordNavigatorHandler interface in your data-aware class and implementing all it's prototype methods like moveToRecordRequested(), and then caling setRecordHandler() on navigator's object. Note that using this way, you can allow to exist more than one navigator widget connected with your data-aware object (don't matter if this is sane).
Definition at line 65 of file kexirecordnavigator.h.
Public Slots | |
void | setInsertingEnabled (bool set) |
void | setInsertingButtonVisible (bool set) |
void | setEditingIndicatorEnabled (bool set) |
void | showEditingIndicator (bool show) |
virtual void | setEnabled (bool set) |
void | setCurrentRecordNumber (uint r) |
void | setRecordCount (uint count) |
void | updateGeometry (int leftMargin) |
void | setLabelText (const QString &text) |
Signals | |
void | prevButtonClicked () |
void | nextButtonClicked () |
void | lastButtonClicked () |
void | firstButtonClicked () |
void | newButtonClicked () |
void | recordNumberEntered (uint r) |
Public Member Functions | |
KexiRecordNavigator (QWidget *parent, int leftMargin=0, const char *name=0) | |
virtual | ~KexiRecordNavigator () |
void | setParentView (QScrollView *view) |
void | setRecordHandler (KexiRecordNavigatorHandler *handler) |
bool | isInsertingEnabled () const |
uint | currentRecordNumber () const |
uint | recordCount () const |
void | setHBarGeometry (QScrollBar &hbar, int x, int y, int w, int h) |
virtual bool | eventFilter (QObject *o, QEvent *e) |
bool | editingIndicatorVisible () const |
bool | editingIndicatorEnabled () const |
Protected Slots | |
void | slotPrevButtonClicked () |
void | slotNextButtonClicked () |
void | slotLastButtonClicked () |
void | slotFirstButtonClicked () |
void | slotNewButtonClicked () |
Protected Member Functions | |
void | updateButtons (uint recCnt) |
Protected Attributes | |
QLabel * | m_textLabel |
QToolButton * | m_navBtnFirst |
QToolButton * | m_navBtnPrev |
QToolButton * | m_navBtnNext |
QToolButton * | m_navBtnLast |
QToolButton * | m_navBtnNew |
KLineEdit * | m_navRecordNumber |
QIntValidator * | m_navRecordNumberValidator |
KLineEdit * | m_navRecordCount |
uint | m_nav1DigitWidth |
QScrollView * | m_view |
bool | m_isInsertingEnabled: 1 |
KexiRecordNavigatorPrivate * | d |
Classes | |
class | Actions |
A set of GUI items usable for displaying related actions. More... |
Member Function Documentation
void KexiRecordNavigator::setRecordHandler | ( | KexiRecordNavigatorHandler * | handler | ) |
Sets record navigator handler. This allows to react on actions performed within navigator and vice versa.
Definition at line 411 of file kexirecordnavigator.cpp.
bool KexiRecordNavigator::isInsertingEnabled | ( | ) | const [inline] |
- Returns:
- true if data inserting is enabled (the default).
Definition at line 80 of file kexirecordnavigator.h.
uint KexiRecordNavigator::currentRecordNumber | ( | ) | const |
- Returns:
- current record number displayed for this navigator. can return 0, if the 'text box's content is cleared.
Definition at line 311 of file kexirecordnavigator.cpp.
uint KexiRecordNavigator::recordCount | ( | ) | const |
- Returns:
- record count displayed for this navigator.
Definition at line 320 of file kexirecordnavigator.cpp.
void KexiRecordNavigator::setHBarGeometry | ( | QScrollBar & | hbar, | |
int | x, | |||
int | y, | |||
int | w, | |||
int | h | |||
) |
Sets horizontal bar's hbar (at the bottom) geometry so this record navigator is properly positioned together with horizontal scroll bar. This method is used in QScrollView::setHBarGeometry() implementations: see KexiTableView::setHBarGeometry() and KexiFormScrollView::setHBarGeometry() for usage examples.
Definition at line 357 of file kexirecordnavigator.cpp.
bool KexiRecordNavigator::editingIndicatorVisible | ( | ) | const |
- Returns:
- true if "editing" indicator is visible for this navigator.
- See also:
- showEditingIndicator()
Definition at line 416 of file kexirecordnavigator.cpp.
bool KexiRecordNavigator::editingIndicatorEnabled | ( | ) | const |
- Returns:
- true if "editing" indicator is enabled for this navigator. Only meaningful if setEditingIndicatorEnabled(true) is called.
Definition at line 421 of file kexirecordnavigator.cpp.
void KexiRecordNavigator::setInsertingEnabled | ( | bool | set | ) | [slot] |
Sets insertingEnabled flag. If true, "+" button will be enabled.
Definition at line 177 of file kexirecordnavigator.cpp.
void KexiRecordNavigator::setInsertingButtonVisible | ( | bool | set | ) | [slot] |
Sets visibility of "inserting" button.
Definition at line 367 of file kexirecordnavigator.cpp.
void KexiRecordNavigator::setEditingIndicatorEnabled | ( | bool | set | ) | [slot] |
Sets visibility of the place where "editing" indicator will be displayed. "editing" indicator will display KexiRecordMarker::penImage() image when setEditingIndicatorVisible() is called. This method is currently used e.g. within standard kexi forms (see KexiFormScrollView class).
Definition at line 426 of file kexirecordnavigator.cpp.
void KexiRecordNavigator::showEditingIndicator | ( | bool | show | ) | [slot] |
Shows or hides "editing" indicator.
Definition at line 447 of file kexirecordnavigator.cpp.
void KexiRecordNavigator::setCurrentRecordNumber | ( | uint | r | ) | [slot] |
Sets current record number for this navigator, i.e. a value that will be displayed in the 'record number' text box. This can also affect button's enabling and disabling. If r
is 0, 'record number' text box's content is cleared.
Definition at line 251 of file kexirecordnavigator.cpp.
void KexiRecordNavigator::setRecordCount | ( | uint | count | ) | [slot] |
Sets record count for this navigator. This can also affect button's enabling and disabling. By default count is 0.
Definition at line 284 of file kexirecordnavigator.cpp.
void KexiRecordNavigator::setLabelText | ( | const QString & | text | ) | [slot] |
Sets label text at the left of the for record navigator's button. By default this label contains translated "Row:" text.
Definition at line 362 of file kexirecordnavigator.cpp.
Member Data Documentation
KLineEdit* KexiRecordNavigator::m_navRecordCount [protected] |
The documentation for this class was generated from the following files: