Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Protected Member Functions | Protected Attributes | Private Slots | List of all members
ImpMainWindow Class Reference

This Class describes the "historical" imp application. More...

#include <ImpMainWindow.h>

+ Inheritance diagram for ImpMainWindow:

Public Slots

file menu slot

open a data directory, "called" from the fileOpenDataDirectoryMenu

void openDirectory (QAction *)
viewers' slot

this slot is connected to all the viewers selectionChanged() signal, this will call the refresh method of all viewers but whoIsAsking

virtual void refresh ()
View menu slots

everything that is linked to the InteractiveViewer has to be managed by the view (in case there is more than one InteractiveViewer)

void showToolbar (bool)
 show or hide the toolbar
void showMenuBar (bool)
 show or hide the menu bar
void resetWindows ()
 reset all windows in their initial state
void showStatusBar (bool)
 show or hide the status bar
Edit menu slots
void editSettings ()
- Public Slots inherited from camitk::MainWindow
virtual void refresh ()
void show ()
 inherited from QWidget, just to refresh all viewers

Public Member Functions

general

construtor

 ImpMainWindow ()
void aboutToShow ()
 overriden from MainWindow to automatically load last opened document if needed
virtual ~ImpMainWindow ()
 destructor
open a top-level component
virtual void addDockViewer (Qt::DockWidgetArea, Viewer *)
 add a Viewer to the application as a docking widget and specify where it has to be docked MainWindow takes the hand on the Viewer (it will be deleted when MainWindow is deleted).
virtual void setCentralViewer (Viewer *)
 set the central Viewer of the application.
virtual void redirectToConsole (bool)
 use or not the application console (overriden to add an action to show the console window)
- Public Member Functions inherited from camitk::MainWindow
 MainWindow (QString title)
 Constructor, the window title can be changed here, it is inconsistent to use setWindowTitle.
virtual ~MainWindow ()
 destructor
void setWindowSubtitle (QString)
 The subtitle is situated at the end of the title, on the title bar, is helps for example showing which file is currently selected.
QProgressBar * getProgressBar ()
 similar as statusBar() from QMainWindow but for the progress bar
void showStatusBar (bool)
 show the status bar (by default it is hidden)
void showConsole (bool)
 get the console window
virtual bool addViewer (Viewer *)
 add a viewer (called by addDockViewer and setCentralViewer), returns true if not already added.
virtual void showViewer (Viewer *, bool)
 set the visibility for the given viewer (if it is in a dock)
void refreshViewers ()
 Method uses to refresh all the viewer of the Main Window.

Protected Member Functions

void initActions ()
 initializes all QActions of the application
virtual void initSettings ()
 init ImpMainWindow specific settings (e.g. autoloadLastOpened)
void updateViewMenu ()
 update the viewer's menu
Extension and ComponentPlugin attributes
void updateOpenDirectoryMenu ()
void updateRecentDocumentsMenu ()
 update the recent document menu
- Protected Member Functions inherited from camitk::MainWindow
virtual void closeEvent (QCloseEvent *)
 overriden from QMainWindow, just connect to slotFileQuit
void dragEnterEvent (QDragEnterEvent *event)
 called when a drag event started on the main window, accept drag only if file is MIME type text/uri-list
void dragLeaveEvent (QDragLeaveEvent *event)
 called when the mouse leaves the widgets area during a drag/drop operation
void dragMoveEvent (QDragMoveEvent *event)
 called when the mouse moves inside the widgets area during a drag/drop operation
void dropEvent (QDropEvent *event)
 just call open with the dragged uri

Protected Attributes

QToolBar * mainToolbar
 the main toolbar
- Protected Attributes inherited from camitk::MainWindow
QList< Viewer * > viewers
QMap< Viewer *, QDockWidget * > dockWidgetMap
 the map that gives the corresponding QDockWidget for a given Viewer

Private Slots

void openRecentDocuments ()
 open a given recent document

Private Attributes

Viewers
Explorerexplorer
PropertyExplorerpropertyExplorer
File menu attributes
QMenu * fileMenu
 file_menu contains all items of the menubar entry "File"
QMenu * fileOpenDataDirectoryMenu
QAction * fileOpen
QAction * fileClose
QAction * fileCloseAll
QAction * fileSave
QAction * fileSaveAs
QAction * fileSaveAll
QAction * fileQuit
View menu attributes and action
QMenu * viewMenu
 view_menu contains all items of the menubar entry "View"
QAction * viewMenuBar
QAction * viewStatusBar
QAction * viewResetWindows
Edit menu attributes
QAction * editApplicationSettings
QAction * editClearSelection
Other menu attributes
QMenu * actionMenu
 the actionMenu.
QAction * helpAboutApp
QAction * helpShowConsole
 action for the show console
File management attributes

is the last opened document re-opened at startup?

bool autoloadLastOpened
QList< QAction * > recentDocumentActions
 list of all the possible recent documents actions
QAction * recentDocumentSeparator
 the separator between the last file menu action and the recent document actions

initialization/update methods

void updateActionStates ()
void initMenuBar ()
 initMenuBar creates the menu_bar and inserts the menuitems
void initToolBar ()
 this creates the toolbars.

Detailed Description

This Class describes the "historical" imp application.

It is a classical desktop application, with menubar, toolbar and statusbar.

Constructor & Destructor Documentation

ImpMainWindow::ImpMainWindow ( )
ImpMainWindow::~ImpMainWindow ( )
virtual

destructor

Member Function Documentation

void ImpMainWindow::aboutToShow ( )
virtual

overriden from MainWindow to automatically load last opened document if needed

Reimplemented from camitk::MainWindow.

References autoloadLastOpened, and updateRecentDocumentsMenu().

void ImpMainWindow::addDockViewer ( Qt::DockWidgetArea  dockingArea,
Viewer theViewer 
)
virtual

add a Viewer to the application as a docking widget and specify where it has to be docked MainWindow takes the hand on the Viewer (it will be deleted when MainWindow is deleted).

This method calls addViewer(...).

Reimplemented from camitk::MainWindow.

References updateViewMenu().

Referenced by ImpMainWindow().

void ImpMainWindow::editSettings ( )
slot
void ImpMainWindow::initActions ( )
protected
void ImpMainWindow::initMenuBar ( )
private
void ImpMainWindow::initSettings ( )
protectedvirtual

init ImpMainWindow specific settings (e.g. autoloadLastOpened)

Reimplemented from camitk::MainWindow.

References autoloadLastOpened.

void ImpMainWindow::initToolBar ( )
private

this creates the toolbars.

Change the toobar look and add new toolbars in this function.

References fileOpen, fileSave, and mainToolbar.

Referenced by ImpMainWindow().

void ImpMainWindow::openDirectory ( QAction *  emitter)
slot
void ImpMainWindow::openRecentDocuments ( )
privateslot

open a given recent document

Referenced by initActions().

void ImpMainWindow::redirectToConsole ( bool  visible)
virtual

use or not the application console (overriden to add an action to show the console window)

Reimplemented from camitk::MainWindow.

References helpShowConsole.

void ImpMainWindow::refresh ( )
virtualslot
void ImpMainWindow::resetWindows ( )
slot
void ImpMainWindow::setCentralViewer ( Viewer theViewer)
virtual

set the central Viewer of the application.

MainWindow takes the hand on the Viewer (it will be deleted when MainWindow is deleted) This method calls addViewer(...).

Reimplemented from camitk::MainWindow.

References updateViewMenu().

Referenced by ImpMainWindow().

void ImpMainWindow::showMenuBar ( bool  b)
slot

show or hide the menu bar

References showStatusBar(), and viewMenuBar.

Referenced by initActions(), and resetWindows().

void ImpMainWindow::showStatusBar ( bool  b)
slot

show or hide the status bar

Referenced by ImpMainWindow(), initActions(), resetWindows(), and showMenuBar().

void ImpMainWindow::showToolbar ( bool  b)
slot

show or hide the toolbar

References mainToolbar.

Referenced by resetWindows().

void ImpMainWindow::updateActionStates ( )
protected
void ImpMainWindow::updateOpenDirectoryMenu ( )
protected

update the data directory menu depending on registered plugins

References fileOpenDataDirectoryMenu, and openDirectory().

Referenced by editSettings(), ImpMainWindow(), and refresh().

void ImpMainWindow::updateRecentDocumentsMenu ( )
protected

update the recent document menu

References recentDocumentActions, and recentDocumentSeparator.

Referenced by aboutToShow(), editSettings(), and refresh().

void ImpMainWindow::updateViewMenu ( )
protected

Member Data Documentation

QMenu* ImpMainWindow::actionMenu
private

the actionMenu.

it contains the list of specific actions possible on the currently selected Component (this menu is in fact the Popup Menu of the selected Component and is updated everytime a new Component is selected)

Referenced by initMenuBar(), and updateActionStates().

bool ImpMainWindow::autoloadLastOpened
private
QAction* ImpMainWindow::editApplicationSettings
private

edit actions

Referenced by initActions(), and initMenuBar().

QAction* ImpMainWindow::editClearSelection
private
Explorer* ImpMainWindow::explorer
private

Referenced by ImpMainWindow(), and resetWindows().

QAction* ImpMainWindow::fileClose
private
QAction* ImpMainWindow::fileCloseAll
private
QMenu* ImpMainWindow::fileMenu
private

file_menu contains all items of the menubar entry "File"

Referenced by initMenuBar().

QAction* ImpMainWindow::fileOpen
private
QMenu* ImpMainWindow::fileOpenDataDirectoryMenu
private
QAction* ImpMainWindow::fileQuit
private

Referenced by initActions(), and initMenuBar().

QAction* ImpMainWindow::fileSave
private
QAction* ImpMainWindow::fileSaveAll
private
QAction* ImpMainWindow::fileSaveAs
private
QAction* ImpMainWindow::helpAboutApp
private

actions of the Help menu

Referenced by initActions(), and initMenuBar().

QAction* ImpMainWindow::helpShowConsole
private

action for the show console

Referenced by initActions(), initMenuBar(), and redirectToConsole().

QToolBar* ImpMainWindow::mainToolbar
protected

the main toolbar

Referenced by initToolBar(), showToolbar(), and updateViewMenu().

PropertyExplorer* ImpMainWindow::propertyExplorer
private

Referenced by ImpMainWindow(), and resetWindows().

QList<QAction*> ImpMainWindow::recentDocumentActions
private

list of all the possible recent documents actions

Referenced by initActions(), initMenuBar(), and updateRecentDocumentsMenu().

QAction* ImpMainWindow::recentDocumentSeparator
private

the separator between the last file menu action and the recent document actions

Referenced by initActions(), initMenuBar(), and updateRecentDocumentsMenu().

QMenu* ImpMainWindow::viewMenu
private

view_menu contains all items of the menubar entry "View"

Referenced by initMenuBar(), and updateViewMenu().

QAction* ImpMainWindow::viewMenuBar
private
QAction* ImpMainWindow::viewResetWindows
private

Referenced by initActions(), and updateViewMenu().

QAction* ImpMainWindow::viewStatusBar
private

Referenced by initActions(), and updateViewMenu().


The documentation for this class was generated from the following files: