Kexi API Documentation (2.0 alpha)

KexiDataAwareView Class Reference

#include <kexidataawareview.h>

Inheritance diagram for KexiDataAwareView:

KexiViewBase QWidget KexiActionProxy KexiDataTable KexiFormView KexiQueryView KexiTableDesigner_DataView KexiTableDesignerView List of all members.

Detailed Description

Provides a view displaying record-based data.

The KexiDataAwareView is used to implement differently-looking views for displaying record-based data in a consistent way:

Action implementations like data editing and deleting are shared for different view types to keep even better consistency.

Definition at line 38 of file kexidataawareview.h.

Public Slots

void deleteAllRows ()
void deleteCurrentRow ()
void deleteAndStartEditCurrentCell ()
void startEditOrToggleValue ()
bool acceptRowEdit ()
void cancelRowEdit ()
void sortAscending ()
void sortDescending ()
void copySelection ()
void cutSelection ()
void paste ()
void slotGoToFirstRow ()
void slotGoToPreviusRow ()
void slotGoToNextRow ()
void slotGoToLastRow ()
void slotGoToNewRow ()

Public Member Functions

 KexiDataAwareView (KexiMainWindow *mainWin, QWidget *parent, const char *name=0)
QWidgetmainWidget ()
virtual QSize minimumSizeHint () const
virtual QSize sizeHint () const
KexiDataAwareObjectInterfacedataAwareObject () const

Protected Slots

void slotCellSelected (int col, int row)
void reloadActions ()
void slotUpdateRowActions (int row)
void slotClosing (bool &cancel)

Protected Member Functions

void init (QWidget *viewWidget, KexiSharedActionClient *actionClient, KexiDataAwareObjectInterface *dataAwareObject, bool noDataAware=false)
void initActions ()
virtual void updateActions (bool activated)

Protected Attributes

QWidgetm_internalView
KexiSharedActionClientm_actionClient
KexiDataAwareObjectInterfacem_dataAwareObject


Constructor & Destructor Documentation

KexiDataAwareView::KexiDataAwareView KexiMainWindow mainWin,
QWidget parent,
const char *  name = 0
 

Definition at line 29 of file kexidataawareview.cpp.


Member Function Documentation

bool KexiDataAwareView::acceptRowEdit  )  [slot]
 

Definition at line 233 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::acceptRowEdit(), and m_dataAwareObject.

Referenced by KexiTableDesigner_DataView::beforeSwitchTo(), initActions(), and slotClosing().

void KexiDataAwareView::cancelRowEdit  )  [slot]
 

Definition at line 244 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::cancelRowEdit(), and m_dataAwareObject.

Referenced by initActions().

void KexiDataAwareView::copySelection  )  [slot]
 

Definition at line 259 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::copySelection(), and m_dataAwareObject.

Referenced by initActions().

void KexiDataAwareView::cutSelection  )  [slot]
 

Definition at line 264 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::cutSelection(), and m_dataAwareObject.

Referenced by initActions().

KexiDataAwareObjectInterface* KexiDataAwareView::dataAwareObject  )  const [inline]
 

Definition at line 49 of file kexidataawareview.h.

Referenced by KexiMacro::NavigateAction::activate().

void KexiDataAwareView::deleteAllRows  )  [slot]
 

Definition at line 213 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::deleteAllRows(), and m_dataAwareObject.

Referenced by reloadActions().

void KexiDataAwareView::deleteAndStartEditCurrentCell  )  [slot]
 

Definition at line 223 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::deleteAndStartEditCurrentCell(), and m_dataAwareObject.

Referenced by initActions().

void KexiDataAwareView::deleteCurrentRow  )  [slot]
 

Definition at line 218 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::deleteCurrentRow(), and m_dataAwareObject.

Referenced by initActions().

void KexiDataAwareView::init QWidget viewWidget,
KexiSharedActionClient actionClient,
KexiDataAwareObjectInterface dataAwareObject,
bool  noDataAware = false
[protected]
 

before closing - we'are accepting editing

updating actions on start/stop editing

Definition at line 37 of file kexidataawareview.cpp.

References KexiViewBase::closing(), KexiDataAwareObjectInterface::connectCellSelectedSignal(), KexiDataAwareObjectInterface::connectReloadActionsSignal(), KexiDataAwareObjectInterface::connectRowEditStartedSignal(), KexiDataAwareObjectInterface::connectRowEditTerminatedSignal(), initActions(), m_actionClient, m_dataAwareObject, m_internalView, KexiViewBase::preferredSizeHint(), reloadActions(), KexiViewBase::setViewWidget(), slotCellSelected(), slotClosing(), and slotUpdateRowActions().

Referenced by KexiDataTable::KexiDataTable(), and KexiFormView::KexiFormView().

void KexiDataAwareView::initActions  )  [protected]
 

Todo:
plugSharedAction("data_filter", this, SLOT(???()));
Todo:
update availability

Definition at line 71 of file kexidataawareview.cpp.

References acceptRowEdit(), cancelRowEdit(), copySelection(), cutSelection(), deleteAndStartEditCurrentCell(), deleteCurrentRow(), KexiDataAwareObjectInterface::isSortingEnabled(), m_actionClient, m_dataAwareObject, paste(), KexiSharedActionClient::plugSharedAction(), KexiActionProxy::plugSharedAction(), KexiViewBase::setAvailable(), KexiViewBase::sharedAction(), slotGoToFirstRow(), slotGoToLastRow(), slotGoToNewRow(), slotGoToNextRow(), slotGoToPreviusRow(), sortAscending(), sortDescending(), and startEditOrToggleValue().

Referenced by init().

QWidget * KexiDataAwareView::mainWidget  ) 
 

Definition at line 142 of file kexidataawareview.cpp.

References m_internalView.

Referenced by KexiTableDesignerView::KexiTableDesignerView(), and KexiDataTable::setData().

QSize KexiDataAwareView::minimumSizeHint  )  const [virtual]
 

Definition at line 147 of file kexidataawareview.cpp.

References m_internalView.

void KexiDataAwareView::paste  )  [slot]
 

Definition at line 269 of file kexidataawareview.cpp.

References m_dataAwareObject, and KexiDataAwareObjectInterface::paste().

Referenced by initActions().

void KexiDataAwareView::reloadActions  )  [protected, slot]
 

Definition at line 164 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::contextMenu(), KexiDataAwareObjectInterface::currentColumn(), KexiDataAwareObjectInterface::currentRow(), deleteAllRows(), KexiDataAwareObjectInterface::isDeleteEnabled(), KexiDataAwareObjectInterface::isEmptyRowInsertingEnabled(), KexiDataAwareObjectInterface::isSortingEnabled(), m_dataAwareObject, m_internalView, KexiActionProxy::plugSharedAction(), KexiViewBase::setAvailable(), slotCellSelected(), and KexiActionProxy::unplugSharedAction().

Referenced by init().

QSize KexiDataAwareView::sizeHint  )  const [virtual]
 

Definition at line 152 of file kexidataawareview.cpp.

References m_internalView.

void KexiDataAwareView::slotCellSelected int  col,
int  row
[protected, slot]
 

Definition at line 208 of file kexidataawareview.cpp.

References slotUpdateRowActions().

Referenced by init(), and reloadActions().

void KexiDataAwareView::slotClosing bool &  cancel  )  [protected, slot]
 

Definition at line 238 of file kexidataawareview.cpp.

References acceptRowEdit().

Referenced by init().

void KexiDataAwareView::slotGoToFirstRow  )  [slot]
 

Definition at line 274 of file kexidataawareview.cpp.

References m_dataAwareObject, and KexiDataAwareObjectInterface::selectFirstRow().

Referenced by initActions().

void KexiDataAwareView::slotGoToLastRow  )  [slot]
 

Definition at line 277 of file kexidataawareview.cpp.

References m_dataAwareObject, and KexiDataAwareObjectInterface::selectLastRow().

Referenced by initActions().

void KexiDataAwareView::slotGoToNewRow  )  [slot]
 

Definition at line 278 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::addNewRecordRequested(), and m_dataAwareObject.

Referenced by initActions().

void KexiDataAwareView::slotGoToNextRow  )  [slot]
 

Definition at line 276 of file kexidataawareview.cpp.

References m_dataAwareObject, and KexiDataAwareObjectInterface::selectNextRow().

Referenced by initActions().

void KexiDataAwareView::slotGoToPreviusRow  )  [slot]
 

Definition at line 275 of file kexidataawareview.cpp.

References m_dataAwareObject, and KexiDataAwareObjectInterface::selectPrevRow().

Referenced by initActions().

void KexiDataAwareView::slotUpdateRowActions int  row  )  [protected, slot]
 

Reimplemented in KexiTableDesignerView.

Definition at line 122 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::isDeleteEnabled(), KexiDataAwareObjectInterface::isEmptyRowInsertingEnabled(), KexiDataAwareObjectInterface::isReadOnly(), KexiDataAwareObjectInterface::isSortingEnabled(), m_dataAwareObject, KexiDataAwareObjectInterface::rowEditing(), KexiDataAwareObjectInterface::rows(), and KexiViewBase::setAvailable().

Referenced by init(), slotCellSelected(), and KexiTableDesignerView::slotUpdateRowActions().

void KexiDataAwareView::sortAscending  )  [slot]
 

Definition at line 249 of file kexidataawareview.cpp.

References m_dataAwareObject, and KexiDataAwareObjectInterface::sortAscending().

Referenced by initActions().

void KexiDataAwareView::sortDescending  )  [slot]
 

Definition at line 254 of file kexidataawareview.cpp.

References m_dataAwareObject, and KexiDataAwareObjectInterface::sortDescending().

Referenced by initActions().

void KexiDataAwareView::startEditOrToggleValue  )  [slot]
 

Definition at line 228 of file kexidataawareview.cpp.

References m_dataAwareObject, and KexiDataAwareObjectInterface::startEditOrToggleValue().

Referenced by initActions().

void KexiDataAwareView::updateActions bool  activated  )  [protected, virtual]
 

Updates actions (e.g. availability). Reimplement it, if needed (you must call superclass impelmentation at the end!). This implementation does nothing for this view but calls updateActions() for every child-view of this view. called by KexiDialogBase on dialog's activation (activated is true) or deactivation.

Reimplemented from KexiViewBase.

Reimplemented in KexiTableDesignerView.

Definition at line 157 of file kexidataawareview.cpp.

References KexiDataAwareObjectInterface::isSortingEnabled(), m_dataAwareObject, KexiViewBase::setAvailable(), and KexiViewBase::updateActions().


Member Data Documentation

KexiSharedActionClient* KexiDataAwareView::m_actionClient [protected]
 

Definition at line 87 of file kexidataawareview.h.

Referenced by init(), and initActions().

KexiDataAwareObjectInterface* KexiDataAwareView::m_dataAwareObject [protected]
 

Definition at line 88 of file kexidataawareview.h.

Referenced by acceptRowEdit(), cancelRowEdit(), copySelection(), cutSelection(), deleteAllRows(), deleteAndStartEditCurrentCell(), deleteCurrentRow(), init(), initActions(), paste(), reloadActions(), slotGoToFirstRow(), slotGoToLastRow(), slotGoToNewRow(), slotGoToNextRow(), slotGoToPreviusRow(), slotUpdateRowActions(), sortAscending(), sortDescending(), startEditOrToggleValue(), and updateActions().

QWidget* KexiDataAwareView::m_internalView [protected]
 

Definition at line 86 of file kexidataawareview.h.

Referenced by init(), mainWidget(), minimumSizeHint(), reloadActions(), sizeHint(), and KexiDataTable::tableView().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:49:54 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003