kexi

#include <kexidataawareview.h>

Inheritance diagram for KexiDataAwareView:
KexiViewBase KexiSearchAndReplaceViewInterface KexiActionProxy KexiDataTable KexiFormView KexiTableDesignerView

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 Slots inherited from KexiViewBase
virtual void setFocus ()
virtual void propertySetSwitched ()
void setDirty (bool set)
void setDirty ()

Public Member Functions

 KexiDataAwareView (KexiMainWindow *mainWin, TQWidget *parent, const char *name=0)
TQWidget * mainWidget ()
virtual TQSize minimumSizeHint () const
virtual TQSize sizeHint () const
KexiDataAwareObjectInterface * dataAwareObject () const
virtual bool setupFindAndReplace (TQStringList &columnNames, TQStringList &columnCaptions, TQString &currentColumnName)
virtual tristate find (const TQVariant &valueToFind, const KexiSearchAndReplaceViewInterface::Options &options, bool next)
virtual tristate findNextAndReplace (const TQVariant &valueToFind, const TQVariant &replacement, const KexiSearchAndReplaceViewInterface::Options &options, bool replaceAll)
Public Member Functions inherited from KexiViewBase
 KexiViewBase (KexiMainWindow *mainWin, TQWidget *parent, const char *name=0)
KexiMainWindow * mainWin () const
KexiDialogBase * parentDialog () const
KexiPart::Part * part () const
virtual TQSize preferredSizeHint (const TQSize &otherSize)
virtual bool eventFilter (TQObject *o, TQEvent *e)
void addChildView (KexiViewBase *childView)
virtual bool dirty () const
int viewMode () const
virtual TDEAction * sharedAction (const char *action_name)
virtual void setAvailable (const char *action_name, bool set)
Public Member Functions inherited from KexiActionProxy
 KexiActionProxy (TQObject *receiver, KexiSharedActionHost *host=0)
bool activateSharedAction (const char *action_name, bool alsoCheckInChildren=true)
void setSharedActionHost (KexiSharedActionHost &host)
bool isAvailable (const char *action_name, bool alsoCheckInChildren=true) const
bool isSupported (const char *action_name) const
void setActionProxyParent_internal (KexiActionProxy *parent)

Protected Slots

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

Protected Member Functions

void init (TQWidget *viewWidget, KexiSharedActionClient *actionClient, KexiDataAwareObjectInterface *dataAwareObject, bool noDataAware=false)
void initActions ()
virtual void updateActions (bool activated)
Protected Member Functions inherited from KexiViewBase
virtual tristate beforeSwitchTo (int mode, bool &dontStore)
virtual tristate afterSwitchFrom (int mode)
virtual void closeEvent (TQCloseEvent *e)
virtual KoProperty::Set * propertySet ()
void propertySetReloaded (bool preservePrevSelection=false, const TQCString &propertyToSelect=TQCString())
virtual KexiDB::SchemaData * storeNewData (const KexiDB::SchemaData &sdata, bool &cancel)
bool loadDataBlock (TQString &dataString, const TQString &dataID=TQString(), bool canBeEmpty=false)
virtual tristate storeData (bool dontAsk=false)
bool storeDataBlock (const TQString &dataString, const TQString &dataID=TQString())
bool removeDataBlock (const TQString &dataID=TQString())
void setViewWidget (TQWidget *w, bool focusProxy=false)
virtual void setFocusInternal ()
virtual void parentDialogDetached ()
virtual void parentDialogAttached ()
Protected Member Functions inherited from KexiActionProxy
void plugSharedAction (const char *action_name, TQObject *receiver, const char *slot)
void unplugSharedAction (const char *action_name)
void plugSharedAction (const char *action_name, const char *slot)
int plugSharedAction (const char *action_name, TQWidget *w)
void plugSharedActionToExternalGUI (const char *action_name, KXMLGUIClient *client)
void plugSharedActionsToExternalGUI (const TQValueList< TQCString > &action_names, KXMLGUIClient *client)
void unplugSharedAction (const char *action_name, TQWidget *w)
TDEAction * plugSharedAction (const char *action_name, const TQString &alternativeText, TQWidget *w)
TQObject * receiver () const
void addActionProxyChild (KexiActionProxy *child)
void takeActionProxyChild (KexiActionProxy *child)

Protected Attributes

TQWidget * m_internalView
KexiSharedActionClient * m_actionClient
KexiDataAwareObjectInterface * m_dataAwareObject
Protected Attributes inherited from KexiViewBase
TQString m_defaultIconName
KexiMainWindow * m_mainWin
KexiDialogBase * m_dialog
TQWidget * m_viewWidget
KexiViewBase * m_parentView
TQGuardedPtr< TQWidget > m_lastFocusedChildBeforeFocusOut
Protected Attributes inherited from KexiActionProxy
KexiSharedActionHost * m_host
TQGuardedPtr< TQObject > m_receiver
TQAsciiDict< TQPair< TQSignal *, bool > > m_signals
TQPtrList< KexiActionProxy > m_sharedActionChildren
TQPtrList< TDEAction > m_alternativeActions
KexiActionProxy * m_actionProxyParent
TQObject m_signal_parent
TDEAction_setEnabled_Helper * m_TDEAction_setEnabled_helper

Additional Inherited Members

Signals inherited from KexiViewBase
void closing (bool &cancel)
void focus (bool in)
Public Attributes inherited from KexiActionProxy
KexiActionProxy * m_focusedChild

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:

  • tabular data views
  • form data view

Action implementations like data editing and deleting are shared for different view types to keep even better consistency. The view also implements KexiSearchAndReplaceViewInterface to support search/replace features used by shared KexiFindDialog.

Definition at line 41 of file kexidataawareview.h.

Constructor & Destructor Documentation

◆ KexiDataAwareView()

KexiDataAwareView::KexiDataAwareView ( KexiMainWindow * mainWin,
TQWidget * parent,
const char * name = 0 )

Definition at line 30 of file kexidataawareview.cpp.

Member Function Documentation

◆ acceptRowEdit

bool KexiDataAwareView::acceptRowEdit ( )
slot

Definition at line 262 of file kexidataawareview.cpp.

◆ cancelRowEdit

void KexiDataAwareView::cancelRowEdit ( )
slot

Definition at line 273 of file kexidataawareview.cpp.

◆ copySelection

void KexiDataAwareView::copySelection ( )
slot

Definition at line 288 of file kexidataawareview.cpp.

◆ cutSelection

void KexiDataAwareView::cutSelection ( )
slot

Definition at line 293 of file kexidataawareview.cpp.

◆ dataAwareObject()

KexiDataAwareObjectInterface * KexiDataAwareView::dataAwareObject ( ) const
inline

Definition at line 56 of file kexidataawareview.h.

◆ deleteAllRows

void KexiDataAwareView::deleteAllRows ( )
slot

Definition at line 242 of file kexidataawareview.cpp.

◆ deleteAndStartEditCurrentCell

void KexiDataAwareView::deleteAndStartEditCurrentCell ( )
slot

Definition at line 252 of file kexidataawareview.cpp.

◆ deleteCurrentRow

void KexiDataAwareView::deleteCurrentRow ( )
slot

Definition at line 247 of file kexidataawareview.cpp.

◆ find()

tristate KexiDataAwareView::find ( const TQVariant & valueToFind,
const KexiSearchAndReplaceViewInterface::Options & options,
bool next )
virtual

Finds valueToFind within the view. Implemented for KexiSearchAndReplaceViewInterface.

Implements KexiSearchAndReplaceViewInterface.

Definition at line 332 of file kexidataawareview.cpp.

◆ findNextAndReplace()

tristate KexiDataAwareView::findNextAndReplace ( const TQVariant & valueToFind,
const TQVariant & replacement,
const KexiSearchAndReplaceViewInterface::Options & options,
bool replaceAll )
virtual

Finds valueToFind within the view and replaces with replacement. Implemented for KexiSearchAndReplaceViewInterface.

Implements KexiSearchAndReplaceViewInterface.

Definition at line 355 of file kexidataawareview.cpp.

◆ init()

void KexiDataAwareView::init ( TQWidget * viewWidget,
KexiSharedActionClient * actionClient,
KexiDataAwareObjectInterface * dataAwareObject,
bool noDataAware = false )
protected

before closing - we'are accepting editing

updating actions on start/stop editing

Definition at line 39 of file kexidataawareview.cpp.

◆ initActions()

void KexiDataAwareView::initActions ( )
protected
Todo
plugSharedAction("data_filter", this, TQ_SLOT(???()));
Todo
update availability
Todo
plugSharedAction("edit_replace", this, TQ_SLOT(editReplace()));
Todo
Todo
m_actionClient->plugSharedAction(sharedAction("edit_replace")); //for proper shortcut
Todo
setAvailable("edit_replace", true);

Definition at line 73 of file kexidataawareview.cpp.

◆ mainWidget()

TQWidget * KexiDataAwareView::mainWidget ( )

Definition at line 163 of file kexidataawareview.cpp.

◆ minimumSizeHint()

TQSize KexiDataAwareView::minimumSizeHint ( ) const
virtual

Definition at line 168 of file kexidataawareview.cpp.

◆ paste

void KexiDataAwareView::paste ( )
slot

Definition at line 298 of file kexidataawareview.cpp.

◆ reloadActions

void KexiDataAwareView::reloadActions ( )
protectedslot

Definition at line 185 of file kexidataawareview.cpp.

◆ setupFindAndReplace()

bool KexiDataAwareView::setupFindAndReplace ( TQStringList & columnNames,
TQStringList & columnCaptions,
TQString & currentColumnName )
virtual

Sets up data for find/replace dialog, based on view's data model. Implemented for KexiSearchAndReplaceViewInterface.

Implements KexiSearchAndReplaceViewInterface.

Definition at line 309 of file kexidataawareview.cpp.

◆ sizeHint()

TQSize KexiDataAwareView::sizeHint ( ) const
virtual

Definition at line 173 of file kexidataawareview.cpp.

◆ slotCellSelected

void KexiDataAwareView::slotCellSelected ( int col,
int row )
protectedslot

Definition at line 237 of file kexidataawareview.cpp.

◆ slotClosing

void KexiDataAwareView::slotClosing ( bool & cancel)
protectedslot

Definition at line 267 of file kexidataawareview.cpp.

◆ slotGoToFirstRow

void KexiDataAwareView::slotGoToFirstRow ( )
slot

Definition at line 303 of file kexidataawareview.cpp.

◆ slotGoToLastRow

void KexiDataAwareView::slotGoToLastRow ( )
slot

Definition at line 306 of file kexidataawareview.cpp.

◆ slotGoToNewRow

void KexiDataAwareView::slotGoToNewRow ( )
slot

Definition at line 307 of file kexidataawareview.cpp.

◆ slotGoToNextRow

void KexiDataAwareView::slotGoToNextRow ( )
slot

Definition at line 305 of file kexidataawareview.cpp.

◆ slotGoToPreviusRow

void KexiDataAwareView::slotGoToPreviusRow ( )
slot

Definition at line 304 of file kexidataawareview.cpp.

◆ slotUpdateRowActions

void KexiDataAwareView::slotUpdateRowActions ( int row)
protectedslot

Definition at line 141 of file kexidataawareview.cpp.

◆ sortAscending

void KexiDataAwareView::sortAscending ( )
slot

Definition at line 278 of file kexidataawareview.cpp.

◆ sortDescending

void KexiDataAwareView::sortDescending ( )
slot

Definition at line 283 of file kexidataawareview.cpp.

◆ startEditOrToggleValue

void KexiDataAwareView::startEditOrToggleValue ( )
slot

Definition at line 257 of file kexidataawareview.cpp.

◆ updateActions()

void KexiDataAwareView::updateActions ( bool activated)
protectedvirtual

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 178 of file kexidataawareview.cpp.

Member Data Documentation

◆ m_actionClient

KexiSharedActionClient* KexiDataAwareView::m_actionClient
protected

Definition at line 114 of file kexidataawareview.h.

◆ m_dataAwareObject

KexiDataAwareObjectInterface* KexiDataAwareView::m_dataAwareObject
protected

Definition at line 115 of file kexidataawareview.h.

◆ m_internalView

TQWidget* KexiDataAwareView::m_internalView
protected

Definition at line 113 of file kexidataawareview.h.


The documentation for this class was generated from the following files: