kexi

KexiMainWindowImpl Class Reference

#include <keximainwindowimpl.h>

Inheritance diagram for KexiMainWindowImpl:

KexiMainWindow KexiSharedActionHost

List of all members.


Detailed Description

Kexi's main window implementation.

Definition at line 45 of file keximainwindowimpl.h.


Public Slots

virtual void closeWindow (KMdiChildView *pWnd, bool layoutTaskBar=true)
virtual void addWindow (KMdiChildView *pView, int flags=KMdi::StandardAdd)
virtual tristate closeDialog (KexiDialogBase *dlg)
tristate closeDialog (KexiDialogBase *dlg, bool layoutTaskBar, bool doNotSaveChanges=false)
virtual void detachWindow (KMdiChildView *pWnd, bool bShow=true)
virtual void attachWindow (KMdiChildView *pWnd, bool bShow=true, bool bAutomaticResize=false)
virtual KexiDialogBaseopenObject (KexiPart::Item *item, int viewMode, bool &openingCancelled, QMap< QString, QString > *staticObjectArgs=0, QString *errorMessage=0)
virtual KexiDialogBaseopenObject (const QCString &mime, const QString &name, int viewMode, bool &openingCancelled, QMap< QString, QString > *staticObjectArgs=0)
virtual tristate closeObject (KexiPart::Item *item)
virtual tristate saveObject (KexiDialogBase *dlg, const QString &messageWhenAskingForName=QString::null, bool dontAsk=false)
virtual tristate getNewObjectInfo (KexiPart::Item *partItem, KexiPart::Part *part, bool &allowOverwriting, const QString &messageWhenAskingForName=QString::null)
virtual void highlightObject (const QCString &mime, const QCString &name)
tristate openProject (const KexiProjectData &projectData)
tristate openProject (const QString &aFileName, KexiDB::ConnectionData *cdata, const QString &dbName=QString::null, const QValueList< KexiProjectData::ObjectInfo > &autoopenObjects=QValueList< KexiProjectData::ObjectInfo >())
tristate openProject (const QString &aFileName, const QString &fileNameForConnectionData, const QString &dbName=QString::null)
tristate createProjectFromTemplate (const KexiProjectData &projectData)
tristate closeProject ()
virtual tristate printItem (KexiPart::Item *item)
virtual tristate printPreviewForItem (KexiPart::Item *item)
virtual tristate showPageSetupForItem (KexiPart::Item *item)
virtual tristate executeCustomActionForObject (KexiPart::Item *item, const QString &actionName)

Signals

void projectOpened ()

Public Member Functions

 KexiMainWindowImpl ()
virtual KexiProjectproject ()
virtual void registerChild (KexiDialogBase *dlg)
bool activateWindow (int id)
bool activateWindow (KexiDialogBase *dlg)
tristate startup ()
virtual bool userMode () const
bool openingAllowed (KexiPart::Item *item, int viewMode)
virtual bool eventFilter (QObject *obj, QEvent *e)
virtual QPopupMenu * findPopupMenu (const char *popupName)
virtual KActionPtrList allActions () const
virtual KexiDialogBasecurrentDialog () const
virtual int generatePrivateID ()
virtual void readProperties (KConfig *config)
virtual void saveProperties (KConfig *config)
virtual void saveGlobalProperties (KConfig *sessionConfig)

Static Public Member Functions

static int create (int argc, char *argv[], KAboutData *aboutdata=0)
static KexiMainWindowImplself ()

Protected Slots

void slotAutoOpenObjectsLater ()
void activeWindowChanged (KMdiChildView *dlg)
void childClosed (KMdiChildView *dlg)
void slotPartLoaded (KexiPart::Part *p)
void slotCaptionForCurrentMDIChild (bool childrenMaximized)
void slotNoMaximizedChildFrmLeft (KMdiChildFrm *)
void slotLastChildViewClosed ()
void slotChildViewIsDetachedNow (QWidget *)
void createKexiProject (KexiProjectData *new_data)
KexiDialogBaseopenObjectFromNavigator (KexiPart::Item *item, int viewMode, bool &openingCancelled)
KexiDialogBaseopenObjectFromNavigator (KexiPart::Item *item, int viewMode)
virtual bool newObject (KexiPart::Info *info, bool &openingCancelled)
bool newObject (KexiPart::Info *info)
KexiDialogBaseopenObject (KexiPart::Item *item, int viewMode, QMap< QString, QString > *staticObjectArgs=0)
tristate removeObject (KexiPart::Item *item, bool dontAsk=false)
void renameObject (KexiPart::Item *item, const QString &_newName, bool &succes)
virtual void slotObjectRenamed (const KexiPart::Item &item, const QCString &oldName)
virtual void fillWindowMenu ()
void invalidateSharedActions ()
void invalidateSharedActionsLater ()
void updateReadOnlyState ()
void slotProjectNew ()
void slotProjectOpen ()
void slotProjectOpenRecentAboutToShow ()
void slotProjectOpenRecent (int id)
void slotProjectOpenRecentMore ()
void slotProjectSave ()
void slotProjectSaveAs ()
void slotProjectPrint ()
void slotProjectPrintPreview ()
void slotProjectPageSetup ()
void slotProjectProperties ()
void slotProjectClose ()
void slotProjectRelations ()
void slotProjectImportDataTable ()
void slotProjectExportDataTable ()
void slotProjectQuit ()
void slotEditPasteSpecialDataTable ()
void slotEditCopySpecialDataTable ()
void slotEditFind ()
void slotEditFind (bool next)
void slotEditFindNext ()
void slotEditFindPrevious ()
void slotEditReplace (bool all)
void slotEditReplace ()
void slotEditReplaceNext ()
void slotEditReplaceAll ()
void slotViewNavigator ()
void slotViewMainArea ()
void slotViewPropertyEditor ()
void slotViewDataMode ()
void slotViewDesignMode ()
void slotViewTextMode ()
void slotShowSettings ()
void slotConfigureKeys ()
void slotConfigureToolbars ()
void slotToolsProjectMigration ()
void slotToolsCompactDatabase ()
void slotGetNewStuff ()
void slotTipOfTheDay ()
void importantInfo (bool onStartup)
void slotImportantInfo ()
void slotStartFeedbackAgent ()
void slotOptionsEnableForms (bool show, bool noMessage=false)
void slotImportFile ()
void slotImportServer ()
void slotLastActions ()
virtual void acceptPropertySetEditing ()
virtual void propertySetSwitched (KexiDialogBase *dlg, bool force=false, bool preservePrevSelection=true, const QCString &propertyToSelect=QCString())
void slotDirtyFlagChanged (KexiDialogBase *)
void slotMdiModeHasBeenChangedTo (KMdi::MdiMode)
virtual void switchToIDEAlMode ()
void switchToIDEAlMode (bool showMessage)
virtual void switchToChildframeMode ()
void switchToChildframeMode (bool showMessage)
tristate showProjectMigrationWizard (const QString &mimeType, const QString &databaseName, const KexiDB::ConnectionData *cdata=0)
void slotPartItemSelectedInNavigator (KexiPart::Item *item)
tristate executeItem (KexiPart::Item *item)
tristate exportItemAsDataTable (KexiPart::Item *item)
tristate copyItemToClipboardAsDataTable (KexiPart::Item *item)
bool printItem (KexiPart::Item *item, const QString &titleText)
bool printItem (KexiPart::Item *item, const KexiSimplePrintingSettings &settings, const QString &titleText=QString::null)
bool printPreviewForItem (KexiPart::Item *item, const QString &titleText, bool reload)
bool printPreviewForItem (KexiPart::Item *item, const KexiSimplePrintingSettings &settings, const QString &titleText=QString::null, bool reload=false)
tristate printActionForItem (KexiPart::Item *item, PrintActionType action)

Protected Member Functions

bool initUserMode (KexiProjectData *projectData)
void initNavigator ()
void initContextHelp ()
void initPropertyEditor ()
void initActions ()
void initUserActions ()
void restoreSettings ()
void storeSettings ()
void invalidateActions ()
virtual void invalidateSharedActions (QObject *o)
void invalidateProjectWideActions ()
void invalidateViewModeActions ()
tristate createBlankProject ()
KexiProjectDatacreateBlankProjectData (bool &cancelled, bool confirmOverwrites=true, QString *shortcutFileName=0)
void setWindowMenu (QPopupMenu *menu)
virtual bool acceptsSharedActions (QObject *w)
QWidget * findWindow (QWidget *w)
void updateAppCaption ()
void restoreWindowConfiguration (KConfig *config)
void storeWindowConfiguration (KConfig *config)
virtual bool queryClose ()
virtual bool queryExit ()
bool switchToViewMode (int viewMode)
void updateDialogViewGUIClient (KXMLGUIClient *viewClient)
void updateCustomPropertyPanelTabs (KexiDialogBase *prevDialog, int prevViewMode)
void updateCustomPropertyPanelTabs (KexiPart::Part *prevDialogPart, int prevViewMode, KexiPart::Part *curDialogPart, int curViewMode)
tristate openProjectInExternalKexiInstance (const QString &aFileName, KexiDB::ConnectionData *cdata, const QString &dbName)
tristate openProjectInExternalKexiInstance (const QString &aFileName, const QString &fileNameForConnectionData, const QString &dbName)

Friends

class KexiDialogBase

Constructor & Destructor Documentation

KexiMainWindowImpl::KexiMainWindowImpl (  ) 

Creates an empty mainwindow.

Definition at line 227 of file keximainwindowimpl.cpp.


Member Function Documentation

int KexiMainWindowImpl::create ( int  argc,
char *  argv[],
KAboutData *  aboutdata = 0 
) [static]

Used by the main kexi routine. Creates a new Kexi main window and a new KApplication object. kdemain() has to destroy the latter on exit.

Returns:
result 1 on error and 0 on success (the result can be used as a result of kdemain())

Todo:
switch GUIenabled off when needed

Definition at line 147 of file keximainwindowimpl.cpp.

static KexiMainWindowImpl* KexiMainWindowImpl::self (  )  [inline, static]

Returns:
KexiMainWindowImpl singleton (if it is instantiated)

Definition at line 60 of file keximainwindowimpl.h.

KexiProject * KexiMainWindowImpl::project (  )  [virtual]

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

Implements KexiMainWindow.

Definition at line 385 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::registerChild ( KexiDialogBase dlg  )  [virtual]

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

Implements KexiMainWindow.

Definition at line 2224 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::activateWindow ( int  id  ) 

Activates a window by it's document identifier.

Returns:
false if doc couldn't be raised or isn't opened.

Definition at line 2468 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::activateWindow ( KexiDialogBase dlg  ) 

Like above, using dlg passed explicitly. Above method just calls this one.

Definition at line 2480 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::startup (  ) 

Performs startup actions.

Returns:
false if application should exit immediately with an error status.

Definition at line 1256 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::userMode (  )  const [virtual]

Returns:
true if the application window is in the User Mode.

Implements KexiMainWindow.

Definition at line 4037 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::openingAllowed ( KexiPart::Item item,
int  viewMode 
)

Returns:
true if opening of item item in viewMode mode is allowed. userMode() is taken into account as well as KexiPart::Part::supportedUserViewModes() for item.

Todo:
this can be more complex once we deliver ACLs...

Definition at line 3582 of file keximainwindowimpl.cpp.

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

On mouse click on the findow, make sure it's focused and actions are invalidated

Definition at line 3407 of file keximainwindowimpl.cpp.

QPopupMenu * KexiMainWindowImpl::findPopupMenu ( const char *  popupName  )  [virtual]

Returns:
popup menu for popupName name.

Implements KexiMainWindow.

Definition at line 504 of file keximainwindowimpl.cpp.

KActionPtrList KexiMainWindowImpl::allActions (  )  const [virtual]

Implemented for KexiMainWindow.

Implements KexiMainWindow.

Definition at line 509 of file keximainwindowimpl.cpp.

KexiDialogBase * KexiMainWindowImpl::currentDialog (  )  const [virtual]

Returns:
currently active dialog (window) od 0 if there is no active dialog. Implemented for KexiMainWindow.

Implements KexiMainWindow.

Definition at line 514 of file keximainwindowimpl.cpp.

int KexiMainWindowImpl::generatePrivateID (  )  [virtual]

Todo:
move to kexiproject
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.

Implements KexiMainWindow.

Definition at line 3894 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::readProperties ( KConfig *  config  )  [virtual]

Reimplemented

Definition at line 2206 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::closeWindow ( KMdiChildView *  pWnd,
bool  layoutTaskBar = true 
) [virtual, slot]

Inherited from KMdiMainFrm: we need to do some tasks before child is closed. Just calls closeDialog(). Use closeDialog() if you need, not this one.

Definition at line 3063 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::addWindow ( KMdiChildView *  pView,
int  flags = KMdi::StandardAdd 
) [virtual, slot]

Reimplemented for internal reasons.

Todo:
Certain windows' sizes, e.g. forms could have own size configation specified! Query for this, and if so: give up.

Definition at line 4599 of file keximainwindowimpl.cpp.

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

Implemented for KexiMainWindow

Implements KexiMainWindow.

Definition at line 3194 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::closeDialog ( KexiDialogBase dlg,
bool  layoutTaskBar,
bool  doNotSaveChanges = false 
) [slot]

Internal implementation. If doNotSaveChanges is true, messages asking for saving the will be skipped and the changes will be dropped. This should not be usually used, maybe except for test suites (see kexi/tests/altertable/ directory).

Definition at line 3199 of file keximainwindowimpl.cpp.

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

Todo:
move part of this to KexiProject, because currently KexiProject::openObject() allows multiple opens!
Opens object pointed by item in a view viewMode. staticObjectArgs can be passed for static object (only works when part for this item is of type KexiPart::StaticPart). openingCancelled is set to true is opening has been cancelled. errorMessage, if not 0, points to a string that can be set to error message if one encountered.

Implements KexiMainWindow.

Definition at line 3602 of file keximainwindowimpl.cpp.

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

For convenience.

Implements KexiMainWindow.

Definition at line 3592 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::closeObject ( KexiPart::Item item  )  [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.

Implements KexiMainWindow.

Definition at line 3732 of file keximainwindowimpl.cpp.

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

Implemented for KexiMainWindow

Implements KexiMainWindow.

Definition at line 3155 of file keximainwindowimpl.cpp.

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

Implemented for KexiMainWindow

Implements KexiMainWindow.

Definition at line 3081 of file keximainwindowimpl.cpp.

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

Implemented for KexiMainWindow

Implements KexiMainWindow.

Definition at line 4623 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::openProject ( const KexiProjectData projectData  )  [slot]

Opens project pointed by projectData. Application state (e.g. actions) is updated. projectData is copied into a project structures.

Returns:
true on success

Todo:
temp.: change this if there are file-based drivers requiring a password

showDetailsButton

Definition at line 1287 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::openProject ( const QString &  aFileName,
KexiDB::ConnectionData cdata,
const QString &  dbName = QString::null,
const QValueList< KexiProjectData::ObjectInfo > &  autoopenObjects = QValueList<KexiProjectData::ObjectInfo>() 
) [slot]

Helper. Opens project pointed by aFileName. If aFileName is empty, a connection shortcut (.kexic file name) is obtained from global connection set using cdata (if present). In this case: If connection shortcut has been found and dbName (a server database name) is provided 'kexi --skip-dialog --connection file.kexic dbName' is executed (or the project is opened directly if there's no project opened in the current Kexi main window. If connection shortcut has been found and dbName is not provided, 'kexi --skip-dialog file.kexic' is executed (or the connection is opened directly if there's no porject opened in the current Kexi main window.

Todo:
caption arg?

Definition at line 2686 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::openProject ( const QString &  aFileName,
const QString &  fileNameForConnectionData,
const QString &  dbName = QString::null 
) [slot]

Helper. Opens project pointed by aFileName. Like above but fileNameForConnectionData can be passed instead of a pointer to connection data itself.

Returns:
false if fileNameForConnectionData is not empty but there is no such connection in Kexi::connset() for this filename. fileNameForConnectionData can be empty.

Definition at line 2669 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::createProjectFromTemplate ( const KexiProjectData projectData  )  [slot]

Creates a new project usign template pointed by projectData. Application state (e.g. actions) is updated. New project data is copied into a project structures.

Returns:
true on success

Definition at line 1352 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::closeProject (  )  [slot]

Closes current project,

Returns:
true on success. Application state (e.g. actions) is updated.

true on success. If closing was cancelled by user, cancelled is returned.

Definition at line 1598 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::printItem ( KexiPart::Item item  )  [virtual, slot]

Shows "print" dialog for item.

Returns:
true on success.

Implements KexiMainWindow.

Definition at line 4331 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::printPreviewForItem ( KexiPart::Item item  )  [virtual, slot]

Shows "print preview" dialog.

Returns:
true on success.

Todo:
store cached row data?

Implements KexiMainWindow.

Definition at line 4351 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::showPageSetupForItem ( KexiPart::Item item  )  [virtual, slot]

Shows "page setup" dialog for item.

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

Todo:
: check if changes to this object's design are saved, if not: ask for saving
Todo:
: accept row changes...

Implements KexiMainWindow.

Definition at line 4375 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::executeCustomActionForObject ( KexiPart::Item item,
const QString &  actionName 
) [virtual, slot]

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

Implements KexiMainWindow.

Definition at line 4294 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::projectOpened (  )  [signal]

Emitted after opening a project, even after slotAutoOpenObjectsLater().

bool KexiMainWindowImpl::initUserMode ( KexiProjectData projectData  )  [protected]

Initialises the User Mode: constructs window according to kexi__final database and loads the specified part.

Returns:
true on success or false if e.g. kexi__final does not exist or a fatal exception happened

Definition at line 4043 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::initNavigator (  )  [protected]

Creates navigator (if it's not yet created), lookups items for current project and fills the nav. with not-opened items

Definition at line 1716 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::initActions (  )  [protected]

reimplementation of events

Creates standard actions like new, open, save ...

Todo:
: change to "file_import" or so

Todo:
: change to "file_export" or so

Todo:
d->action_edit_replace = KStdAction::replace( this, SLOT(slotEditReplace()), actionCollection(), "project_print_preview" );

Todo:
d->action_edit_replace_all = new KAction( i18n("Replace All"), "", 0, this, SLOT(slotEditReplaceAll()), actionCollection(), "edit_replaceall");

Todo:
shouldn't we move this to core?

Todo:
unused for now

Todo:
support this in KexiPart::FormObjectType as well

Todo:
support this in KexiPart::FormObjectType as well

Todo:
support this in KexiPart::FormObjectType as well

Todo:
support this in KexiPart::FormObjectType as well

Todo:
support this in FormObjectType as well

Todo:
support this in FormObjectType, ReportObjectType as well as others

Todo:
support this in FormObjectType, ReportObjectType as well as others

Todo:
support this in FormObjectType, ReportObjectType as well as others

Todo:
support this in KexiPart::TableObjectType, KexiPart::QueryObjectType later

Todo:
support this in KexiPart::TableObjectType, KexiPart::QueryObjectType, KexiPart::FormObjectType later

Todo:
support this in KexiPart::TableObjectType, KexiPart::QueryObjectType, KexiPart::FormObjectType later

Definition at line 519 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::initUserActions (  )  [protected]

Creates user project-wide actions

Definition at line 4126 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::restoreSettings (  )  [protected]

Sets up the window from user settings (e.g. mdi mode).

Definition at line 2009 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::storeSettings (  )  [protected]

Writes user settings back.

Definition at line 2104 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::invalidateActions (  )  [protected]

Invalidates availability of all actions for current application state.

Definition at line 1115 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::invalidateSharedActions ( QObject *  o  )  [protected, virtual]

Invalidates action availability for current application state. These actions are dependent on curently selected dialog.

Reimplemented from KexiSharedActionHost.

Definition at line 1121 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::invalidateProjectWideActions (  )  [protected]

Invalidates action availability for current application state. These actions only depend on project availability, not on curently selected dialog.

Todo:
"copy special" is currently enabled only for data view mode; what about allowing it to enable in design view for "kexi/table" ?

Definition at line 1144 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::invalidateViewModeActions (  )  [protected]

Invalidates action availability for current application state. These actions only depend on curently selected dialog and currently selected view (KexiViewBase derived object) within this dialog.

Definition at line 1237 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::createBlankProject (  )  [protected]

Shows dialog for creating new blank project, and creates one. Dialog is not shown if option for automatic creation is checked or Kexi::startupHandler().projectData() was provided from command line. cancelled is set to true if creation has been cancelled (e.g. user answered no when asked for database overwriting, etc.

Returns:
true if database was created, false on error or when cancel was pressed

Definition at line 2630 of file keximainwindowimpl.cpp.

KexiProjectData * KexiMainWindowImpl::createBlankProjectData ( bool &  cancelled,
bool  confirmOverwrites = true,
QString *  shortcutFileName = 0 
) [protected]

Shows dialog for creating new blank project, and return a data describing it. It the dialog was cancelled, cancelled will be set to true (false otherwise). shortcutFileName, if not 0, will be set to a shortcut filename (in case when server database project was selected).

Definition at line 2591 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::acceptsSharedActions ( QObject *  w  )  [protected, virtual]

Returns:
focused kexi window (KexiDialogBase or KexiDockBase subclass)
Reimplemented from KexiSharedActionHost: accepts only KexiDockBase and KexiDialogBase subclasses.

Reimplemented from KexiSharedActionHost.

Definition at line 3402 of file keximainwindowimpl.cpp.

QWidget * KexiMainWindowImpl::findWindow ( QWidget *  w  )  [protected]

Performs lookup like in KexiSharedActionHost::focusWindow() but starting from w instead of a widget returned by QWidget::focusWidget().

Returns:
NULL if no widget matches acceptsSharedActions() or if w is NULL.

Definition at line 3395 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::updateAppCaption (  )  [protected]

Updates application's caption - also shows project's name.

Definition at line 1896 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::switchToViewMode ( int  viewMode  )  [protected]

Helper: switches to view mode.

Definition at line 3001 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::updateDialogViewGUIClient ( KXMLGUIClient *  viewClient  )  [protected]

Helper. Removes and/or adds GUI client for current dialog's view; on switching to other dialog (activeWindowChanged()) or on switching to other view within the same dialog (switchToViewMode()).

Definition at line 2251 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::updateCustomPropertyPanelTabs ( KexiDialogBase prevDialog,
int  prevViewMode 
) [protected]

Helper. Updates setup of property panel's tabs. Used when switching from prevDialog dialog to a current dialog.

Definition at line 2273 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::updateCustomPropertyPanelTabs ( KexiPart::Part prevDialogPart,
int  prevViewMode,
KexiPart::Part curDialogPart,
int  curViewMode 
) [protected]

Definition at line 2283 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::openProjectInExternalKexiInstance ( const QString &  aFileName,
KexiDB::ConnectionData cdata,
const QString &  dbName 
) [protected]

Used in openProject when running another Kexi process is required.

Definition at line 2749 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::openProjectInExternalKexiInstance ( const QString &  aFileName,
const QString &  fileNameForConnectionData,
const QString &  dbName 
) [protected]

Used in openProject when running another Kexi process is required.

Todo:
use KRun

Definition at line 2760 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotAutoOpenObjectsLater (  )  [protected, slot]

Called once after timeout (after ctors are executed).

Definition at line 1431 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::activeWindowChanged ( KMdiChildView *  dlg  )  [protected, slot]

This slot is called if a window changes

Definition at line 2337 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::childClosed ( KMdiChildView *  dlg  )  [protected, slot]

Tthis slot is called if a window gets colsed and will unregister stuff

Definition at line 2492 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotCaptionForCurrentMDIChild ( bool  childrenMaximized  )  [protected, slot]

internal

Definition at line 1867 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::createKexiProject ( KexiProjectData new_data  )  [protected, slot]

internal - creates and initializes kexi project

Definition at line 2578 of file keximainwindowimpl.cpp.

KexiDialogBase * KexiMainWindowImpl::openObjectFromNavigator ( KexiPart::Item item,
int  viewMode,
bool &  openingCancelled 
) [protected, slot]

Handles event when user double clicked (or single -depending on settings) or pressed Return key on the part item in the navigator. This differs from openObject() signal in that if the object is already opened in view mode other than viewMode, the mode is not changed.

See also:
KexiBrowser::openOrActivateItem()

Definition at line 3692 of file keximainwindowimpl.cpp.

KexiDialogBase * KexiMainWindowImpl::openObjectFromNavigator ( KexiPart::Item item,
int  viewMode 
) [protected, slot]

For convenience.

Definition at line 3685 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::newObject ( KexiPart::Info info,
bool &  openingCancelled 
) [protected, 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.

Implements KexiMainWindow.

Definition at line 3749 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::newObject ( KexiPart::Info info  )  [inline, protected, slot]

For convenience.

Definition at line 373 of file keximainwindowimpl.h.

KexiDialogBase* KexiMainWindowImpl::openObject ( KexiPart::Item item,
int  viewMode,
QMap< QString, QString > *  staticObjectArgs = 0 
) [inline, protected, slot]

For convenience.

Definition at line 379 of file keximainwindowimpl.h.

tristate KexiMainWindowImpl::removeObject ( KexiPart::Item item,
bool  dontAsk = false 
) [protected, slot]

Removes object pointed by item from current project. Asks for confirmation.

Returns:
true on success or cancelled if removing was cancelled (only possible if dontAsk is false).

Definition at line 3777 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::renameObject ( KexiPart::Item item,
const QString &  _newName,
bool &  succes 
) [protected, slot]

Renames object pointed by item to a new name _newName. Sets success to false on failure. Used as a slot connected to KexiBrowser::renameItem() signal.

Definition at line 3851 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotObjectRenamed ( const KexiPart::Item item,
const QCString &  oldName 
) [protected, virtual, slot]

Reaction for object rename (signalled by KexiProject). If this item has opened dialog, it's caption is updated, and also optionally application's caption.

Implements KexiMainWindow.

Definition at line 3875 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::updateReadOnlyState (  )  [protected, slot]

Updates the statusbar, navigator and "Insert->....." actions, dependent on read-only state.

Only called on project opening and closing.

Definition at line 1416 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotProjectNew (  )  [protected, slot]

Todo:
use KProcess?

Definition at line 2531 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotProjectImportDataTable (  )  [protected, slot]

Todo:
allow data appending (it is not possible now)

Definition at line 4279 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotEditPasteSpecialDataTable (  )  [protected, slot]

Todo:
allow data appending (it is not possible now)

Definition at line 4511 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotEditFind ( bool  next  )  [protected, slot]

helper

Todo:
result

Definition at line 4540 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotEditReplace ( bool  all  )  [protected, slot]

helper

Todo:
add question: "Do you want to replace every occurence of \"1\" with \"2\"? You won't be able to undo this." + "Do not ask again".

Todo:
result

Definition at line 4580 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotEditReplace (  )  [protected, slot]

Todo:
slotEditReplace()

Definition at line 4563 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotViewTextMode (  )  [protected, slot]

sometimes called "SQL View"

Definition at line 3058 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotToolsCompactDatabase (  )  [protected, slot]

Todo:
add support for server based if needed?

Definition at line 4153 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotGetNewStuff (  )  [protected, slot]

TMP: Display a dialog to download db examples from internet.

TMP (until there's true template support).

Definition at line 4612 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::importantInfo ( bool  onStartup  )  [protected, slot]

Shows 'important info' dialog, is onStartup is false, it's always shown.

Definition at line 3977 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotImportantInfo (  )  [protected, slot]

just importantInfo(false);

Definition at line 3951 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotLastActions (  )  [protected, slot]

There are performed all actions that need to be done immediately after ctro (using timer).

Definition at line 1778 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::acceptPropertySetEditing (  )  [protected, virtual, slot]

Called to accept property butter editing.

Implements KexiMainWindow.

Definition at line 3899 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::propertySetSwitched ( KexiDialogBase dlg,
bool  force = false,
bool  preservePrevSelection = true,
const QCString &  propertyToSelect = QCString() 
) [protected, 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).

Implements KexiMainWindow.

Definition at line 3905 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotDirtyFlagChanged ( KexiDialogBase dlg  )  [protected, slot]

Handles changes in 'dirty' flag for dialogs.

Definition at line 3928 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::switchToIDEAlMode (  )  [protected, virtual, slot]

reimplemented to add "restart is required" message box

Definition at line 450 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::showProjectMigrationWizard ( const QString &  mimeType,
const QString &  databaseName,
const KexiDB::ConnectionData cdata = 0 
) [protected, slot]

Shows Project Migration Wizard.

Returns:
true on successful migration, cancelled on cancellation, and false on failure. If mimeType and databaseName are not empty, the wizard will only ask about parameters of destination project and skip pages related to source project. cdata connection data can be also provided to preselect server-based connections.

Definition at line 4221 of file keximainwindowimpl.cpp.

void KexiMainWindowImpl::slotPartItemSelectedInNavigator ( KexiPart::Item item  )  [protected, slot]

Receives "selectionChanged()" signal from navigator to update some actions.

Definition at line 4636 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::executeItem ( KexiPart::Item item  )  [protected, slot]

Receives the "executeItem" signal from navigator to perform "execute" action on item.

Returns:
true on success

Definition at line 4268 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::exportItemAsDataTable ( KexiPart::Item item  )  [protected, slot]

Shows "exports as data table" dialog for item.

Todo:
: check if changes to this are saved, if not: ask for saving
Todo:
: accept row changes...

Definition at line 4307 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::copyItemToClipboardAsDataTable ( KexiPart::Item item  )  [protected, slot]

Shows "copy special as data table" dialog for item.

Definition at line 4494 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::printItem ( KexiPart::Item item,
const QString &  titleText 
) [protected, slot]

Shows "print" dialog for item.

Returns:
true on success.

Definition at line 4326 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::printItem ( KexiPart::Item item,
const KexiSimplePrintingSettings settings,
const QString &  titleText = QString::null 
) [protected, slot]

Shows "print" dialog for item and settings.

Returns:
true on success.

Todo:
: check if changes to this object's design are saved, if not: ask for saving
Todo:
: accept row changes...

Definition at line 4336 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::printPreviewForItem ( KexiPart::Item item,
const QString &  titleText,
bool  reload 
) [protected, slot]

Shows "print preview" dialog for item. The preview dialog is cached, so reload == true is sometimes needed if data or print settings have changed in the meantime.

Returns:
true on success.

Definition at line 4346 of file keximainwindowimpl.cpp.

bool KexiMainWindowImpl::printPreviewForItem ( KexiPart::Item item,
const KexiSimplePrintingSettings settings,
const QString &  titleText = QString::null,
bool  reload = false 
) [protected, slot]

Shows "print preview" dialog.

Returns:
true on success.

Todo:
: check if changes to this object's design are saved, if not: ask for saving
Todo:
: accept row changes...

Definition at line 4358 of file keximainwindowimpl.cpp.

tristate KexiMainWindowImpl::printActionForItem ( KexiPart::Item item,
PrintActionType  action 
) [protected, slot]

Implemented for KexiMainWindow. Helper for printItem() and printPreviewForItem(). Also used by KexiFormEventAction.

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

Definition at line 4382 of file keximainwindowimpl.cpp.


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