kexi

KexiDialogBase Class Reference

#include <kexidialogbase.h>

Inheritance diagram for KexiDialogBase:

KexiActionProxy Kexi::ObjectStatus List of all members.

Detailed Description

Base class for child window of Kexi's main application window.

This class can contain a number of configurable views, switchable using toggle action. It also automatically works as a proxy for shared (application-wide) actions.

Definition at line 75 of file kexidialogbase.h.


Public Slots

virtual void setFocus ()
void updateCaption ()
tristate storeData (bool dontAsk=false)
tristate storeNewData ()
void sendDetachedStateToCurrentView ()
void sendAttachedStateToCurrentView ()

Signals

void updateContextHelp ()
void closing ()
void dirtyChanged (KexiDialogBase *)

Public Member Functions

 KexiDialogBase (KexiMainWindow *parent, const QString &caption=QString::null)
virtual ~KexiDialogBase ()
bool isRegistered ()
KexiViewBaseselectedView () const
KexiViewBaseviewForMode (int mode) const
void addView (KexiViewBase *view)
virtual QSize minimumSizeHint () const
virtual QSize sizeHint () const
KexiMainWindowmainWin ()
void setId (int id)
int id () const
KexiPart::Partpart () const
KexiPart::ItempartItem () const
KexiPart::GUIClientcommonGUIClient () const
KexiPart::GUIClientguiClient () const
virtual QString itemIcon ()
bool supportsViewMode (int mode) const
int currentViewMode () const
tristate switchToViewMode (int newViewMode)
void setContextHelp (const QString &caption, const QString &text, const QString &iconName)
virtual bool eventFilter (QObject *obj, QEvent *e)
virtual void attachToGUIClient ()
virtual void detachFromGUIClient ()
bool dirty () const
KexiViewBaseviewThatRecentlySetDirtyFlag () const
bool neverSaved () const
KoProperty::Set * propertySet ()
KexiDB::SchemaDataschemaData () const
KexiDialogTempDatatempData () const
void activate ()
void deactivate ()

Protected Slots

void setDirty (bool dirty)

Protected Member Functions

tristate switchToViewMode (int newViewMode, QMap< QString, QString > *staticObjectArgs)
void registerDialog ()
virtual void closeEvent (QCloseEvent *e)
void addView (KexiViewBase *view, int mode)
QWidgetStack * stack () const
void dirtyChanged (KexiViewBase *view)

Protected Attributes

int m_supportedViewModes
int m_openedViewModes
int m_currentViewMode

Friends

class KexiMainWindow
class KexiPart::Part
class KexiInternalPart
class KexiViewBase

Member Function Documentation

void KexiDialogBase::activate (  ) 

Called primarily by KexiMainWindowImpl to activate dialog. Selected view (if present) is also informed about activation.

Definition at line 597 of file kexidialogbase.cpp.

void KexiDialogBase::addView ( KexiViewBase view  ) 

Adds view for the dialog. It will be the _only_ view (of unspecified mode) for the dialog.

Definition at line 91 of file kexidialogbase.cpp.

void KexiDialogBase::attachToGUIClient (  )  [virtual]

Used by Main Window

Todo:
js: PROBABLY REMOVE THESE TWO?

Definition at line 149 of file kexidialogbase.cpp.

void KexiDialogBase::closing (  )  [signal]

emitted when the window is about to close

KexiPart::GUIClient * KexiDialogBase::commonGUIClient (  )  const

Kexi dialog's gui COMMON client.

It's obtained by querying part object for this dialog.

Definition at line 263 of file kexidialogbase.cpp.

int KexiDialogBase::currentViewMode (  )  const [inline]

Returns:
current view mode for this dialog.

Definition at line 154 of file kexidialogbase.h.

void KexiDialogBase::deactivate (  ) 

Called primarily by KexiMainWindowImpl to deactivate dialog. Selected view (if present) is also informed about deactivation.

Definition at line 612 of file kexidialogbase.cpp.

bool KexiDialogBase::dirty (  )  const

True if contents (data) of the dialog is dirty and need to be saved This may or not be used, depending if changes in the dialog are saved immediately (e.g. like in datatableview) or saved by hand (by user) (e.g. like in alter-table dialog).

Returns:
true if at least on "dirty" flag is set for one of the dialog's view.

Definition at line 212 of file kexidialogbase.cpp.

void KexiDialogBase::dirtyChanged ( KexiViewBase view  )  [protected]

Used by view to inform the dialog about changing state of the "dirty" flag.

Definition at line 423 of file kexidialogbase.cpp.

void KexiDialogBase::dirtyChanged ( KexiDialogBase  )  [signal]

Emited to inform the world that 'dirty' flag changes. Activated by KexiViewBase::setDirty().

bool KexiDialogBase::eventFilter ( QObject *  obj,
QEvent *  e 
) [virtual]

Internal reimplementation.

Definition at line 405 of file kexidialogbase.cpp.

KexiPart::GUIClient * KexiDialogBase::guiClient (  )  const

Kexi dialog's gui client for currently selected view.

It's obtained by querying part object for this dialog.

Definition at line 256 of file kexidialogbase.cpp.

int KexiDialogBase::id (  )  const

If there is a part item associated with this dialog (see partItem()), partItem()->identifier() is returned, otherwise internal dialog's identifier (previously set by setID()) is returned.

Definition at line 161 of file kexidialogbase.cpp.

QString KexiDialogBase::itemIcon (  )  [virtual]

Returns:
name of icon provided by part that created this dialog. The name is used by KexiMainWindow to set/reset icon for this dialog.

Definition at line 244 of file kexidialogbase.cpp.

QSize KexiDialogBase::minimumSizeHint (  )  const [virtual]

reimplemented: minimum size hint is inherited from currently visible view.

Definition at line 109 of file kexidialogbase.cpp.

bool KexiDialogBase::neverSaved (  )  const

Returns:
true, if this dialog's data were never saved. If it's true we're usually try to ask a user if the dialog's data should be saved somewhere. After dialog construction, "neverSaved" flag is set to appropriate value. KexiPart::Item::neverSaved() is reused.

Definition at line 468 of file kexidialogbase.cpp.

KexiPart::Part* KexiDialogBase::part (  )  const [inline]

Returns:
Kexi part used to create this window

Definition at line 124 of file kexidialogbase.h.

KexiPart::Item* KexiDialogBase::partItem (  )  const [inline]

Returns:
Kexi part item used to create this window

Definition at line 127 of file kexidialogbase.h.

KoProperty::Set * KexiDialogBase::propertySet (  ) 

Returns:
property set provided by a current view, or NULL if there is no view set (or the view has no set assigned).

Definition at line 397 of file kexidialogbase.cpp.

KexiViewBase * KexiDialogBase::selectedView (  )  const

Returns:
currently selected view or 0 if there is no current view

Definition at line 78 of file kexidialogbase.cpp.

void KexiDialogBase::sendAttachedStateToCurrentView (  )  [slot]

W're informing the current view about performed atttaching by calling KexiViewBase::parentDialogAttached(), so the view can react on this event (by default KexiViewBase::parentDialogAttached() does nothing, you can reimplement it).

Definition at line 626 of file kexidialogbase.cpp.

void KexiDialogBase::sendDetachedStateToCurrentView (  )  [slot]

Reimplemented - we're informing the current view about performed detaching by calling KexiViewBase::parentDialogDetached(), so the view can react on this event (by default KexiViewBase::parentDialogDetached() does nothing, you can reimplement it).

Definition at line 619 of file kexidialogbase.cpp.

void KexiDialogBase::setDirty ( bool  dirty  )  [protected, slot]

Sets 'dirty' flag on every dialog's view.

Definition at line 229 of file kexidialogbase.cpp.

void KexiDialogBase::setId ( int  id  )  [inline]

This method sets internal identifier for the dialog, but if there is a part item associated with this dialog (see partItem()), partItem()->identifier() will be is used as identifier, so this method is noop. Thus, it's usable only for dialog types when no part item is assigned.

Definition at line 116 of file kexidialogbase.h.

QSize KexiDialogBase::sizeHint (  )  const [virtual]

reimplemented: size hint is inherited from currently visible view.

Definition at line 117 of file kexidialogbase.cpp.

tristate KexiDialogBase::storeData ( bool  dontAsk = false  )  [slot]

Internal. Called by KexiMainWindowImpl::saveObject(). Tells this dialog to save changes of the existing object to the backend. If dontAsk is true, no question dialog will be shown to the user. The default is false.

See also:
storeNewData()
Returns:
true on success, false on failure and cancelled when storing has been cancelled.

Definition at line 561 of file kexidialogbase.cpp.

tristate KexiDialogBase::storeNewData (  )  [slot]

Internal. Called by KexiMainWindowImpl::saveObject(). Tells this dialog to create and store data of the new object to the backend. Object's schema data has been never stored, so it is created automatically, using information obtained form part item. On success, part item's ID is updated to new value, and m_schemaData is set.

See also:
schemaData().
Returns:
true on success, false on failure and cancelled when storing has been cancelled.

Definition at line 473 of file kexidialogbase.cpp.

bool KexiDialogBase::supportsViewMode ( int  mode  )  const [inline]

Returns:
true if this dialog supports switching to mode. mode is one of Kexi::ViewMode enum elements. The flags are used e.g. for testing by KexiMainWindow, if actions of switching to given view mode is available. This member is intialised in KexiPart that creates this KexiDialogBase object.

Definition at line 151 of file kexidialogbase.h.

tristate KexiDialogBase::switchToViewMode ( int  newViewMode,
QMap< QString, QString > *  staticObjectArgs 
) [protected]

Used by Part::openInstance(), like switchToViewMode( int newViewMode ), but passed staticObjectArgs. Only used for parts of class KexiPart::StaticPart.

Definition at line 270 of file kexidialogbase.cpp.

tristate KexiDialogBase::switchToViewMode ( int  newViewMode  ) 

Switches this dialog to newViewMode. viewMode is one of Kexi::ViewMode enum elements.

Returns:
true for successfull switching True is returned also if user has cancelled switching (rarely, but for any reason) - cancelled is returned.

Definition at line 377 of file kexidialogbase.cpp.

KexiDialogTempData* KexiDialogBase::tempData (  )  const [inline]

Used by KexiViewBase subclasses.

Returns:
temporary data shared between views

Definition at line 203 of file kexidialogbase.h.

KexiViewBase * KexiDialogBase::viewForMode ( int  mode  )  const

Returns:
a view for a given mode or 0 if there's no such mode available (or opened). This does not open mode if it's not opened.

Definition at line 86 of file kexidialogbase.cpp.

KexiViewBase* KexiDialogBase::viewThatRecentlySetDirtyFlag (  )  const [inline]

Returns:
a pointer to view that has recently set dirty flag. This value is cleared when dirty flag is set to false (i.e. upon saving changes).

Definition at line 184 of file kexidialogbase.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys