6#include "ViewportMainWindow.h"
21 setWindowTitle(title);
22 setObjectName(
"MainWindow");
26 p_permToolbar->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
32 p_activeToolbar->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
36 QStatusBar *sbar = statusBar();
37 sbar->showMessage(
"Ready");
43 p_toolpad->setObjectName(
"ViewportMainWindow");
44 p_toolpad->setAllowedAreas(Qt::LeftToolBarArea | Qt::RightToolBarArea);
45 addToolBar(Qt::RightToolBarArea,
p_toolpad);
55 ViewportMainWindow::~ViewportMainWindow() {
88 std::map<QString, QMenu *>::iterator pos;
94 QMenu *menu = menuBar()->addMenu(name);
118 if (event->isAccepted()) {
Base class for the Qisis main windows.
virtual void closeEvent(QCloseEvent *event)
This method is overridden so that we can be sure to write the current settings of the Main window.
virtual void readSettings(QSize defaultSize=QSize())
This method ensure that the settings get written even if the Main window was only hidden,...
void closeWindow(QCloseEvent *event=NULL)
Signal called when the window receives a close event.
QToolBar * p_activeToolbar
The active toolbar.
ToolPad * p_toolpad
The toolpad.
virtual void closeEvent(QCloseEvent *event)
This class is called when a close event occurs, it emits a signal and ignores the close event.
std::map< QString, QMenu * > p_menus
Map of qstrings to menus.
ViewportMainWindow(QString title, QWidget *parent=0)
Constructs a ViewportMainWindow object with windowTitle = title.
void resetWarning(void)
Slot which receives the message to reset warning status.
Workspace * p_workspace
The current workspace.
QToolBar * p_permToolbar
The permanent toolbar.
TrackTool * mTrackTool
Pointer to application's Status bar.
QMenu * getMenu(const QString &name)
Returns the menu with menu name = name.
void displayWarning(std::string &pStr, const std::string &pExStr)
Slot which receives the warning signal.
bool confirmClose()
Confirms that the user wishes toc lose the Workspace.
This is free and unencumbered software released into the public domain.