kexi

KexiMainWindow Class Reference

#include <keximainwindow.h>

Inheritance diagram for KexiMainWindow:

KexiSharedActionHost KexiMainWindowImpl List of all members.

Detailed Description

Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.

KexiMainWindow offers simple features what lowers cross-dependency (and also avoids circular dependencies between Kexi modules).

Definition at line 45 of file keximainwindow.h.


Public Slots

virtual KexiDialogBaseopenObject (KexiPart::Item *item, int viewMode, bool &openingCancelled, QMap< QString, QString > *staticObjectArgs=0)=0
virtual KexiDialogBaseopenObject (const QCString &mime, const QString &name, int viewMode, bool &openingCancelled, QMap< QString, QString > *staticObjectArgs=0)=0
virtual void acceptPropertySetEditing ()=0
virtual void propertySetSwitched (KexiDialogBase *dlg, bool force=false, bool preservePrevSelection=true)=0
virtual tristate saveObject (KexiDialogBase *dlg, const QString &messageWhenAskingForName=QString::null, bool dontAsk=false)=0
virtual tristate closeDialog (KexiDialogBase *dlg)=0
virtual tristate getNewObjectInfo (KexiPart::Item *partItem, KexiPart::Part *part, bool &allowOverwriting, const QString &messageWhenAskingForName=QString::null)=0
virtual void highlightObject (const QCString &mime, const QCString &name)=0

Signals

void acceptProjectClosingRequested (bool &cancel)
void beforeProjectClosing ()
void projectClosed ()

Public Member Functions

 KexiMainWindow ()
virtual ~KexiMainWindow ()
virtual KexiProjectproject ()=0
virtual void registerChild (KexiDialogBase *dlg)=0
virtual QPopupMenu * findPopupMenu (const char *popupName)=0
virtual int generatePrivateID ()=0
virtual KActionPtrList allActions () const =0

Protected Slots

virtual void slotObjectRenamed (const KexiPart::Item &item, const QCString &oldName)=0

Member Function Documentation

void KexiMainWindow::acceptProjectClosingRequested ( bool &  cancel  )  [signal]

Emitted to make sure the project can be close.

Connect a slot here and set cancel to true to cancel the closing.

virtual void KexiMainWindow::acceptPropertySetEditing (  )  [pure virtual, slot]

Called to accept property butter editing.

Implemented in KexiMainWindowImpl.

virtual KActionPtrList KexiMainWindow::allActions (  )  const [pure virtual]

Returns:
a list of all actions defined by application. Not all of them are shared. Don't use plug these actions in your windows by hand but user methods from KexiViewBase!

Implemented in KexiMainWindowImpl.

void KexiMainWindow::beforeProjectClosing (  )  [signal]

Emitted before closing the project (and destroying all it's data members).

You can do you cleanup of your structures here.

virtual tristate KexiMainWindow::closeDialog ( KexiDialogBase dlg  )  [pure virtual, slot]

Closes dialog dlg. If dialog's data (see KexiDialoBase::dirty()) is unsaved, used will be asked if saving should be perforemed.

Returns:
true on successull closing or false on closing error. If closing was cancelled by user, cancelled is returned.

Implemented in KexiMainWindowImpl.

virtual int KexiMainWindow::generatePrivateID (  )  [pure virtual]

Generates ID for private "document" like Relations window. Private IDs are negative numbers (while ID regular part instance's IDs are >0) Private means that the object is not stored as-is in the project but is somewhat generated and in most cases there is at most one unique instance document of such type (part). To generate this ID, just app-wide internal counter is used.

Implemented in KexiMainWindowImpl.

virtual tristate KexiMainWindow::getNewObjectInfo ( KexiPart::Item partItem,
KexiPart::Part part,
bool &  allowOverwriting,
const QString &  messageWhenAskingForName = QString::null 
) [pure virtual, slot]

Displays a dialog for entering object's name and title. Used on new object saving.

Returns:
true on successul closing or cancelled on cancel returned. It's unlikely to have false returned here. messageWhenAskingForName is a i18n'ed text that will be visible within name/caption dialog (see KexiNameDialog). If allowOverwriting is true, user will be asked for existing object's overwriting, else it will be impossible to enter a name of exisiting object. You can check allowOverwriting after calling this method. If it's true, user agreed on overwriting, if it's false, user picked nonexisting name, so no overwrite will be needed.

Implemented in KexiMainWindowImpl.

virtual void KexiMainWindow::highlightObject ( const QCString &  mime,
const QCString &  name 
) [pure virtual, slot]

Highlights object of mime mime and name name. This can be done in the Project Navigator or so. If a window for the object is opened (in any mode), it should be raised.

Implemented in KexiMainWindowImpl.

virtual KexiDialogBase* KexiMainWindow::openObject ( const QCString &  mime,
const QString &  name,
int  viewMode,
bool &  openingCancelled,
QMap< QString, QString > *  staticObjectArgs = 0 
) [pure virtual, slot]

For convenience.

Implemented in KexiMainWindowImpl.

virtual KexiDialogBase* KexiMainWindow::openObject ( KexiPart::Item item,
int  viewMode,
bool &  openingCancelled,
QMap< QString, QString > *  staticObjectArgs = 0 
) [pure virtual, slot]

Opens object pointed by item in a view viewMode.

Implemented in KexiMainWindowImpl.

virtual KexiProject* KexiMainWindow::project (  )  [pure virtual]

Project data of currently opened project or NULL if no project here yet.

Implemented in KexiMainWindowImpl.

void KexiMainWindow::projectClosed (  )  [signal]

Emitted after closing the project.

virtual void KexiMainWindow::propertySetSwitched ( KexiDialogBase dlg,
bool  force = false,
bool  preservePrevSelection = true 
) [pure virtual, slot]

Received information from active view that dlg has switched its property set, so property editor contents should be reloaded. If force is true, property editor's data is reloaded even if the currently pointed property set is the same as before. If preservePrevSelection is true and there was a property set set before call, previously selected item will be preselected in the editor (if found).

Implemented in KexiMainWindowImpl.

virtual void KexiMainWindow::registerChild ( KexiDialogBase dlg  )  [pure virtual]

Registers dialog dlg for watching and adds it to the main window's stack.

Implemented in KexiMainWindowImpl.

virtual tristate KexiMainWindow::saveObject ( KexiDialogBase dlg,
const QString &  messageWhenAskingForName = QString::null,
bool  dontAsk = false 
) [pure virtual, slot]

Saves dialog's dlg data. If dialog's data is never saved, user is asked for name and title, before saving (see getNewObjectInfo()).

Returns:
true on successul saving or false on error. If saving was cancelled by user, cancelled is returned. messageWhenAskingForName is a i18n'ed text that will be visible within name/caption dialog (see KexiNameDialog), which is popped up for never saved objects.

Implemented in KexiMainWindowImpl.


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