comparison gui/src/MainWindow.cpp @ 13577:e440b3f32f02

Fixed bug with closing subwindows.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Mon, 01 Aug 2011 18:51:36 +0200
parents 7828e1bf5b0d
children 3e5a8ef9c76d
comparison
equal deleted inserted replaced
13576:11fcb7094945 13577:e440b3f32f02
26 #include "FileEditorMdiSubWindow.h" 26 #include "FileEditorMdiSubWindow.h"
27 #include "ImageViewerMdiSubWindow.h" 27 #include "ImageViewerMdiSubWindow.h"
28 #include "SettingsDialog.h" 28 #include "SettingsDialog.h"
29 #include "cmd-edit.h" 29 #include "cmd-edit.h"
30 30
31 #define VERSION_STRING "Octave GUI (0.7.2)" 31 #define VERSION_STRING "Octave GUI (0.7.3)"
32 32
33 MainWindow::MainWindow (QWidget * parent):QMainWindow (parent) 33 MainWindow::MainWindow (QWidget * parent):QMainWindow (parent)
34 { 34 {
35 construct (); 35 construct ();
36 OctaveLink::instance ()->launchOctave(); 36 OctaveLink::instance ()->launchOctave();
348 connect (agoraAction, SIGNAL (triggered ()), this, SLOT (openAgoraPage ())); 348 connect (agoraAction, SIGNAL (triggered ()), this, SLOT (openAgoraPage ()));
349 connect (octaveForgeAction, SIGNAL (triggered ()), this, SLOT (openOctaveForgePage ())); 349 connect (octaveForgeAction, SIGNAL (triggered ()), this, SLOT (openOctaveForgePage ()));
350 connect (aboutOctaveAction, SIGNAL (triggered ()), this, SLOT (showAboutOctave ())); 350 connect (aboutOctaveAction, SIGNAL (triggered ()), this, SLOT (showAboutOctave ()));
351 connect (aboutQt, SIGNAL (triggered ()), this, SLOT (showAboutQt ())); 351 connect (aboutQt, SIGNAL (triggered ()), this, SLOT (showAboutQt ()));
352 352
353 // TODO: Visibility cannot be taken as a signal, because it will be emitted even then
354 // the dock widget is tabbed or minimized.
355 connect (showWorkspaceAction, SIGNAL (toggled (bool)), m_variablesDockWidget, SLOT (setShown (bool))); 353 connect (showWorkspaceAction, SIGNAL (toggled (bool)), m_variablesDockWidget, SLOT (setShown (bool)));
356 //connect (m_variablesDockWidget, SIGNAL (visibilityChanged (bool)), showWorkspaceAction, SLOT (setChecked (bool))); 354 connect (m_variablesDockWidget, SIGNAL (activeChanged (bool)), showWorkspaceAction, SLOT (setChecked (bool)));
357 connect (showHistoryAction, SIGNAL (toggled (bool)), m_historyDockWidget, SLOT (setShown (bool))); 355 connect (showHistoryAction, SIGNAL (toggled (bool)), m_historyDockWidget, SLOT (setShown (bool)));
358 //connect (m_historyDockWidget, SIGNAL (visibilityChanged (bool)), showHistoryAction, SLOT (setChecked (bool))); 356 connect (m_historyDockWidget, SIGNAL (activeChanged (bool)), showHistoryAction, SLOT (setChecked (bool)));
359 connect (showFileBrowserAction, SIGNAL (toggled (bool)), m_filesDockWidget, SLOT (setShown (bool))); 357 connect (showFileBrowserAction, SIGNAL (toggled (bool)), m_filesDockWidget, SLOT (setShown (bool)));
360 //connect (m_filesDockWidget, SIGNAL (visibilityChanged (bool)), showFileBrowserAction, SLOT (setChecked (bool))); 358 connect (m_filesDockWidget, SIGNAL (activeChanged (bool)), showFileBrowserAction, SLOT (setChecked (bool)));
361 359
362 connect (this, SIGNAL (settingsChanged ()), m_variablesDockWidget, SLOT (noticeSettings ())); 360 connect (this, SIGNAL (settingsChanged ()), m_variablesDockWidget, SLOT (noticeSettings ()));
363 connect (this, SIGNAL (settingsChanged ()), m_historyDockWidget, SLOT (noticeSettings ())); 361 connect (this, SIGNAL (settingsChanged ()), m_historyDockWidget, SLOT (noticeSettings ()));
364 connect (this, SIGNAL (settingsChanged ()), m_filesDockWidget, SLOT (noticeSettings ())); 362 connect (this, SIGNAL (settingsChanged ()), m_filesDockWidget, SLOT (noticeSettings ()));
365 363