kexi

#include <keximainwindow.h>

Inheritance diagram for KexiMainWindow:
KexiSharedActionHost KexiMainWindowImpl

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, TQMap< TQString, TQString > *staticObjectArgs=0, TQString *errorMessage=0)=0
 
virtual KexiDialogBase * openObject (const TQCString &mime, const TQString &name, int viewMode, bool &openingCancelled, TQMap< TQString, TQString > *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 TQCString &propertyToSelect=TQCString())=0
 
virtual tristate saveObject (KexiDialogBase *dlg, const TQString &messageWhenAskingForName=TQString(), bool dontAsk=false)=0
 
virtual tristate closeDialog (KexiDialogBase *dlg)=0
 
virtual tristate getNewObjectInfo (KexiPart::Item *partItem, KexiPart::Part *part, bool &allowOverwriting, const TQString &messageWhenAskingForName=TQString())=0
 
virtual void highlightObject (const TQCString &mime, const TQCString &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 TQString &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 TQPopupMenu * findPopupMenu (const char *popupName)=0
 
virtual int generatePrivateID ()=0
 
virtual TDEActionPtrList allActions () const =0
 
virtual KexiDialogBase * currentDialog () const =0
 
virtual bool userMode () const =0
 
- Public Member Functions inherited from KexiSharedActionHost
 KexiSharedActionHost (TDEMainWindow *mainWin)
 
virtual ~KexiSharedActionHost ()
 
virtual bool acceptsSharedActions (TQObject *o)
 
TQWidget * focusWindow ()
 
void setAsDefaultHost ()
 
TDEActionPtrList sharedActions () const
 
void setActionVolatile (TDEAction *a, bool set)
 

Protected Slots

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

Additional Inherited Members

- Static Public Member Functions inherited from KexiSharedActionHost
static KexiSharedActionHost & defaultHost ()
 
- Protected Member Functions inherited from KexiSharedActionHost
virtual void invalidateSharedActions (TQObject *o)
 
void setActionAvailable (const char *action_name, bool avail)
 
void plugActionProxy (KexiActionProxy *proxy)
 
void updateActionAvailable (const char *action_name, bool avail, TQObject *obj)
 
TDEMainWindow * mainWindow () const
 
TDEAction * createSharedAction (const TQString &text, const TQString &pix_name, const TDEShortcut &cut, const char *name, TDEActionCollection *col=0, const char *subclassName=0)
 
TDEAction * createSharedAction (KStdAction::StdAction id, const char *name, TDEActionCollection *col=0)
 
TDEAction * createSharedAction (const KGuiItem &guiItem, const TDEShortcut &cut, const char *name, TDEActionCollection *col=0)
 
KexiActionProxy * actionProxyFor (TQObject *o) const
 
KexiActionProxy * takeActionProxyFor (TQObject *o)
 

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.

Member Enumeration Documentation

◆ PrintActionType

Used by printActionForItem()

Definition at line 51 of file keximainwindow.h.

Constructor & Destructor Documentation

◆ KexiMainWindow()

KexiMainWindow::KexiMainWindow ( )

Definition at line 25 of file keximainwindow.cpp.

◆ ~KexiMainWindow()

KexiMainWindow::~KexiMainWindow ( )
virtual

Definition at line 31 of file keximainwindow.cpp.

Member Function Documentation

◆ acceptProjectClosingRequested

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.

◆ acceptPropertySetEditing

virtual void KexiMainWindow::acceptPropertySetEditing ( )
pure virtualslot

Called to accept property butter editing.

◆ allActions()

virtual TDEActionPtrList 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.

◆ beforeProjectClosing

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.

◆ closeDialog

virtual tristate KexiMainWindow::closeDialog ( KexiDialogBase *  dlg)
pure virtualslot

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.

◆ closeObject

virtual tristate KexiMainWindow::closeObject ( KexiPart::Item *  item)
pure virtualslot

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.

◆ currentDialog()

virtual KexiDialogBase * KexiMainWindow::currentDialog ( ) const
pure virtual
Returns
currently active dialog (window) od 0 if there is no active dialog.

Implemented in KexiMainWindowImpl.

◆ executeCustomActionForObject

virtual tristate KexiMainWindow::executeCustomActionForObject ( KexiPart::Item *  item,
const TQString &  actionName 
)
pure virtualslot

Executes custom action for the main window, usually provided by a plugin. Also used by KexiFormEventAction.

◆ findPopupMenu()

virtual TQPopupMenu * KexiMainWindow::findPopupMenu ( const char *  popupName)
pure virtual

Implemented in KexiMainWindowImpl.

◆ generatePrivateID()

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.

◆ getNewObjectInfo

virtual tristate KexiMainWindow::getNewObjectInfo ( KexiPart::Item *  partItem,
KexiPart::Part *  part,
bool &  allowOverwriting,
const TQString &  messageWhenAskingForName = TQString() 
)
pure virtualslot

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.

◆ highlightObject

virtual void KexiMainWindow::highlightObject ( const TQCString &  mime,
const TQCString &  name 
)
pure virtualslot

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.

◆ newObject

virtual bool KexiMainWindow::newObject ( KexiPart::Info *  info,
bool &  openingCancelled 
)
pure virtualslot

Creates new object of type defined by info part info. openingCancelled is set to true is opening has been cancelled.

Returns
true on success.

◆ openObject [1/2]

virtual KexiDialogBase * KexiMainWindow::openObject ( const TQCString &  mime,
const TQString &  name,
int  viewMode,
bool &  openingCancelled,
TQMap< TQString, TQString > *  staticObjectArgs = 0 
)
pure virtualslot

For convenience.

◆ openObject [2/2]

virtual KexiDialogBase * KexiMainWindow::openObject ( KexiPart::Item *  item,
int  viewMode,
bool &  openingCancelled,
TQMap< TQString, TQString > *  staticObjectArgs = 0,
TQString *  errorMessage = 0 
)
pure virtualslot

Opens object pointed by item in a view viewMode.

◆ printItem

virtual tristate KexiMainWindow::printItem ( KexiPart::Item *  item)
pure virtualslot

Shows "print" dialog for item.

Returns
true on success.

◆ printPreviewForItem

virtual tristate KexiMainWindow::printPreviewForItem ( KexiPart::Item *  item)
pure virtualslot

Shows "print preview" dialog.

Returns
true on success.

◆ project()

virtual KexiProject * KexiMainWindow::project ( )
pure virtual

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

Implemented in KexiMainWindowImpl.

◆ projectClosed

void KexiMainWindow::projectClosed ( )
signal

Emitted after closing the project.

◆ propertySetSwitched

virtual void KexiMainWindow::propertySetSwitched ( KexiDialogBase *  dlg,
bool  force = false,
bool  preservePrevSelection = true,
const TQCString &  propertyToSelect = TQCString() 
)
pure virtualslot

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).

◆ registerChild()

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.

◆ saveObject

virtual tristate KexiMainWindow::saveObject ( KexiDialogBase *  dlg,
const TQString &  messageWhenAskingForName = TQString(),
bool  dontAsk = false 
)
pure virtualslot

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.

◆ showPageSetupForItem

virtual tristate KexiMainWindow::showPageSetupForItem ( KexiPart::Item *  item)
pure virtualslot

Shows "page setup" dialog for item.

Returns
true on success and cancelled when the action was cancelled.

◆ userMode()

virtual bool KexiMainWindow::userMode ( ) const
pure virtual
Returns
true if this window is in the User Mode.

Implemented in KexiMainWindowImpl.


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