Isis 3 Programmer Reference
Isis::ViewportMainWindow Class Reference

This was called the Qisis MainWindow. More...

#include <ViewportMainWindow.h>

Inheritance diagram for Isis::ViewportMainWindow:
Inheritance graph
Collaboration diagram for Isis::ViewportMainWindow:
Collaboration graph

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.
 
Workspaceworkspace ()
 Returns the current workspace.
 
QToolBarpermanentToolBar ()
 Returns the permanent toolbar.
 
QToolBaractiveToolBar ()
 Returns the active toolbar.
 
ToolPadtoolPad ()
 Returns the toolpad.
 
QMenugetMenu (const QString &name)
 Returns the menu with menu name = name.
 
TrackToolgetTrackTool ()
 

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

Workspacep_workspace
 The current workspace.
 
QToolBarp_permToolbar
 The permanent toolbar.
 
QToolBarp_activeToolbar
 The active toolbar.
 
ToolPadp_toolpad
 The toolpad.
 
std::map< QString, QMenu * > p_menus
 Map of qstrings to menus.
 
std::string p_appName
 The app name.
 
TrackToolmTrackTool
 Pointer to application's Status bar.
 

Detailed Description

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.

Author
????-??-?? Stacy Alley
History

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.

Constructor & Destructor Documentation

◆ ViewportMainWindow()

Isis::ViewportMainWindow::ViewportMainWindow ( QString title,
QWidget * parent = 0 )

Constructs a ViewportMainWindow object with windowTitle = title.

Parameters
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().

◆ ~ViewportMainWindow()

Isis::ViewportMainWindow::~ViewportMainWindow ( )
virtual

Definition at line 55 of file ViewportMainWindow.cpp.

Member Function Documentation

◆ activeToolBar()

QToolBar * Isis::ViewportMainWindow::activeToolBar ( )
inline

Returns the active toolbar.

Definition at line 68 of file ViewportMainWindow.h.

References p_activeToolbar.

◆ closeEvent()

void Isis::ViewportMainWindow::closeEvent ( QCloseEvent * event)
protectedvirtual

This class is called when a close event occurs, it emits a signal and ignores the close event.

Parameters
event
History
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.

Reimplemented from Isis::MainWindow.

Definition at line 115 of file ViewportMainWindow.cpp.

References Isis::MainWindow::closeEvent(), closeWindow(), Isis::Workspace::confirmClose(), and p_workspace.

◆ closeWindow

void Isis::ViewportMainWindow::closeWindow ( QCloseEvent * event = NULL)
signal

Signal called when the window receives a close event.

Referenced by closeEvent().

◆ displayWarning

void Isis::ViewportMainWindow::displayWarning ( std::string & pStr,
const std::string & pExStr )
slot

Slot which receives the warning signal.

Calls the Track Tool to display the warning status

Parameters
pStr- Warning message
pExStr- Propagated exception message

Definition at line 65 of file ViewportMainWindow.cpp.

References Isis::TrackTool::displayWarning(), and mTrackTool.

◆ getMenu()

QMenu * Isis::ViewportMainWindow::getMenu ( const QString & name)

Returns the menu with menu name = name.

Parameters
name
Returns
QMenu*

Definition at line 87 of file ViewportMainWindow.cpp.

References p_menus.

◆ getTrackTool()

TrackTool * Isis::ViewportMainWindow::getTrackTool ( )
inline

Definition at line 78 of file ViewportMainWindow.h.

◆ permanentToolBar()

QToolBar * Isis::ViewportMainWindow::permanentToolBar ( )
inline

Returns the permanent toolbar.

Definition at line 63 of file ViewportMainWindow.h.

References p_permToolbar.

◆ readSettings()

void Isis::MainWindow::readSettings ( QSize defaultSize = QSize())
protectedvirtualinherited

This method ensure that the settings get written even if the Main window was only hidden, not closed.

Parameters
eventThis 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().

◆ resetWarning

void Isis::ViewportMainWindow::resetWarning ( void )
slot

Slot which receives the message to reset warning status.

Definition at line 74 of file ViewportMainWindow.cpp.

References mTrackTool, and Isis::TrackTool::resetStatusWarning().

◆ settingsFileName() [1/2]

QString Isis::MainWindow::settingsFileName ( ) const
protectedinherited

Definition at line 96 of file MainWindow.cpp.

◆ settingsFileName() [2/2]

QString Isis::MainWindow::settingsFileName ( QString objectTitle)
staticinherited

Definition at line 43 of file MainWindow.cpp.

◆ toolPad()

ToolPad * Isis::ViewportMainWindow::toolPad ( )
inline

Returns the toolpad.

Definition at line 73 of file ViewportMainWindow.h.

References p_toolpad.

◆ workspace()

Workspace * Isis::ViewportMainWindow::workspace ( )
inline

Returns the current workspace.

Definition at line 58 of file ViewportMainWindow.h.

References p_workspace.

◆ writeSettings()

void Isis::MainWindow::writeSettings ( ) const
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().

Member Data Documentation

◆ mTrackTool

TrackTool* Isis::ViewportMainWindow::mTrackTool
private

Pointer to application's Status bar.

Definition at line 92 of file ViewportMainWindow.h.

Referenced by displayWarning(), resetWarning(), and ViewportMainWindow().

◆ p_activeToolbar

QToolBar* Isis::ViewportMainWindow::p_activeToolbar
private

The active toolbar.

Definition at line 88 of file ViewportMainWindow.h.

Referenced by activeToolBar(), and ViewportMainWindow().

◆ p_appName

std::string Isis::ViewportMainWindow::p_appName
private

The app name.

Definition at line 91 of file ViewportMainWindow.h.

◆ p_menus

std::map<QString, QMenu *> Isis::ViewportMainWindow::p_menus
private

Map of qstrings to menus.

Definition at line 90 of file ViewportMainWindow.h.

Referenced by getMenu().

◆ p_permToolbar

QToolBar* Isis::ViewportMainWindow::p_permToolbar
private

The permanent toolbar.

Definition at line 87 of file ViewportMainWindow.h.

Referenced by permanentToolBar(), and ViewportMainWindow().

◆ p_toolpad

ToolPad* Isis::ViewportMainWindow::p_toolpad
private

The toolpad.

Definition at line 89 of file ViewportMainWindow.h.

Referenced by toolPad(), and ViewportMainWindow().

◆ p_workspace

Workspace* Isis::ViewportMainWindow::p_workspace
private

The current workspace.

Definition at line 86 of file ViewportMainWindow.h.

Referenced by closeEvent(), ViewportMainWindow(), and workspace().


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