//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- RiuPlotMainWindow::RiuPlotMainWindow() : m_activePlotViewWindow(nullptr), m_windowMenu(nullptr), m_blockSlotSubWindowActivated(false) { m_mdiArea = new QMdiArea; m_mdiArea->setOption(QMdiArea::DontMaximizeSubWindowOnActivation, true); connect(m_mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), SLOT(slotSubWindowActivated(QMdiSubWindow*))); setCentralWidget(m_mdiArea); createMenus(); createToolBars(); createDockPanels(); // Store the layout so we can offer reset option m_initialDockAndToolbarLayout = saveState(0); m_dragDropInterface = std::unique_ptr<caf::PdmUiDragDropInterface>(new RiuDragDrop()); // Enabling the line below will activate the undo stack // When enableUndoCommandSystem is set false, all commands are executed and deleted immediately // caf::CmdExecCommandManager::instance()->enableUndoCommandSystem(true); }
/*! \brief Constructor. Creates a new MainWindow instance. \param parent parent widget of this window, default value is \a 0 */ Ui::MainWindow::MainWindow(QWidget *parent /* = 0 */) : QMainWindow(parent) { setWindowIcon(QIcon(":/app")); setWindowTitle(tr("PicWorks v%1", "Main window title with version number.").arg(appCtx->version())); mapper = new QSignalMapper(this); mdiArea = new QMdiArea; setCentralWidget(mdiArea); createActions(); createMenus(); createStatusBar(); createDockPanels(); createToolBar(); createToolBox(); createCommonBar(); establishConnections(); }