kexi
KexiMainWindow Class Reference
#include <keximainwindow.h>

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 Types | |
enum | PrintActionType { PrintItem, PreviewItem, PageSetupForItem } |
Public Slots | |
virtual bool | newObject (KexiPart::Info *info, bool &openingCancelled)=0 |
virtual KexiDialogBase * | openObject (KexiPart::Item *item, int viewMode, bool &openingCancelled, QMap< QString, QString > *staticObjectArgs=0, QString *errorMessage=0)=0 |
virtual KexiDialogBase * | openObject (const QCString &mime, const QString &name, int viewMode, bool &openingCancelled, QMap< QString, QString > *staticObjectArgs=0)=0 |
virtual tristate | closeObject (KexiPart::Item *item)=0 |
virtual void | acceptPropertySetEditing ()=0 |
virtual void | propertySetSwitched (KexiDialogBase *dlg, bool force=false, bool preservePrevSelection=true, const QCString &propertyToSelect=QCString())=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 |
virtual tristate | printItem (KexiPart::Item *item)=0 |
virtual tristate | printPreviewForItem (KexiPart::Item *item)=0 |
virtual tristate | showPageSetupForItem (KexiPart::Item *item)=0 |
virtual tristate | executeCustomActionForObject (KexiPart::Item *item, const QString &actionName)=0 |
Signals | |
void | acceptProjectClosingRequested (bool &cancel) |
void | beforeProjectClosing () |
void | projectClosed () |
Public Member Functions | |
virtual KexiProject * | project ()=0 |
virtual void | registerChild (KexiDialogBase *dlg)=0 |
virtual QPopupMenu * | findPopupMenu (const char *popupName)=0 |
virtual int | generatePrivateID ()=0 |
virtual KActionPtrList | allActions () const =0 |
virtual KexiDialogBase * | currentDialog () const =0 |
virtual bool | userMode () const =0 |
Protected Slots | |
virtual void | slotObjectRenamed (const KexiPart::Item &item, const QCString &oldName)=0 |
Member Enumeration Documentation
Member Function Documentation
virtual KexiProject* KexiMainWindow::project | ( | ) | [pure virtual] |
Project data of currently opened project or NULL if no project here yet.
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 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 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.
virtual KexiDialogBase* KexiMainWindow::currentDialog | ( | ) | const [pure virtual] |
- Returns:
- currently active dialog (window) od 0 if there is no active dialog.
Implemented in KexiMainWindowImpl.
virtual bool KexiMainWindow::userMode | ( | ) | const [pure virtual] |
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.
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.
void KexiMainWindow::projectClosed | ( | ) | [signal] |
Emitted after closing the project.
virtual bool KexiMainWindow::newObject | ( | KexiPart::Info * | info, | |
bool & | openingCancelled | |||
) | [pure virtual, slot] |
Creates new object of type defined by info part info. openingCancelled is set to true is opening has been cancelled.
- Returns:
- true on success.
Implemented in KexiMainWindowImpl.
virtual KexiDialogBase* KexiMainWindow::openObject | ( | KexiPart::Item * | item, | |
int | viewMode, | |||
bool & | openingCancelled, | |||
QMap< QString, QString > * | staticObjectArgs = 0 , |
|||
QString * | errorMessage = 0 | |||
) | [pure virtual, slot] |
virtual KexiDialogBase* KexiMainWindow::openObject | ( | const QCString & | mime, | |
const QString & | name, | |||
int | viewMode, | |||
bool & | openingCancelled, | |||
QMap< QString, QString > * | staticObjectArgs = 0 | |||
) | [pure virtual, slot] |
virtual tristate KexiMainWindow::closeObject | ( | KexiPart::Item * | item | ) | [pure virtual, slot] |
Closes the object for item.
- Returns:
- true on success (closing can be dealyed though), false on failure and cancelled if the object has "opening" job assigned.
Implemented in KexiMainWindowImpl.
virtual void KexiMainWindow::acceptPropertySetEditing | ( | ) | [pure virtual, slot] |
Called to accept property butter editing.
Implemented in KexiMainWindowImpl.
virtual void KexiMainWindow::propertySetSwitched | ( | KexiDialogBase * | dlg, | |
bool | force = false , |
|||
bool | preservePrevSelection = true , |
|||
const QCString & | propertyToSelect = QCString() | |||
) | [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 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.
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 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 existing 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 tristate KexiMainWindow::printItem | ( | KexiPart::Item * | item | ) | [pure virtual, slot] |
virtual tristate KexiMainWindow::printPreviewForItem | ( | KexiPart::Item * | item | ) | [pure virtual, slot] |
virtual tristate KexiMainWindow::showPageSetupForItem | ( | KexiPart::Item * | item | ) | [pure virtual, slot] |
Shows "page setup" dialog for item.
- Returns:
- true on success and cancelled when the action was cancelled.
Implemented in KexiMainWindowImpl.
virtual tristate KexiMainWindow::executeCustomActionForObject | ( | KexiPart::Item * | item, | |
const QString & | actionName | |||
) | [pure virtual, slot] |
Executes custom action for the main window, usually provided by a plugin. Also used by KexiFormEventAction.
Implemented in KexiMainWindowImpl.
The documentation for this class was generated from the following files: