This Class describes the "historical" imp application. More...
#include <ImpMainWindow.h>
Public Slots | |
file menu slot | |
open a data directory, "called" from the fileOpenDataDirectoryMenu | |
void | openDataDirectory (QString plugin) |
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 () override |
View menu slots | |
| |
void | showToolbar (bool) |
show or hide the toolbar More... | |
void | toggleMenuBar () |
show or hide the menu bar More... | |
void | resetWindows () |
reset all windows in their initial state More... | |
void | showStatusBar (bool) |
show or hide the status bar More... | |
void | saveHistoryAsSCXML () |
Save the history of action as a SCXML file. More... | |
Edit menu slots | |
void | editSettings () |
Public Slots inherited from camitk::MainWindow | |
virtual void | refresh () |
void | show () |
inherited from QWidget, just to refresh all viewers More... | |
Public Member Functions | |
general | |
construtor | |
ImpMainWindow () | |
void | aboutToShow () override |
overriden from MainWindow to automatically load last opened document if needed More... | |
virtual | ~ImpMainWindow () |
destructor More... | |
open a top-level component | |
virtual void | addDockViewer (Qt::DockWidgetArea, camitk::Viewer *) override final |
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). More... | |
virtual void | setCentralViewer (camitk::Viewer *) override final |
set the central Viewer of the application. More... | |
virtual void | redirectToConsole (bool) override |
use or not the application console (overriden to add an action to show the console window) More... | |
Public Member Functions inherited from camitk::MainWindow | |
MainWindow (QString title) | |
Constructor, the window title can be changed here, it is inconsistent to use setWindowTitle(). More... | |
~MainWindow () override | |
destructor More... | |
QString | getName () const |
Get the main window title. More... | |
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. More... | |
QProgressBar * | getProgressBar () |
similar as statusBar() from QMainWindow but for the progress bar More... | |
void | showStatusBar (bool) |
show the status bar (by default it is hidden) More... | |
void | showConsole (bool) |
get the console window More... | |
bool | getConsoleVisibility () |
get the visibility state of the console ( More... | |
virtual void | initSettings () |
void | saveSettings () |
Save MainWindow's settings into Application::settings. More... | |
virtual void | showDockViewer (Viewer *, bool) |
set the visibility for the given docked viewer and its toolbar More... | |
void | refreshViewers () |
Method uses to refresh all the viewer of the Main Window. More... | |
virtual Viewer * | getCentralViewer () const |
virtual void | showViewerToolbar (Viewer *theViewer, bool visible) |
Set the visibility of a viewer's toolbar. More... | |
Protected Attributes | |
QToolBar * | mainToolbar |
the main toolbar More... | |
Protected Attributes inherited from camitk::MainWindow | |
Viewer * | centralViewer |
The actual central Viewer. More... | |
QList< Viewer * > | viewers |
QMap< Viewer *, QDockWidget * > | dockWidgetMap |
the map that gives the corresponding QDockWidget for a given Viewer More... | |
initialization/update methods | |
void | updateViewMenu () |
void | updateOpenDirectoryMenu () |
update the open data directory menu depending on registered plugins More... | |
void | updateRecentDocumentsMenu () |
update the recent document menu More... | |
void | updateActionStates () |
set the current QAction enable state depending on the current selection More... | |
void | initActions () |
initializes all QActions of the application More... | |
Additional Inherited Members | |
Protected Member Functions inherited from camitk::MainWindow | |
void | closeEvent (QCloseEvent *) override |
overriden from QMainWindow, just connect to slotFileQuit More... | |
void | dragEnterEvent (QDragEnterEvent *event) override |
called when a drag event started on the main window, accept drag only if file is MIME type text/uri-list More... | |
void | dragLeaveEvent (QDragLeaveEvent *event) override |
called when the mouse leaves the widgets area during a drag/drop operation More... | |
void | dragMoveEvent (QDragMoveEvent *event) override |
called when the mouse moves inside the widgets area during a drag/drop operation More... | |
void | dropEvent (QDropEvent *event) override |
just call open with the dragged uri More... | |
This Class describes the "historical" imp application.
It is a classical desktop application, with menubar, toolbar and statusbar.
ImpMainWindow::ImpMainWindow | ( | ) |
References addDockViewer(), CAMITK_ERROR, camitk::MainWindow::dockWidgetMap, initActions(), setCentralViewer(), camitk::MainWindow::showDockViewer(), showStatusBar(), and updateActionStates().
|
virtual |
destructor
|
overridevirtual |
overriden from MainWindow to automatically load last opened document if needed
Reimplemented from camitk::MainWindow.
References updateRecentDocumentsMenu().
|
finaloverridevirtual |
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(), and updateViewMenu().
|
slot |
settings slot
References camitk::SettingsDialog::editSettings(), camitk::Viewer::getPropertyObject(), updateOpenDirectoryMenu(), updateRecentDocumentsMenu(), and camitk::MainWindow::viewers.
Referenced by initActions().
|
protected |
initializes all QActions of the application
References CAMITK_ERROR, editSettings(), camitk::ActionExtension::getName(), resetWindows(), saveHistoryAsSCXML(), showStatusBar(), and toggleMenuBar().
Referenced by ImpMainWindow().
|
slot |
References camitk::MainWindow::getProgressBar(), and refresh().
Referenced by updateOpenDirectoryMenu().
|
overridevirtual |
use or not the application console (overriden to add an action to show the console window)
Reimplemented from camitk::MainWindow.
|
overridevirtualslot |
References camitk::refresh(), updateActionStates(), and updateRecentDocumentsMenu().
Referenced by openDataDirectory().
|
slot |
reset all windows in their initial state
References camitk::MainWindow::dockWidgetMap, showStatusBar(), and showToolbar().
Referenced by initActions().
|
slot |
Save the history of action as a SCXML file.
Referenced by initActions().
|
finaloverridevirtual |
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(), and updateViewMenu().
|
slot |
show or hide the status bar
Referenced by ImpMainWindow(), initActions(), and resetWindows().
|
slot |
show or hide the toolbar
References mainToolbar.
Referenced by resetWindows().
|
slot |
show or hide the menu bar
References CAMITK_WARNING.
Referenced by initActions().
|
protected |
set the current QAction enable state depending on the current selection
References camitk::Component::getActionMenu(), camitk::Action::getQAction(), and camitk::MainWindow::setWindowSubtitle().
Referenced by ImpMainWindow(), and refresh().
|
protected |
update the open data directory menu depending on registered plugins
References openDataDirectory().
Referenced by editSettings().
|
protected |
update the recent document menu
Referenced by aboutToShow(), editSettings(), and refresh().
|
protected |
update the viewer's menu
References addDockViewer(), camitk::MainWindow::centralViewer, camitk::MainWindow::dockWidgetMap, camitk::Viewer::getEmbedder(), camitk::Viewer::getIcon(), camitk::Viewer::getMenu(), camitk::Viewer::getName(), camitk::Viewer::getType(), mainToolbar, setCentralViewer(), and camitk::MainWindow::viewers.
Referenced by addDockViewer(), and setCentralViewer().
|
protected |
the main toolbar
Referenced by showToolbar(), and updateViewMenu().