MainWindow::MainWindow() : m_glViewer(new Viewer) , m_settings(new ProgramSettings) { setMinimumSize(800, 500); //J'adore ce petit bout de code...je veux ca en poster...well done max :P if (m_settings->isFullscreen()) showFullScreen(); setCentralWidget(m_glViewer); createActions(); createMenus(); createToolBars(); createStatusBar(); createDocks(); connect(m_glViewer, SIGNAL(sigMsg(QString)), m_logWidget, SLOT(slotMsg(QString))); m_infos->setViewerPointer(m_glViewer); connect(m_glViewer, SIGNAL(drawFinished(bool)), m_infos, SLOT(refreshBox(bool))); // Originalement pour savoir si un document a été modifié. Changer pour voir si simulation en cours. // connect(textEdit->document(), SIGNAL(contentsChanged()), this, SLOT(documentWasModified())); setCurrentFile(""); }
void MainWindow::on_pushButton_clicked() { qDebug("run dlg"); Dialog dlg(this); ; connect(this, SIGNAL(signalMsg(QString)), &dlg, SLOT(slotMsg(QString))); dlg.show(); #if 0 if ( dlg.exec() == QDialog::Accepted ) { qDebug("dlg accepted"); } else { qDebug("dlg rejected"); } #endif }