KoMainWindow Class Reference
Main window for a KOffice application. More...
#include <koMainWindow.h>
Public Slots | |
void | slotEmailFile () |
virtual void | slotFileNew () |
virtual void | slotFileOpen () |
virtual void | slotFileOpenRecent (const KURL &) |
virtual void | slotFileSave () |
virtual void | slotFileSaveAs () |
virtual void | slotFilePrint () |
void | slotFilePrintPreview () |
virtual void | slotDocumentInfo () |
virtual void | slotFileClose () |
virtual void | slotFileQuit () |
virtual void | slotConfigureKeys () |
virtual void | slotConfigureToolbars () |
virtual void | slotNewToolbarConfig () |
virtual void | slotToolbarToggled (bool toggle) |
virtual void | slotSplitView () |
virtual void | slotRemoveView () |
virtual void | slotSetOrientation () |
virtual void | slotCloseAllViews () |
void | slotReloadFile () |
void | slotVersionsFile () |
void | slotImportFile () |
void | slotExportFile () |
Signals | |
void | documentSaved () |
void | saveDialogShown () |
Public Member Functions | |
KoMainWindow (KInstance *instance, const char *_name=0) | |
~KoMainWindow () | |
virtual void | setRootDocument (KoDocument *doc) |
virtual void | updateCaption () |
virtual KoDocument * | rootDocument () const |
virtual KoView * | rootView () const |
virtual KParts::PartManager * | partManager () |
void | print (bool quick) |
void | showToolbar (const char *tbName, bool shown) |
bool | toolbarIsVisible (const char *tbName) |
QLabel * | statusBarLabel () |
void | setMaxRecentItems (uint _number) |
void | addRecentURL (const KURL &url) |
virtual bool | openDocument (const KURL &url) |
bool | openDocument (KoDocument *newdoc, const KURL &url) |
virtual DCOPObject * | dcopObject () |
void | reloadRecentFileList () |
virtual void | updateCaption (const QString caption, bool mod) |
void | updateReloadFileAction (KoDocument *doc) |
void | updateVersionsFileAction (KoDocument *doc) |
Protected Slots | |
virtual void | slotActivePartChanged (KParts::Part *newPart) |
Protected Member Functions | |
void | chooseNewDocument (intinitDocFlags) |
void | setRootDocumentDirect (KoDocument *doc, const QPtrList< KoView > &views) |
virtual KoDocument * | createDoc () const |
virtual bool | saveDocument (bool saveas=false, bool silent=false) |
virtual void | closeEvent (QCloseEvent *e) |
virtual void | resizeEvent (QResizeEvent *e) |
virtual bool | queryClose () |
virtual bool | openDocumentInternal (const KURL &url, KoDocument *newdoc=0L) |
bool | isExporting () const |
bool | isImporting () const |
void | saveRecentFiles () |
KRecentFilesAction * | recentAction () const |
Detailed Description
Main window for a KOffice application.This class is used to represent a main window of a KOffice component. Each main window contains a menubar and some toolbars.
- Note:
- This class does NOT need to be subclassed in your application.
Definition at line 50 of file koMainWindow.h.
Constructor & Destructor Documentation
|
Constructor. Initializes a KOffice main window (with its basic GUI etc.). Definition at line 162 of file koMainWindow.cc. References slotCloseAllViews(), slotConfigureKeys(), slotConfigureToolbars(), slotDocumentInfo(), slotEmailFile(), slotExportFile(), slotFileClose(), slotFileNew(), slotFileOpen(), slotFileOpenRecent(), slotFilePrint(), slotFilePrintPreview(), slotFileQuit(), slotFileSave(), slotFileSaveAs(), slotImportFile(), slotReloadFile(), slotSplitView(), and slotVersionsFile(). Referenced by chooseNewDocument(). |
|
Destructor.
Definition at line 290 of file koMainWindow.cc. |
Member Function Documentation
|
Called when a document is assigned to this mainwindow. This creates a view for this document, makes it the active part, etc. Definition at line 320 of file koMainWindow.cc. References updateCaption(). Referenced by chooseNewDocument(), KoView::newView(), openDocument(), slotCloseAllViews(), slotFileClose(), slotReloadFile(), and KoApplication::start(). |
|
Update caption from document info - call when document info (title in the about page) changes.
Definition at line 458 of file koMainWindow.cc. References rootDocument(). Referenced by openDocument(), and setRootDocument(). |
|
Retrieves the document that is displayed in the mainwindow.
Definition at line 493 of file koMainWindow.cc. Referenced by chooseNewDocument(), queryClose(), saveDocument(), slotConfigureKeys(), slotConfigureToolbars(), slotDocumentInfo(), slotEmailFile(), slotNewToolbarConfig(), slotReloadFile(), slotToolbarToggled(), and updateCaption(). |
|
Prints the document.
Definition at line 1142 of file koMainWindow.cc. Referenced by slotFilePrint(), and KoApplication::start(). |
|
The application should call this to show or hide a toolbar. It also takes care of the corresponding action in the settings menu. Definition at line 1288 of file koMainWindow.cc. |
|
Definition at line 1282 of file koMainWindow.cc. |
|
Get hold of the label in the statusbar, to write messages to it. You can also insert other items in the status bar by using QStatusBar::addWidget. Definition at line 1516 of file koMainWindow.cc. |
|
Sets the maximum number of recent documents entries.
Definition at line 1526 of file koMainWindow.cc. |
|
The document opened a URL -> store into recent documents list.
Definition at line 401 of file koMainWindow.cc. References saveRecentFiles(). Referenced by saveDocument(). |
|
Load the desired document and show it.
Definition at line 510 of file koMainWindow.cc. References saveRecentFiles(). Referenced by slotFileOpen(), slotFileOpenRecent(), slotReloadFile(), and KoApplication::start(). |
|
Load the URL into this document (and make it root doc after loading). Special method for KoApplication::start, don't use. Definition at line 523 of file koMainWindow.cc. References KoDocument::checkAutoSaveFile(), KoDocument::initDoc(), setRootDocument(), and updateCaption(). |
|
Reloads the recent documents list.
Definition at line 445 of file koMainWindow.cc. |
|
Updates the window caption based on the document info and path.
Definition at line 487 of file koMainWindow.cc. |
|
This signal is emitted if the document has been saved successfully.
Referenced by slotFileSave(), and slotFileSaveAs(). |
|
This signals is emmitted before the save dialog is shown.
Referenced by saveDocument(). |
|
Slot for eMailing the document using KMail. This is a very simple extension that will allow any document that is currently being edited to be emailed using KMail. Definition at line 1541 of file koMainWindow.cc. References rootDocument(), and saveDocument(). Referenced by KoMainWindow(). |
|
Slot for opening a new document. If the current document is empty, the new document replaces it. If not, a new shell will be opened for showing the document. Definition at line 1056 of file koMainWindow.cc. References chooseNewDocument(). Referenced by KoMainWindow(). |
|
Slot for opening a saved file. If the current document is empty, the opened document replaces it. If not a new shell will be opened for showing the opened file. Definition at line 1061 of file koMainWindow.cc. References isImporting(), KoFilterManager::mimeFilter(), openDocument(), KoDocument::readExtraNativeMimeTypes(), and KoDocument::readNativeFormatMimeType(). Referenced by KoMainWindow(), and slotImportFile(). |
|
Slot for opening a file among the recently opened files. If the current document is empty, the opened document replaces it. If not a new shell will be opened for showing the opened file. Definition at line 1087 of file koMainWindow.cc. References openDocument(). Referenced by KoMainWindow(). |
|
Saves the current document with the current name.
Definition at line 1092 of file koMainWindow.cc. References documentSaved(), and saveDocument(). Referenced by KoMainWindow(). |
|
Saves the current document with a new name.
Definition at line 1098 of file koMainWindow.cc. References documentSaved(), and saveDocument(). Referenced by KoMainWindow(), and slotExportFile(). |
|
Prints the actual document.
Definition at line 1177 of file koMainWindow.cc. References print(). Referenced by KoMainWindow(). |
|
Show a print preview.
Definition at line 1182 of file koMainWindow.cc. Referenced by KoMainWindow(). |
|
Show a dialog with author and document information.
Definition at line 1104 of file koMainWindow.cc. References rootDocument(). Referenced by KoMainWindow(). |
|
Closes the document.
Definition at line 1125 of file koMainWindow.cc. References chooseNewDocument(), queryClose(), and setRootDocument(). Referenced by KoMainWindow(). |
|
Closes the shell.
Definition at line 1137 of file koMainWindow.cc. Referenced by KoMainWindow(). |
|
Configure key bindings.
Definition at line 1217 of file koMainWindow.cc. References rootDocument(). Referenced by KoMainWindow(). |
|
Configure toolbars.
Definition at line 1233 of file koMainWindow.cc. References rootDocument(), and slotNewToolbarConfig(). Referenced by KoMainWindow(). |
|
Post toolbar config. (Plug action lists back in, etc.) Definition at line 1242 of file koMainWindow.cc. References rootDocument(). Referenced by slotConfigureToolbars(). |
|
Shows or hides a toolbar.
Definition at line 1263 of file koMainWindow.cc. References rootDocument(). |
|
View splitting stuff.
Definition at line 1312 of file koMainWindow.cc. Referenced by KoMainWindow(). |
|
Close all views.
Definition at line 1322 of file koMainWindow.cc. References queryClose(), and setRootDocument(). Referenced by KoMainWindow(). |
|
Reload file.
Definition at line 1601 of file koMainWindow.cc. References KoDocument::isEmpty(), KoDocument::isModified(), openDocument(), rootDocument(), and setRootDocument(). Referenced by KoMainWindow(). |
|
This will call a dialogbox to add version to list of files.
Definition at line 1594 of file koMainWindow.cc. Referenced by KoMainWindow(). |
|
File --> Import. This will call slotFileOpen(). To differentiate this from an ordinary call to slotFileOpen() call isImporting(). Definition at line 1626 of file koMainWindow.cc. References slotFileOpen(). Referenced by KoMainWindow(). |
|
File --> Export. This will call slotFileSaveAs(). To differentiate this from an ordinary call to slotFileSaveAs() call isExporting(). Definition at line 1635 of file koMainWindow.cc. References slotFileSaveAs(). Referenced by KoMainWindow(). |
|
Helper method for slotFileNew and slotFileClose.
Definition at line 1026 of file koMainWindow.cc. References createDoc(), KoDocument::documentList(), KoDocument::isEmpty(), KoMainWindow(), rootDocument(), and setRootDocument(). Referenced by slotFileClose(), and slotFileNew(). |
|
Special method for KOShell, to allow switching the root document (and its views) among a set of them.
Definition at line 386 of file koMainWindow.cc. |
|
Create a new empty document.
Definition at line 451 of file koMainWindow.cc. References KoDocumentEntry::createDoc(), KoDocumentEntry::queryByMimeType(), and KoDocument::readNativeFormatMimeType(). Referenced by chooseNewDocument(). |
|
|
Ask user about saving changes to the document upon exit.
Definition at line 966 of file koMainWindow.cc. References rootDocument(), and saveDocument(). Referenced by slotCloseAllViews(), and slotFileClose(). |
|
Returns whether or not the current slotFileSave[As]() or saveDocument() call is actually an export operation (like File --> Export). If this is true, you must call KoDocument::export() instead of KoDocument::save() or KoDocument::saveAs(), in any reimplementation of saveDocument(). Definition at line 1649 of file koMainWindow.cc. Referenced by saveDocument(). |
|
Returns whether or not the current slotFileOpen() or openDocument() call is actually an import operation (like File --> Import). If this is true, you must call KoDocument::import() instead of KoDocument::openURL(), in any reimplementation of openDocument() or openDocumentInternal(). Definition at line 1644 of file koMainWindow.cc. Referenced by slotFileOpen(). |
|
Save the list of recent files.
Definition at line 428 of file koMainWindow.cc. Referenced by addRecentURL(), and openDocument(). |
The documentation for this class was generated from the following files: