KoMainWindow Class Reference
This class is used to represent a main window of a KOffice component. 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 | slotImportFile () |
void | slotExportFile () |
Signals | |
void | documentSaved () |
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 () |
void | updateCaption (const QString caption, bool mod) |
void | updateReloadFileAction (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 | exportConfirmation (const QCString &outputFormat, const QCString &nativeFormat) |
virtual void | closeEvent (QCloseEvent *e) |
virtual void | resizeEvent (QResizeEvent *e) |
virtual bool | queryClose () |
virtual bool | openDocumentInternal (const KURL &url, KoDocument *newdoc=0L) |
void | saveRecentFiles () |
bool | isExporting () const |
bool | isImporting () const |
KRecentFilesAction * | recentAction () const |
Detailed Description
This class is used to represent a main window of a KOffice component. Main window for a KOffice application.Each main window contains a menubar and some toolbars.
This class does NOT need to be subclassed in your application.
Definition at line 49 of file koMainWindow.h.
Constructor & Destructor Documentation
|
Constructor. Initializes a KOffice main window (with its basic GUI etc.). Definition at line 222 of file koMainWindow.cc. References slotCloseAllViews(), slotConfigureKeys(), slotConfigureToolbars(), slotDocumentInfo(), slotEmailFile(), slotExportFile(), slotFileClose(), slotFileNew(), slotFileOpen(), slotFileOpenRecent(), slotFilePrint(), slotFilePrintPreview(), slotFileQuit(), slotFileSave(), slotFileSaveAs(), slotImportFile(), slotReloadFile(), and slotSplitView(). Referenced by chooseNewDocument(). |
|
Destructor.
Definition at line 348 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 378 of file koMainWindow.cc. References KoDocument::addShell(), KoDocument::createView(), KoDocument::removeShell(), updateCaption(), and KoDocument::viewCount(). Referenced by chooseNewDocument(), KoView::newView(), slotCloseAllViews(), slotFileClose(), slotReloadFile(), and KoApplication::start(). |
|
Update caption from document info - call when document info (title in the about page) changes.
Definition at line 509 of file koMainWindow.cc. References KoDocument::documentInfo(), KoDocument::isCurrent(), and rootDocument(). Referenced by setRootDocument(). |
|
Retrieves the document that is displayed in the mainwindow.
Definition at line 540 of file koMainWindow.cc. Referenced by chooseNewDocument(), queryClose(), saveDocument(), slotConfigureKeys(), slotConfigureToolbars(), slotDocumentInfo(), slotNewToolbarConfig(), slotReloadFile(), slotToolbarToggled(), and updateCaption(). |
|
Prints the document.
Definition at line 1164 of file koMainWindow.cc. References KoDocument::documentInfo(), KoView::koDocument(), KoView::print(), and KoView::setupPrinter(). 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 1310 of file koMainWindow.cc. |
|
Definition at line 1304 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 1537 of file koMainWindow.cc. |
|
Sets the maximum number of recent documents entries.
Definition at line 1547 of file koMainWindow.cc. |
|
The document opened a URL -> store into recent documents list.
Definition at line 452 of file koMainWindow.cc. References saveRecentFiles(). Referenced by saveDocument(). |
|
Load the desired document and show it.
Definition at line 557 of file koMainWindow.cc. Referenced by 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 563 of file koMainWindow.cc. |
|
Reloads the recent documents list.
Definition at line 496 of file koMainWindow.cc. |
|
Updates the window caption based on the document info and path.
Definition at line 534 of file koMainWindow.cc. |
|
This signal is emitted if the document has been saved successfully.
Referenced by slotFileSave(), and slotFileSaveAs(). |
|
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 1562 of file koMainWindow.cc. References 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 1079 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 1084 of file koMainWindow.cc. References isImporting(). 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 1107 of file koMainWindow.cc. References openDocument(). Referenced by KoMainWindow(). |
|
Saves the current document with the current name.
Definition at line 1112 of file koMainWindow.cc. References documentSaved(), and saveDocument(). Referenced by KoMainWindow(). |
|
Saves the current document with a new name.
Definition at line 1118 of file koMainWindow.cc. References documentSaved(), and saveDocument(). Referenced by KoMainWindow(), and slotExportFile(). |
|
Prints the actual document.
Definition at line 1199 of file koMainWindow.cc. References print(). Referenced by KoMainWindow(). |
|
Show a print preview.
Definition at line 1204 of file koMainWindow.cc. References KoView::print(), and KoView::setupPrinter(). Referenced by KoMainWindow(). |
|
Show a dialog with author and document information.
Definition at line 1124 of file koMainWindow.cc. References KoDocument::documentInfo(), rootDocument(), KoDocument::setModified(), and KoDocument::setTitleModified(). Referenced by KoMainWindow(). |
|
Closes the document.
Definition at line 1145 of file koMainWindow.cc. References chooseNewDocument(), queryClose(), and setRootDocument(). Referenced by KoMainWindow(). |
|
Closes the shell.
Definition at line 1157 of file koMainWindow.cc. References queryClose(). Referenced by KoMainWindow(). |
|
Configure key bindings.
Definition at line 1239 of file koMainWindow.cc. References rootDocument(). Referenced by KoMainWindow(). |
|
Configure toolbars.
Definition at line 1255 of file koMainWindow.cc. References rootDocument(), and slotNewToolbarConfig(). Referenced by KoMainWindow(). |
|
Post toolbar config. (Plug action lists back in, etc.) Definition at line 1264 of file koMainWindow.cc. References rootDocument(). Referenced by slotConfigureToolbars(). |
|
Shows or hides a toolbar.
Definition at line 1285 of file koMainWindow.cc. References rootDocument(). |
|
View splitting stuff.
Definition at line 1334 of file koMainWindow.cc. Referenced by KoMainWindow(). |
|
Close all views.
Definition at line 1344 of file koMainWindow.cc. References queryClose(), and setRootDocument(). Referenced by KoMainWindow(). |
|
Reload file.
Definition at line 1587 of file koMainWindow.cc. References KoDocument::isEmpty(), KoDocument::isModified(), openDocument(), rootDocument(), and setRootDocument(). Referenced by KoMainWindow(). |
|
File --> Import. This will call slotFileOpen(). To differentiate this from an ordinary call to slotFileOpen() call isImporting(). Definition at line 1612 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 1621 of file koMainWindow.cc. References slotFileSaveAs(). Referenced by KoMainWindow(). |
|
Helper method for slotFileNew and slotFileClose.
Definition at line 1050 of file koMainWindow.cc. References createDoc(), KoDocument::initDoc(), KoDocument::isEmbedded(), KoDocument::isEmpty(), KoMainWindow(), rootDocument(), KoDocument::setInitDocFlags(), 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 437 of file koMainWindow.cc. |
|
Create a new empty document.
Definition at line 502 of file koMainWindow.cc. References KoDocumentEntry::createDoc(), KoDocumentEntry::queryByMimeType(), and KoDocument::readNativeFormatMimeType(). Referenced by chooseNewDocument(). |
|
Saves the document, asking for a filename if necessary.
Definition at line 703 of file koMainWindow.cc. References addRecentURL(), KoDocument::confirmNonNativeSave(), KoDocument::exp0rt(), exportConfirmation(), KoDocument::file(), KoDocument::isEmpty(), isExporting(), KoFilterManager::mimeFilter(), KoDocument::mimeType(), KoDocument::nativeFormatMimeType(), KoDocument::outputMimeType(), rootDocument(), KoDocument::setFile(), KoDocument::setModified(), KoDocument::setOutputMimeType(), KoDocument::setTitleModified(), KoDocument::setURL(), and KoDocument::specialOutputFlag(). Referenced by queryClose(), slotEmailFile(), slotFileSave(), and slotFileSaveAs(). |
|
Asks the user if they really want to save the document if outputFormat != nativeFormat. If outputFormat == nativeFormat, no dialog is shown and it is assumed that the user wishes to save.
Definition at line 655 of file koMainWindow.cc. References isExporting(). Referenced by saveDocument(). |
|
Ask user about saving changes to the document upon exit.
Definition at line 990 of file koMainWindow.cc. References KoDocument::documentInfo(), KoDocument::removeAutoSaveFiles(), rootDocument(), saveDocument(), KoDocument::setModified(), and KoDocument::shellCount(). Referenced by slotCloseAllViews(), slotFileClose(), and slotFileQuit(). |
|
Save the list of recent files.
Definition at line 479 of file koMainWindow.cc. Referenced by addRecentURL(). |
|
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 1635 of file koMainWindow.cc. Referenced by exportConfirmation(), and saveDocument(). |
|
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 1630 of file koMainWindow.cc. Referenced by slotFileOpen(). |
The documentation for this class was generated from the following files: