KSync Class Reference
The base class for KSync application windows. More...
#include <ksync.h>
Public Slots | |
void | slotFileNewWindow () |
open a new application window by creating a new instance of KSyncApp | |
void | slotFileNew () |
clears the document in the actual view to reuse it as the new document | |
void | slotFileOpen () |
open a file and load it into the document | |
void | slotFileOpenRecent (const KURL &url) |
opens a file from the recent files menu | |
void | slotFileSave () |
save a document | |
void | slotFileSaveAs () |
save a document by a new filename | |
void | slotFileClose () |
asks for saving if the file is modified, then closes the actual file and window | |
void | slotFilePrint () |
print the actual file | |
void | slotFileQuit () |
closes all open windows by calling close() on each memberList item until the list is empty, then quits the application. | |
void | slotEditCut () |
put the marked text/object into the clipboard and remove it from the document | |
void | slotEditCopy () |
put the marked text/object into the clipboard | |
void | slotEditPaste () |
paste the clipboard into the document | |
void | slotViewToolBar () |
toggles the toolbar | |
void | slotViewStatusBar () |
toggles the statusbar | |
void | slotStatusMsg (const QString &text) |
changes the statusbar contents for the standard label permanently, used to indicate current actions. | |
Public Member Functions | |
KSync (QWidget *parent=0, const char *name=0) | |
construtor of KSyncApp, calls all init functions to create the application. | |
void | openDocumentFile (const KURL &url=0) |
opens a file specified by commandline option | |
Protected Member Functions | |
void | saveOptions () |
save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration file | |
void | readOptions () |
read general Options again and initialize all variables like the recent file list | |
void | initActions () |
initializes the KActions of the application | |
void | initStatusBar () |
sets up the statusbar for the main window by initialzing a statuslabel. | |
void | initView () |
creates the centerwidget of the KTMainWindow instance and sets it as the view | |
virtual bool | queryClose () |
queryClose is called by KTMainWindow on each closeEvent of a window. | |
virtual bool | queryExit () |
queryExit is called by KTMainWindow when the last window of the application is going to be closed during the closeEvent(). | |
virtual void | saveProperties (KConfig *_cfg) |
saves the window properties for each open window during session end to the session config file, including saving the currently opened file by a temporary filename provided by KApplication. | |
virtual void | readProperties (KConfig *_cfg) |
reads the session config file and restores the application's state including the last opened files and documents by reading the temporary files saved by saveProperties() |
Detailed Description
The base class for KSync application windows.It sets up the main window and reads the config file as well as providing a menubar, toolbar and statusbar. An instance of KSyncView creates your center view, which is connected to the window's Doc object. KSyncApp reimplements the methods that KMainWindow provides for main window handling and supports full session management as well as using KActions.
- See also:
- KMainWindow
KApplication
KConfig
- Author:
- Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
- Version:
- KDevelop version 1.2 code generation
Definition at line 26 of file ksync.h.
Constructor & Destructor Documentation
|
construtor of KSyncApp, calls all init functions to create the application.
Definition at line 20 of file ksync.cpp. References initActions(), initStatusBar(), initView(), and readOptions(). Referenced by slotFileNewWindow(). |
Member Function Documentation
|
opens a file specified by commandline option
Definition at line 94 of file ksync.cpp. References slotStatusMsg(). |
|
save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration file
Definition at line 104 of file ksync.cpp. References KSyncView::writeConfig(). Referenced by queryExit(), and slotFileQuit(). |
|
read general Options again and initialize all variables like the recent file list
Definition at line 117 of file ksync.cpp. References QSize::isEmpty(), KSyncView::readConfig(), slotViewStatusBar(), and slotViewToolBar(). Referenced by KSync(). |
|
initializes the KActions of the application
Definition at line 44 of file ksync.cpp. References slotEditCopy(), slotEditCut(), slotEditPaste(), slotFileClose(), slotFileNew(), slotFileNewWindow(), slotFileOpen(), slotFileOpenRecent(), slotFilePrint(), slotFileQuit(), slotFileSave(), slotFileSaveAs(), slotViewStatusBar(), and slotViewToolBar(). Referenced by KSync(). |
|
sets up the statusbar for the main window by initialzing a statuslabel.
Definition at line 82 of file ksync.cpp. Referenced by KSync(). |
|
creates the centerwidget of the KTMainWindow instance and sets it as the view
Definition at line 87 of file ksync.cpp. Referenced by KSync(). |
|
queryClose is called by KTMainWindow on each closeEvent of a window. Against the default implementation (only returns true), this calles saveModified() on the document object to ask if the document shall be saved if Modified; on cancel the closeEvent is rejected.
|
|
queryExit is called by KTMainWindow when the last window of the application is going to be closed during the closeEvent(). Against the default implementation that just returns true, this calls saveOptions() to save the settings of the last window's properties.
Definition at line 207 of file ksync.cpp. References saveOptions(). |
|
saves the window properties for each open window during session end to the session config file, including saving the currently opened file by a temporary filename provided by KApplication.
|
|
reads the session config file and restores the application's state including the last opened files and documents by reading the temporary files saved by saveProperties()
Definition at line 170 of file ksync.cpp. References QString::isEmpty(), and QFile::remove(). |
|
open a new application window by creating a new instance of KSyncApp
Definition at line 213 of file ksync.cpp. References KSync(), and slotStatusMsg(). Referenced by initActions(). |
|
clears the document in the actual view to reuse it as the new document
Definition at line 223 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(). |
|
open a file and load it into the document
Definition at line 243 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(). |
|
opens a file from the recent files menu
Definition at line 269 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(). |
|
save a document
Definition at line 288 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(). |
|
save a document by a new filename
Definition at line 297 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(). |
|
asks for saving if the file is modified, then closes the actual file and window
Definition at line 313 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(). |
|
print the actual file
Definition at line 322 of file ksync.cpp. References KSyncView::print(), QPrinter::setup(), and slotStatusMsg(). Referenced by initActions(). |
|
closes all open windows by calling close() on each memberList item until the list is empty, then quits the application. If queryClose() returns false because the user canceled the saveModified() dialog, the closing breaks. Definition at line 335 of file ksync.cpp. References saveOptions(), and slotStatusMsg(). Referenced by initActions(). |
|
put the marked text/object into the clipboard and remove it from the document
Definition at line 355 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(). |
|
put the marked text/object into the clipboard
Definition at line 362 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(). |
|
paste the clipboard into the document
Definition at line 369 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(). |
|
toggles the toolbar
Definition at line 376 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(), and readOptions(). |
|
toggles the statusbar
Definition at line 392 of file ksync.cpp. References slotStatusMsg(). Referenced by initActions(), and readOptions(). |
|
changes the statusbar contents for the standard label permanently, used to indicate current actions.
Definition at line 409 of file ksync.cpp. Referenced by openDocumentFile(), slotEditCopy(), slotEditCut(), slotEditPaste(), slotFileClose(), slotFileNew(), slotFileNewWindow(), slotFileOpen(), slotFileOpenRecent(), slotFilePrint(), slotFileQuit(), slotFileSave(), slotFileSaveAs(), slotViewStatusBar(), and slotViewToolBar(). |
The documentation for this class was generated from the following files: