Isis 3 Programmer Reference
|
This was called the Qisis MainWindow. More...
#include <ViewportMainWindow.h>
Public Slots | |
void | displayWarning (std::string &pStr, const std::string &pExStr) |
Slot which receives the warning signal. | |
void | resetWarning (void) |
Slot which receives the message to reset warning status. | |
Signals | |
void | closeWindow (QCloseEvent *event=NULL) |
Signal called when the window receives a close event. | |
Public Member Functions | |
ViewportMainWindow (QString title, QWidget *parent=0) | |
Constructs a ViewportMainWindow object with windowTitle = title. | |
Workspace * | workspace () |
Returns the current workspace. | |
QToolBar * | permanentToolBar () |
Returns the permanent toolbar. | |
QToolBar * | activeToolBar () |
Returns the active toolbar. | |
ToolPad * | toolPad () |
Returns the toolpad. | |
QMenu * | getMenu (const QString &name) |
Returns the menu with menu name = name. | |
TrackTool * | getTrackTool () |
Static Public Member Functions | |
static QString | settingsFileName (QString objectTitle) |
Protected Member Functions | |
virtual void | closeEvent (QCloseEvent *event) |
This class is called when a close event occurs, it emits a signal and ignores the close event. | |
QString | settingsFileName () const |
virtual void | readSettings (QSize defaultSize=QSize()) |
This method ensure that the settings get written even if the Main window was only hidden, not closed. | |
Private Member Functions | |
virtual void | writeSettings () const |
This method is called when the Main window is closed or hidden to write the size and location settings to a config file in the user's home directory. | |
Private Attributes | |
Workspace * | p_workspace |
The current workspace. | |
QToolBar * | p_permToolbar |
The permanent toolbar. | |
QToolBar * | p_activeToolbar |
The active toolbar. | |
ToolPad * | p_toolpad |
The toolpad. | |
std::map< QString, QMenu * > | p_menus |
Map of qstrings to menus. | |
std::string | p_appName |
The app name. | |
TrackTool * | mTrackTool |
Pointer to application's Status bar. | |
This was called the Qisis MainWindow.
Now this is being subclassed from the mainwindow class which keeps track of the size and location of the qisis windows. qview and qnet are two applications that use WiewportMainWindow.
2008-06-19 Noah Hilt - Added a method for sending a signal to qview when this window recieves a close event. This signal calls the file tool's exit method and ignores this class's close method.
2010-18-03 Sharmila Prasad - Added ability to handle exception and display warning status when exception occured
2012-05-29 Steven Lambright - Updated closeEvent() to ask the user to save any unsaved modifications to the opened cube. References #854.
2018-04-24 Adam Goins - Added optional parameter QCloseEvent to the closeWindow() signal so that the close event can be caught and set to rejected by listening applications (such as qnet). Fixes an issue where closing qnet and clicking 'cancel' from the proceeding popup dialogue would still close the window but leave the application running. Fixes #4146.
Definition at line 43 of file ViewportMainWindow.h.
Isis::ViewportMainWindow::ViewportMainWindow | ( | QString | title, |
QWidget * | parent = 0 ) |
Constructs a ViewportMainWindow object with windowTitle = title.
title | |
parent |
Definition at line 18 of file ViewportMainWindow.cpp.
References Isis::Tool::addTo(), mTrackTool, p_activeToolbar, p_permToolbar, p_toolpad, p_workspace, and Isis::MainWindow::readSettings().
|
virtual |
Definition at line 55 of file ViewportMainWindow.cpp.
|
inline |
Returns the active toolbar.
Definition at line 68 of file ViewportMainWindow.h.
References p_activeToolbar.
|
protectedvirtual |
This class is called when a close event occurs, it emits a signal and ignores the close event.
event |
Reimplemented from Isis::MainWindow.
Definition at line 115 of file ViewportMainWindow.cpp.
References Isis::MainWindow::closeEvent(), closeWindow(), Isis::Workspace::confirmClose(), and p_workspace.
|
signal |
Signal called when the window receives a close event.
Referenced by closeEvent().
|
slot |
Slot which receives the warning signal.
Calls the Track Tool to display the warning status
pStr | - Warning message |
pExStr | - Propagated exception message |
Definition at line 65 of file ViewportMainWindow.cpp.
References Isis::TrackTool::displayWarning(), and mTrackTool.
QMenu * Isis::ViewportMainWindow::getMenu | ( | const QString & | name | ) |
Returns the menu with menu name = name.
name |
Definition at line 87 of file ViewportMainWindow.cpp.
References p_menus.
|
inline |
Definition at line 78 of file ViewportMainWindow.h.
|
inline |
Returns the permanent toolbar.
Definition at line 63 of file ViewportMainWindow.h.
References p_permToolbar.
|
protectedvirtualinherited |
This method ensure that the settings get written even if the Main window was only hidden, not closed.
event | This method is called from the constructor so that when the Main window is created, it know's it's size and location. |
Reimplemented in Isis::MosaicMainWindow.
Definition at line 80 of file MainWindow.cpp.
Referenced by Isis::PlotWindow::PlotWindow(), Isis::TableMainWindow::TableMainWindow(), and ViewportMainWindow().
|
slot |
Slot which receives the message to reset warning status.
Definition at line 74 of file ViewportMainWindow.cpp.
References mTrackTool, and Isis::TrackTool::resetStatusWarning().
|
protectedinherited |
Definition at line 96 of file MainWindow.cpp.
|
staticinherited |
Definition at line 43 of file MainWindow.cpp.
|
inline |
|
inline |
Returns the current workspace.
Definition at line 58 of file ViewportMainWindow.h.
References p_workspace.
|
privatevirtualinherited |
This method is called when the Main window is closed or hidden to write the size and location settings to a config file in the user's home directory.
Definition at line 124 of file MainWindow.cpp.
Referenced by Isis::MainWindow::closeEvent().
|
private |
Pointer to application's Status bar.
Definition at line 92 of file ViewportMainWindow.h.
Referenced by displayWarning(), resetWarning(), and ViewportMainWindow().
|
private |
The active toolbar.
Definition at line 88 of file ViewportMainWindow.h.
Referenced by activeToolBar(), and ViewportMainWindow().
|
private |
The app name.
Definition at line 91 of file ViewportMainWindow.h.
|
private |
Map of qstrings to menus.
Definition at line 90 of file ViewportMainWindow.h.
Referenced by getMenu().
|
private |
The permanent toolbar.
Definition at line 87 of file ViewportMainWindow.h.
Referenced by permanentToolBar(), and ViewportMainWindow().
|
private |
The toolpad.
Definition at line 89 of file ViewportMainWindow.h.
Referenced by toolPad(), and ViewportMainWindow().
|
private |
The current workspace.
Definition at line 86 of file ViewportMainWindow.h.
Referenced by closeEvent(), ViewportMainWindow(), and workspace().