|
|
The base class for KFileCoder 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 KFileCoderView creates your center view, which is connected to the window's Doc object. KFileCoderApp reimplements the methods that KTMainWindow provides for main window handling and supports full session management as well as keyboard accelerator configuration by using KAccel.
See also: KTMainWindow, KApplication, KConfig, KAccel
| |
construtor of KFileCoderApp, calls all init functions to create the application.
See also: initMenuBar, initToolBar
| void |
enables menuentries/toolbar items
| void |
disables menuentries/toolbar items
| void |
add a opened file to the recent file list and update recent_file_menu
| void |
opens a file specified by commandline option
| KFileCoderDoc * |
[const]
returns a pointer to the current document connected to the KTMainWindow instance and is used by the View class to access the document object's methods
| void |
[protected]
save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration file
| void |
[protected]
read general Options again and initialize all variables like the recent file list
| void |
[protected]
initKeyAccel creates the keyboard accelerator items for the available slots and changes the menu accelerators.
| void |
[protected]
initMenuBar creates the menubar and inserts the menupopups as well as creating the helpMenu.
| void |
[protected]
this creates the toolbars.
| void |
[protected]
sets up the statusbar for the main window by initialzing a statuslabel.
| void |
[protected]
initializes the document object of the main window that is connected to the view in initView().
| void |
[protected]
creates the centerwidget of the KTMainWindow instance and sets it as the view
| bool |
[protected virtual]
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.
See also: KTMainWindow#queryClose, KTMainWindow#closeEvent
| bool |
[protected virtual]
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.
See also: KTMainWindow#queryExit, KTMainWindow#closeEvent
| void |
[protected virtual]
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.
| void |
[protected virtual]
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()
| void |
[slot]
switch argument for slot selection by menu or toolbar ID
| void |
[slot]
switch argument for Statusbar help entries on slot selection. Add your ID's help here for toolbars and menubar entries.
| void |
[slot]
open a new application window by creating a new instance of KFileCoderApp
| void |
[slot]
clears the document in the actual view to reuse it as the new document
| void |
[slot]
open a file and load it into the document
| void |
[slot]
opens a file from the recent files menu
| void |
[slot]
save a document
| void |
[slot]
save a document by a new filename
| void |
[slot]
asks for saving if the file is modified, then closes the actual file and window
| void |
[slot]
print the actual file
| void |
[slot]
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.
| void |
[slot]
put the marked text/object into the clipboard and remove it from the document
| void |
[slot]
put the marked text/object into the clipboard
| void |
[slot]
paste the clipboard into the document
| void |
[slot]
toggles the toolbar
| void |
[slot]
toggles the statusbar
| void |
[slot]
changes the statusbar contents for the standard label permanently, used to indicate current actions.
Parameters:
| text | the text that is displayed in the statusbar |
| void |
[slot]
changes the status message of the whole statusbar for two seconds, then restores the last status. This is used to display statusbar messages that give information about actions for toolbar icons and menuentries.
Parameters:
| text | the text that is displayed in the statusbar |
| QStrList |
[private]
contains the recently used filenames
| KConfig * |
[private]
the configuration object of the application
| KAccel * |
[private]
the key accelerator container
| QPopupMenu * |
[private]
file_menu contains all items of the menubar entry "File"
| QPopupMenu * |
[private]
the recent file menu containing the last five opened files
| QPopupMenu * |
[private]
edit_menu contains all items of the menubar entry "Edit"
| QPopupMenu * |
[private]
view_menu contains all items of the menubar entry "View"
| QPopupMenu * |
[private]
help_menu contains all items of the menubar entry "Help"
| KFileCoderView * |
[private]
view is the main widget which represents your working area. The View class should handle all events of the view widget. It is kept empty so you can create your view according to your application's needs by changing the view class.
| KFileCoderDoc * |
[private]
doc represents your actual document and is created only once. It keeps information such as filename and does the serialization of your files.