class UMLApp

The base class for UML application windows. More...

Definition#include <./uml.h>
InheritsKMainWindow (unknown) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Signals

Public Members

Protected Methods

Protected Slots


Detailed Description

The base class for UML application windows. It sets up the main window and reads the config file as well as providing a menubar, toolbar and statusb#include "umlview.h"ar. An instance of UMLView creates your center view, which is connected to the window's Doc object. UMLApp 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

 UMLApp (QWidget* parent=0, const char* name=0)

UMLApp

construtor of UMLApp, calls all init functions to create the application.

 ~UMLApp ()

~UMLApp

Standard deconstructor.

void  openDocumentFile (const KURL& url=0)

openDocumentFile

opens a file specified by commandline option

void  newDocument ()

newDocument

calls umldoc to create a new Document

UMLDocgetDocument ()

getDocument

[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

WorkToolBar*  getWorkToolBar ()

getWorkToolBar

Returns the toolbar being used.

Returns: Returns the toolbar being used.

void  setModified (bool _m)

setModified

Sets whether the program has been modified. This will change how the program saves/exits.

Parameters:
_mtrue - modified.

void  enablePrint (bool _p)

enablePrint

Set whether to allow printing. It will enable/disable the meny/toolbar options.

Parameters:
_pSet whether to allow printing.

DocWindow *  getDocWindow ()

getDocWindow

Returns a pointer to the documentation window.

bool  getPasteState ()

getPasteState

Returns the paste state

bool  getCutCopyState ()

getCutCopyState

Returns the state on Cut/Copy

CodeGenerator*  generator ()

generator

gets the appropiate CodeGenerator

void  setViewPropState ( bool bState )

setViewPropState

Sets the state of the view properties menu item.

void  keyPressEvent (QKeyEvent *e)

keyPressEvent

[protected virtual]

void  keyReleaseEvent (QKeyEvent *e)

keyReleaseEvent

[protected virtual]

bool  EditCutCopy ( bool bFromView )

EditCutCopy

[protected]

Carries out the cut/copy command with different action performed depending on if from view or list view. Cut/Copy are the same. It is up to the caller to delete/cut the selection..

If the operation is successful, the signal sigCutSuccessful() is emitted.

Callers should connect to this signal to know what to do next.

void  saveOptions ()

saveOptions

[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  readOptions ()

readOptions

[protected]

read general Options again and initialize all variables like the recent file list

void  initActions ()

initActions

[protected]

initializes the KActions of the application

void  initStatusBar ()

initStatusBar

[protected]

sets up the statusbar for the main window by initialzing a statuslabel.

void  initDocument ()

initDocument

[protected]

initializes the document object of the main window that is connected to the view in initView().

See also: initView();

void  initView ()

initView

[protected]

creates the centerwidget of the KTMainWindow instance and sets it as the view

bool  queryClose ()

queryClose

[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  queryExit ()

queryExit

[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  saveProperties (KConfig *_cfg)

saveProperties

[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.

See also: KTMainWindow#saveProperties

void  readProperties (KConfig *_cfg)

readProperties

[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()

See also: KTMainWindow#readProperties

void  updateLangSelectMenu ()

updateLangSelectMenu

[protected slots slot]

Updates the Menu for language selection and sets the active lanugage. If no active lanugage is found or if it is not one of the registered languages it tries to fall back to Cpp

void  initLibraries ()

initLibraries

[slot]

Sets up information for dinamically loaded libraries. It scans directories looking for new libraries and registers them, and deregister the libraries that are not found

void  generationWizard ()

generationWizard

[slot]

Runs the code generation wizard

void  slotFileNew ()

slotFileNew

[slot]

clears the document in the actual view to reuse it as the new document

void  slotFileOpen ()

slotFileOpen

[slot]

open a file and load it into the document

void  slotFileOpenRecent (const KURL& url)

slotFileOpenRecent

[slot]

opens a file from the recent files menu

void  slotFileSave ()

slotFileSave

[slot]

save a document

bool  slotFileSaveAs ()

slotFileSaveAs

[slot]

save a document by a new filename

void  slotFileClose ()

slotFileClose

[slot]

asks for saving if the file is modified, then closes the actual file and window

void  slotFilePrint ()

slotFilePrint

[slot]

print the actual file

void  slotFileQuit ()

slotFileQuit

[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  slotEditCut ()

slotEditCut

[slot]

put the marked text/object into the clipboard and remove it from the document

void  slotEditCopy ()

slotEditCopy

[slot]

put the marked text/object into the clipboard

void  slotEditPaste ()

slotEditPaste

[slot]

paste the clipboard into the document

void  slotViewToolBar ()

slotViewToolBar

[slot]

toggles the toolbar

void  slotViewStatusBar ()

slotViewStatusBar

[slot]

toggles the statusbar

void  slotStatusMsg (const QString &text)

slotStatusMsg

[slot]

changes the statusbar contents for the standard label permanently, used to indicate current actions.

Parameters:
textthe text that is displayed in the statusbar

void  slotClassDiagram ()

slotClassDiagram

[slot]

Create this view

void  slotSequenceDiagram ()

slotSequenceDiagram

[slot]

Create this view

void  slotCollaborationDiagram ()

slotCollaborationDiagram

[slot]

Create this view

void  slotUseCaseDiagram ()

slotUseCaseDiagram

[slot]

Create this view

void  slotStateDiagram ()

slotStateDiagram

[slot]

Create this view

void  slotActivityDiagram ()

slotActivityDiagram

[slot]

Create this view

void  slotClipDataChanged ()

slotClipDataChanged

[slot]

void  slotCopyChanged ()

slotCopyChanged

[slot]

void  slotPrefs ()

slotPrefs

[slot]

Shows the global preferences dialog.

void  slotApplyPrefs ()

slotApplyPrefs

[slot]

Commits the changes from the global preferences dialog.

void  slotUpdateViews ()

slotUpdateViews

[slot]

register new views (aka diagram) with the GUI so they show up in the menu

void  slotShowDocWindow ()

slotShowDocWindow

[slot]

Toggles whether to show the doc. window

void  generateAllCode ()

generateAllCode

[slot]

generate code for all classes

void  setActiveLanguage (int)

setActiveLanguage

[slot]

set the language for which code will be generated

void  configureLanguages ()

configureLanguages

[slot]

shows a dialog to add or remove Generators (languages)

void  slotViewProp ()

slotViewProp

[slot]

Menu selection for current view properties.

void  slotImportClasses ()

slotImportClasses

[slot]

Import classes menu selection.

void  slotClassWizard ()

slotClassWizard

[slot]

Class wizard menu selection.

QSplitter * splitter

splitter

SettingsDlg* dlg

dlg

SettingsDlg::OptionState  getOptionState ()

getOptionState

the global UML settings dialogue

void  sigCutSuccessful ()

sigCutSuccessful

[signal]

Emitted when a cut operation is successful.