MainWindow::MainWindow() { outputLog = new QTextEdit(this); outputLog->setReadOnly(true); outputLog->append("MTG log \n-------\n"); //to be created a central widget //setCentralWidget(new QWidget()); setCentralWidget(outputLog); setWindowIcon(QIcon(":/images/MTG.png")); //creating the menu titles fileMenu = menuBar()->addMenu(tr("&File")); //editMenu = menuBar()->addMenu(tr("&Edit")); analyzerMenu = menuBar()->addMenu(tr("Analyzer")); DMmenu = menuBar()->addMenu(tr("DataManager")); MMmenu = menuBar()->addMenu(tr("MaskManager")); viewMenu = menuBar()->addMenu(tr("&View")); menuBar()->addSeparator(); helpMenu = menuBar()->addMenu(tr("&Help")); // creating stuff //warning: take care of the order you call these functions createDockWindows(); createActions(); createMenus(); createToolBars(); createStatusBar(); QFile file(":/styles.qss"); file.open(QFile::ReadOnly); QString styleSheet = QLatin1String(file.readAll()); qApp->setStyleSheet(styleSheet); setWindowTitle(tr("Matrix Tool GUI")); setIconSize(QSize(35,35)); desktop = qApp->desktop(); connect(desktop, SIGNAL(resized(int)), this, SLOT(centerMainWindowGeometry())); //connect(dataManager, SIGNAL(plotHisto(QPair<matrixData*, QString>)), this, SLOT(raisePlotDock())); connect(dataManager, SIGNAL(plotHisto(QPair<matrixData*, QString>)), plotWidget, SLOT(histoMatrix(QPair<matrixData*, QString>))); //connect(dataManager, SIGNAL(inspectMatrixData(QPair<matrixData*, QString>)), this, SLOT(raiseEVDock())); connect(dataManager, SIGNAL(inspectMatrixData(QPair<matrixData*, QString>)),eventViewer, SLOT(attachMatrixData(QPair<matrixData*, QString>))); //raise the involved dock when action is triggered connect(newDataSetAct, SIGNAL(triggered()), this, SLOT(raiseDMDock())); connect(rmDataSetAct, SIGNAL(triggered()), this, SLOT(raiseDMDock())); connect(rmAllDataSetAct, SIGNAL(triggered()), this, SLOT(raiseDMDock())); connect(plotDataSetAct, SIGNAL(triggered()), this, SLOT(raiseDMDock())); connect(plotDataSetAct, SIGNAL(triggered()), this, SLOT(raisePlotDock())); connect(saveDataSetAct, SIGNAL(triggered()), this, SLOT(raiseDMDock())); connect(inspectEventAct, SIGNAL(triggered()), this, SLOT(raiseDMDock())); connect(inspectEventAct, SIGNAL(triggered()), this, SLOT(raiseEVDock())); connect(renameDataSetAct, SIGNAL(triggered()), this, SLOT(raiseDMDock())); // connect(newMaskSetAct, SIGNAL(triggered()), this, SLOT(raiseMMDock())); connect(printMaskAct, SIGNAL(triggered()), this, SLOT(raiseMMDock())); connect(rmMaskSetAct, SIGNAL(triggered()), this, SLOT(raiseMMDock())); connect(renameMaskSetAct, SIGNAL(triggered()), this, SLOT(raiseMMDock())); connect(editMaskAct, SIGNAL(triggered()), this, SLOT(raiseMMDock())); //raise the involved dock when made visible connect(DMviewAct, SIGNAL(triggered()), this, SLOT(raiseDMDock())); connect(MMviewAct, SIGNAL(triggered()), this, SLOT(raiseMMDock())); connect(plotViewAct, SIGNAL(triggered()), this, SLOT(raisePlotDock())); connect(EVviewAct, SIGNAL(triggered()), this, SLOT(raiseEVDock())); //connect the log output signals connect(dataManager, SIGNAL(outputLog(QString)), outputLog, SLOT(append(QString))); connect(maskManager, SIGNAL(outputLog(QString)), outputLog, SLOT(append(QString))); connect(plotWidget, SIGNAL(outputLog(QString)), outputLog, SLOT(append(QString))); connect(eventViewer, SIGNAL(outputLog(QString)), outputLog, SLOT(append(QString))); setUnifiedTitleAndToolBarOnMac(true); }
/**************************************************************************** ** ** Copyright (C) 2016 ** ** This file is generated by the Magus toolkit ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ****************************************************************************/ // Include #include "constants.h" #include <QString> #include <QFile> #include <QTextStream> #include <QMenuBar> #include "mainwindow.h" #include "OgreItem.h" #include "OgreHlmsPbs.h" #include "OgreHlmsUnlit.h" #include "OgreHlmsPbsDatablock.h" #include "OgreHlmsUnlitDatablock.h" #include "OgreHlmsManager.h" //****************************************************************************/ MainWindow::MainWindow(void) : mIsClosing(false), mFirst(true) { installEventFilter(this); // Create the Ogre Manager mOgreManager = new Magus::OgreManager(); mHlmsName = QString(""); mTempString = QString(""); // Perform standard functions createActions(); createMenus(); createToolBars(); createStatusBar(); createDockWindows(); mMaterialBrowser = new MaterialBrowserDialog(this); loadMaterialBrowserCfg(); mOgreManager->initialize(); // Set the title setWindowTitle(QString("HLMS editor")); // Set the stylesheet of the application QFile File(QString("dark.qss")); File.open(QFile::ReadOnly); QString styleSheet = QLatin1String(File.readAll()); setStyleSheet(styleSheet); showMaximized(); }
/*! * \brief MainWindow initializer. * * Calls methots to create scene, DAG, table datamodel, actions, menus, * statusbar and docked subwindows. Also calls loadPlugins() that loads * all DLL plugins. * @see createScene() * @see createDAG() * @see createData() * @see createActions() * @see createMenus() * @see createStatusBar() * @see loadPlugins() * @see createDockWindows() */ MainWindow::MainWindow() { qDebug() << "MainWindow init start..."; qDebug() << "MainWindow scene..."; createScene(); qDebug() << "MainWindow DAG..."; createDAG(); qDebug() << "MainWindow data..."; createData(); qDebug() << "MainWindow actions..."; createActions(); qDebug() << "MainWindow menus..."; createMenus(); qDebug() << "MainWindow statusbar..."; createStatusBar(); qDebug() << "MainWindow load plugins..."; loadPlugins(); createDockWindows(); setWindowTitle(tr("Piri v.01")); qDebug() << "MainWindow initialized!"; }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { undoStack = new QUndoStack(this); createActions(); createMenus(); createToolBars(); createStatusBar(); createCentralWidget(); createDockWindows(); #ifndef QT_NO_DEBUG createUndoView(); #endif connect(pipelineWidget, SIGNAL(sourceCodeChanged(QString)), codeWidget, SLOT(setPlainText(QString))); connect(pipelineWidget, SIGNAL(outputPixmapChanged(QPixmap)), imageWidget, SLOT(updatePixmap(QPixmap))); setWindowTitle("Prototyping Toolkit for Image Processing"); loadImageFile(":/Images/lena.jpg"); resize(QGuiApplication::primaryScreen()->availableSize() * 3 / 5); }
void DesktopMainWindow::initUi() { setWindowTitle(tr("Godzi[*] - Pelican Mapping")); setWindowIcon(QIcon(":/resources/images/pmicon32.png")); _osgViewer = new Godzi::UI::ViewerWidget( this, 0, 0, true ); _app->setView( _osgViewer ); setCentralWidget(_osgViewer); createActions(); createMenus(); createToolbars(); createDockWindows(); QSettings settings(ORG_NAME, APP_NAME); //Set default state/geometry if unset //if (!settings.value("default_state").isValid()) settings.setValue("default_state", saveState()); //Restore window state restoreGeometry(settings.value("geometry").toByteArray()); restoreState(settings.value("windowstate").toByteArray()); updateStatusBar(tr("Ready")); }
MainWindow::MainWindow( bool debug ) : QMainWindow(), m_debug( debug ) { m_centralWidget = new QMainWindow(); m_centralWidget->setObjectName( "central widget" ); m_centralWidget->setDockOptions( QMainWindow::AnimatedDocks | QMainWindow::AllowNestedDocks | QMainWindow::AllowTabbedDocks ); m_centralWidget->setDocumentMode( true ); setCentralWidget( m_centralWidget ); loadColormaps(); createActions(); createMenus(); createToolBars(); createDockWindows(); // this needs to be done after the view is created m_toolsToolBar->setSelectionModel( m_datasetWidget->selectionModel() ); createStatusBar(); setWindowTitle( tr( "Fibernavigator 2" ) ); setUnifiedTitleAndToolBarOnMac( true ); loadSettings(); }
/* Widgets */ Widgets::Widgets(QWidget* parent) : QMainWindow(parent) { m_officeStyle = Q_NULL; setWindowTitle(tr("Qtitan Widgets Sample")); m_styleName = qApp->style()->objectName(); m_mdiArea = new QMdiArea; m_mdiArea->setViewMode(QMdiArea::TabbedView); m_mdiArea->setLineWidth(3); m_mdiArea->setFrameShape(QFrame::Panel); m_mdiArea->setFrameShadow(QFrame::Sunken); setCentralWidget(m_mdiArea); setIconSize(QSize(16, 16)); createActions(); createDockWindows(); createMenubar(); createToolbar(); statusBar(); createMdiChild(); QRect geom = QApplication::desktop()->availableGeometry(); resize(2 * geom.width() / 3, 2 * geom.height() / 3); updateStyle(m_actOffice2007Style); updateTheme(m_actBlueTheme); readSettings(); }
MainWindow::MainWindow(const QString &title) { m_instance = this; setWindowTitle(title); // Create Work Space m_workspace = new QMdiArea(this); setCentralWidget(m_workspace); setMinimumWidth(1024); // Create Data Manager m_dataManager = new DataManager(); // Create Menus/Windows createDockWindows(); createActions(); createMenus(); // Setup handling of windows connect(m_workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(focus(QMdiSubWindow*))); connect(m_workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), m_meshViewOptionsWidget, SLOT(focus(QMdiSubWindow*))); connect(m_workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), m_cleaverWidget, SLOT(focus(QMdiSubWindow*))); connect(m_workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)), m_sizingFieldWidget, SLOT(focus(QMdiSubWindow*))); connect(m_workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)), m_dataManagerWidget, SLOT(focus(QMdiSubWindow*))); m_iNumOpenWindows = 0; exePath_ = QFileInfo( QCoreApplication::applicationFilePath()).path().toStdString(); std::ifstream path((exePath_ + "/.path").c_str()); if(path.is_open()) { path >> lastPath_; path.close(); }
void MainWindow::moreInitDock() { //DebugDialog::debug("create view switcher"); createDockWindows(); if (m_fileProgressDialog) { m_fileProgressDialog->setValue(93); } }
MainWindow::MainWindow(ChessGame* game) : m_game(nullptr), m_closing(false), m_readyToClose(false) { setAttribute(Qt::WA_DeleteOnClose, true); QHBoxLayout* clockLayout = new QHBoxLayout(); for (int i = 0; i < 2; i++) { m_chessClock[i] = new ChessClock(); clockLayout->addWidget(m_chessClock[i]); Chess::Side side = Chess::Side::Type(i); m_chessClock[i]->setPlayerName(side.toString()); } clockLayout->insertSpacing(1, 20); m_gameViewer = new GameViewer; m_gameViewer->setContentsMargins(6, 6, 6, 6); m_moveList = new MoveList(this); m_tagsModel = new PgnTagsModel(this); new ModelTest(m_tagsModel, this); QVBoxLayout* mainLayout = new QVBoxLayout(); mainLayout->addLayout(clockLayout); mainLayout->addWidget(m_gameViewer); // The content margins look stupid when used with dock widgets mainLayout->setContentsMargins(0, 0, 0, 0); QWidget* mainWidget = new QWidget(this); mainWidget->setLayout(mainLayout); setCentralWidget(mainWidget); setStatusBar(new QStatusBar()); createActions(); createMenus(); createToolBars(); createDockWindows(); connect(m_moveList, SIGNAL(moveClicked(int)), m_gameViewer, SLOT(viewMove(int))); connect(m_moveList, SIGNAL(commentClicked(int, QString)), this, SLOT(editMoveComment(int, QString))); connect(m_gameViewer, SIGNAL(moveSelected(int)), m_moveList, SLOT(selectMove(int))); connect(CuteChessApplication::instance()->gameManager(), SIGNAL(finished()), this, SLOT(onGameManagerFinished()), Qt::QueuedConnection); addGame(game); }
void MainWindow::init(){ createActions(); createMenus(); //createToolBars(); createStatusBar(); createDockWindows(); //setUnifiedTitleAndToolBarOnMac(true); newLetter(); }
MainWindow::MainWindow() { resize(800,600); form = new Form(this); setCentralWidget(form); createActions(); createMenus(); createToolBars(); createStatusBar(); createDockWindows(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , m_hasValidPaths(false) , m_process(0) , m_currentImageFormat(SvgFormat) , m_needsRefresh(false) { setWindowTitle(TITLE_FORMAT_STRING .arg("") .arg(qApp->applicationName()) ); m_cache = new FileCache(0, this); m_recentDocuments = new RecentDocuments(MAX_RECENT_DOCUMENT_SIZE, this); connect(m_recentDocuments, SIGNAL(recentDocument(QString)), this, SLOT(onRecentDocumentsActionTriggered(QString))); m_autoRefreshTimer = new QTimer(this); connect(m_autoRefreshTimer, SIGNAL(timeout()), this, SLOT(refresh())); m_imageFormatNames[SvgFormat] = "svg"; m_imageFormatNames[PngFormat] = "png"; m_imageWidget = new PreviewWidget(this); m_imageWidgetScrollArea = new QScrollArea; m_imageWidgetScrollArea->setWidget(m_imageWidget); m_imageWidgetScrollArea->setAlignment(Qt::AlignCenter); m_imageWidgetScrollArea->setWidgetResizable(true); setCentralWidget(m_imageWidgetScrollArea); createDockWindows(); createActions(); createMenus(); createToolBars(); createStatusBar(); setUnifiedTitleAndToolBarOnMac(true); m_assistantInsertSignalMapper = new QSignalMapper(this); connect(m_assistantInsertSignalMapper, SIGNAL(mapped(QWidget*)), this, SLOT(onAssistantItemInsert(QWidget*))); readSettings(); QtSingleApplication* single_app = qobject_cast<QtSingleApplication*>(qApp); if (single_app) { single_app->setActivationWindow(this); connect(single_app, SIGNAL(messageReceived(QString)), this, SLOT(onSingleApplicationReceivedMessage(QString))); } }
MainWindow::MainWindow(osgViewer::ViewerBase::ThreadingModel threadingModel, QString filename, QWidget *parent) : QMainWindow(parent) { setupUi(this); _viewerWidget = new ViewerWidget(threadingModel, this); setCentralWidget(_viewerWidget); connect(actionTogglePolygonMode, SIGNAL(toggled(bool)), _viewerWidget, SLOT(togglePolygonMode(bool))); createDockWindows(); _loadFile(filename); }
//! [1] MainWindow::MainWindow() : textEdit(new QTextEdit) { setCentralWidget(textEdit); createActions(); createStatusBar(); createDockWindows(); setWindowTitle(tr("Dock Widgets")); newLetter(); setUnifiedTitleAndToolBarOnMac(true); }
MainWindow::MainWindow() { textEdit = new QTextEdit; setCentralWidget(textEdit); createActions(); createMenus(); createToolBars(); createStatusBar(); createDockWindows(); setWindowTitle(tr("Dock Widgets")); newLetter(); }
MainWindow::MainWindow() { createMenus(); createDockWindows(); communicator = new Communicator(); QObject::connect( communicator, SIGNAL(emitString(QString)), ttyTextEdit, SLOT( appendHtml( QString ) ) ); renderWidget = new DX12RenderWidget( communicator ); setWindowTitle( tr( "DirectXFrame" ) ); setCentralWidget( renderWidget ); }
MainWindow::MainWindow() { createActions(); createMenus(); createToolBars(); createDockWindows(); createStatusBar(); setWindowTitle(tr("Movie Player")); setUnifiedTitleAndToolBarOnMac(true); setAnimated(true); setDockNestingEnabled (true); runTestCuda(); resize(300, 400); }
//! [1] MainWindow::MainWindow() { // atSplashScreen(); textEdit = new QTextEdit; setCentralWidget(textEdit); createActions(); // Main Buttons createMenus(); createToolBars(); createStatusBar(); createDockWindows(); setWindowTitle(tr("EvudeTv")); channelScan(); setUnifiedTitleAndToolBarOnMac(true); }
MainWindow::MainWindow() { mNewFileCounter = 1; mProject = 0; mTransistionDiagram = 0; mProjectView = 0; mTabWidget = new QTabWidget; mTabWidget->setTabsClosable(true); connect(mTabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int))); setCentralWidget(mTabWidget); createStatusBar(); createDockWindows(); createActions(); createMenus(); createToolBars(); newBlankPage(); }
void PEditor::init() { setWindowIcon(QIcon(":/pi_icon.png")); env = new Environment(this); pi = new ProgInfo("."); doc = new DocViewer(); lineNumbering = true; tabWidget = new TabWidget(this); connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(switchToTab(int))); setCentralWidget(tabWidget); setFocusProxy(tabWidget); // textEdit = new TextEditWidget(tabWidget); textEdit = 0; createActions(); connect(tabWidget, SIGNAL(contextMenuAt(const QPoint &, int)), this, SLOT(showContextMenu(const QPoint &, int))); // The file actions are needed for showContextMenu(). createMenus(); createToolBars(); createStatusBar(); createDockWindows(); connect(env, SIGNAL(canCompileChanged(bool)), this, SLOT(canCompileChanged(bool))); // This should be placed after createActions(); if (env->getCanCompile()) enableCLActs(); else disableCLActs(); tabCloseButton = new QToolButton(this); tabCloseButton->setDefaultAction(tabCloseAction); tabWidget->setCornerWidget(tabCloseButton); connect(tabCloseButton, SIGNAL(clicked()), this, SLOT(removeTab())); readSettings(); openProgFunc(progName); }
MainWindow::MainWindow(QString projectPath, QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), m_progressDialog(NULL), m_renderProgressDialog(NULL), m_flowExaminer(NULL), m_cs(this) { ui->setupUi(this); m_project = new Project_sV(); m_wCanvas = new Canvas(m_project, this); setCentralWidget(m_wCanvas); createActions(); createDockWindows(); updateWindowTitle(); setWindowIcon(QIcon(":icons/slowmoIcon.png")); QSettings settings; bool show = settings.value("ui/displayHelp", false).toBool(); m_wCanvas->showHelp(show); settings.sync(); restoreGeometry(settings.value("mainwindow/geometry").toByteArray()); restoreState(settings.value("mainwindow/windowState").toByteArray()); if (!projectPath.isEmpty()) { loadProject(projectPath); } if (!settings.contains("binaries/ffmpeg")) { qDebug() << "need to find ffmpeg"; QMessageBox::information( this, "valid FFMPEG not found", "Please choose a working ffmpeg\n" , QMessageBox::Ok, 0 ); PreferencesDialog dialog; dialog.exec(); } }
MainWindow::MainWindow() { renderArea = new RenderArea(this); // tworzenie palety do rysowania setCentralWidget(renderArea); keyPressEater = new KeyPressEater(); createActions(); createMenus(); createDockWindows(); createStatusBar(); cmdLineEdit->setFocus(); connect(renderArea, SIGNAL(fail()), this, SLOT(fail())); setWindowTitle(tr("Turtle")); setWindowIcon(QIcon(":/images/hisc-app-kturtle.svg")); setCurrentFile(""); }
FenPrincipale::FenPrincipale( QWidget *parent) : QMainWindow(parent) { // ui->setupUi(this); textEdit = new QTextEdit; // setCentralWidget(textEdit); createActions(); createMenus(); createToolBars(); createStatusBar(); createDockWindows(); //setWindowIcon(":res/feuille_calcul"); tex.show(); setWindowTitle(tr("Caltopo")); // newLetter(); setUnifiedTitleAndToolBarOnMac(true); //connect( ui-> actionImportGSI, SIGNAL(triggered()), this, SLOT(ImportGSI2())); // ui-> actionImportGSI->setShortcut(tr("Ctrl+A")); // connect(ui -> actionQuitter, SIGNAL(triggered()), qApp, SLOT(quit())); // setWindowTitle(tr("Caltopo")); // connect (ui -> actioncreerProjet,SIGNAL(triggered()), this, SLOT(creerProjet())); // connect (ui -> actionouvrirProjet,SIGNAL(triggered()), this, SLOT(ouvrirProjet())); // connect (ui-> actionafficherTable, SIGNAL(triggered()), this, SLOT(afficherTable())); // connect (ui-> actiongestProjet, SIGNAL(triggered()), this, SLOT(gestProjet())); // connect (ui-> actionafficherPolygonal, SIGNAL(triggered()), this, SLOT(afficherPolygonal())); // connect (ui->actionGoogle_map,SIGNAL (triggered()), this,SLOT (ouvrirWeb())); // connect(ui->actionAfficher_la_fen_tre_de_la_polygo,SIGNAL (triggered()), this,SLOT (fenePolygo())); // tablemesures->hide(); // tabless->hide(); //center = new QTextEdit(this); }
/**************************************************************************** ** ** Copyright (C) 2015 ** ** This file is generated by the Magus toolkit ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ****************************************************************************/ // Include #include <QString> #include <QFile> #include <QMenuBar> #include <QHBoxLayout> #include <QPixmap> #include "mainwindow.h" #include "tool_filereader.h" #include "tool_gradientwidget.h" #include "tool_sceneviewwidget.h" #include "tool_layered_sceneviewwidget.h" #include "tool_glspherewidget.h" //****************************************************************************/ MainWindow::MainWindow(void) : mIsClosing(false) { mTextureSelection = 0; mTextureSelectionExt = 0; // Perform standard functions createActions(); createMenus(); createToolBars(); createStatusBar(); createDockWindows(); // Set the title setWindowTitle(QString("Tools")); // Set the stylesheet of the application QFile File(QString("dark.qss")); File.open(QFile::ReadOnly); QString styleSheet = QLatin1String(File.readAll()); setStyleSheet(styleSheet); showMaximized(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , showMessageTimout(3000) { createActions(); createMenus(); createToolBars(); createStatusBar(); createCentralWidget(); createDockWindows(); connect(pipelineWidget, SIGNAL(sourceCodeChanged(QString)), codeWidget, SLOT(setPlainText(QString))); connect(pipelineWidget, SIGNAL(outputPixmapChanged(QPixmap)), imageWidget, SLOT(updatePixmap(QPixmap))); setWindowTitle("Prototyping Toolkit for Image Processing"); loadImageFile(":/Images/lena.jpg"); resize(QGuiApplication::primaryScreen()->availableSize() * 3 / 5); }
DGLMainWindow::DGLMainWindow(QWidget *_parent, Qt::WindowFlags flags) : QMainWindow(_parent, flags), m_BusyDialog(this), m_ProjectSaved(false) { #pragma warning(push) #pragma warning(disable : 4127) // conditional expression is constant Q_INIT_RESOURCE(dglmainwindow); #pragma warning(pop) boost::shared_ptr<OsIcon> icon(Os::createIcon()); #ifdef _WIN32 setWindowIcon(QIcon(HICON_TO_QPIXMAP((HICON)icon->get()))); #endif // load designer UI m_ui.setupUi(this); setDockNestingEnabled(true); // create all widgets, actions iteractions etc... createActions(); createMenus(); createToolBars(); createStatusBar(); createDockWindows(); createInteractions(); // read QSettings readSettings(); showConfig(); if (QCoreApplication::arguments().size() == 2) { openProjectFromFile(QCoreApplication::arguments()[1]); } }
/*! * \brief MainWindow initializer. * * Calls methods to create mainwindow elements. * @see createActions() * @see createMenus() * @see createStatusBar() * @see createDockWindows() */ MainWindow::MainWindow() { contextMenuPos = QPointF(0.0, 0.0); qDebug() << "MainWindow init start..."; qDebug() << "MainWindow nodegraph..."; createNodeGraph(); qDebug() << "MainWindow actions..."; createActions(); qDebug() << "MainWindow menus..."; createMenus(); qDebug() << "MainWindow statusbar..."; createStatusBar(); qDebug() << "MainWindow dockwindows..."; createDockWindows(); qDebug() << "MainWindow load plugins..."; loadPlugins(); qDebug() << "Create message log..."; createMessageLog(); QDate date = QDate::currentDate(); QTime time = QTime::currentTime(); QString timeString = date.toString("dd.MM.yyyy") + " " + time.toString(); //setWindowTitle("Piri v.02 - " + timeString); setWindowTitle("Piri v.02"); qDebug() << "MainWindow initialized!"; triggerMenuByName("Viewer"); }
/**************************************************************************** ** ** Copyright (C) 2014 ** ** This file is generated by the Magus toolkit ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ****************************************************************************/ // Include #include <QString> #include <QFile> #include <QMenuBar> #include "mainwindow.h" //****************************************************************************/ MainWindow::MainWindow(void) : mIsClosing(false) { // Create the Ogre Manager mOgreManager = new OgreManager(); // Perform standard functions createActions(); createMenus(); createToolBars(); createStatusBar(); createDockWindows(); // Set the title setWindowTitle(QString("SimpleMaterialEditor")); // Set the stylesheet of the application QFile File(QString("dark.qss")); File.open(QFile::ReadOnly); QString styleSheet = QLatin1String(File.readAll()); setStyleSheet(styleSheet); showMaximized(); setEnabled(true); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); restoreGeometry( opts.mainwindowgeometry); restoreState( opts.windowstate ); setupStatusBar(); satlist = new SatelliteList(); seglist = new AVHRRSatellite(this, satlist); formephem = new FormEphem(this, satlist, seglist); ui->stackedWidget->addWidget(formephem); // index 0 formtoolbox = NULL; formgeostationary = new FormGeostationary(this, satlist, seglist); ui->stackedWidget->addWidget(formgeostationary); // index 1 cylequidist = new CylEquiDist( opts.backgroundimage2D ); mapcyl = new MapFieldCyl(this, cylequidist, satlist, seglist); globe = new Globe(this, satlist, seglist); formimage = new FormImage(this, satlist, seglist); imagescrollarea = new ImageScrollArea(); imagescrollarea->setBackgroundRole(QPalette::Dark); imagescrollarea->setWidget(formimage); formgeostationary->SetFormImage(formimage); connect(formimage, SIGNAL(moveImage(QPoint, QPoint)), this, SLOT(moveImage(QPoint, QPoint))); for( int i = 0; i < 8; i++) { connect(&seglist->seglmeteosat->watcherRed[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); connect(&seglist->seglmeteosat->watcherGreen[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); connect(&seglist->seglmeteosat->watcherBlue[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } for( int i = 0; i < 24; i++) { connect(&seglist->seglmeteosat->watcherHRV[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } for( int i = 0; i < 8; i++) { connect(&seglist->seglmeteosatrss->watcherRed[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); connect(&seglist->seglmeteosatrss->watcherGreen[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); connect(&seglist->seglmeteosatrss->watcherBlue[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } for( int i = 0; i < 24; i++) { connect(&seglist->seglmeteosatrss->watcherHRV[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } /* for( int i = 0; i < 6; i++) { connect(&seglist->seglelectro->watcherMono[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } */ for( int i = 0; i < 10; i++) { connect(&seglist->seglmet7->watcherMono[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } for( int i = 0; i < 7; i++) { connect(&seglist->seglgoes13dc3->watcherMono[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } for( int i = 0; i < 7; i++) { connect(&seglist->seglgoes15dc3->watcherMono[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } for( int i = 0; i < 6; i++) { connect(&seglist->seglmtsatdc3->watcherMono[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } for( int i = 0; i < 7; i++) { connect(&seglist->seglgoes13dc4->watcherMono[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } for( int i = 0; i < 7; i++) { connect(&seglist->seglgoes15dc4->watcherMono[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } for( int i = 0; i < 6; i++) { connect(&seglist->seglmtsatdc4->watcherMono[i], SIGNAL(finished()), formimage, SLOT(slotUpdateMeteosat())); } connect(seglist->seglfy2e, SIGNAL(imagefinished()), formimage, SLOT(slotUpdateMeteosat())); connect(seglist->seglfy2g, SIGNAL(imagefinished()), formimage, SLOT(slotUpdateMeteosat())); for( int i = 0; i < 10; i++) { connect(&seglist->seglh8->watcherRed[i], SIGNAL(finished()), formimage, SLOT(slotUpdateHimawari())); connect(&seglist->seglh8->watcherGreen[i], SIGNAL(finished()), formimage, SLOT(slotUpdateHimawari())); connect(&seglist->seglh8->watcherBlue[i], SIGNAL(finished()), formimage, SLOT(slotUpdateHimawari())); } imageptrs->gvp = new GeneralVerticalPerspective(this, seglist); imageptrs->lcc = new LambertConformalConic(this, seglist); imageptrs->sg = new StereoGraphic(this, seglist); formtoolbox = new FormToolbox(this, formimage, formgeostationary, seglist); formimage->SetFormToolbox(formtoolbox); formgeostationary->SetFormToolBox(formtoolbox); connect(seglist->seglmeteosat, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglmeteosatrss, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); //connect(seglist->seglelectro, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglmet7, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglgoes13dc3, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglgoes15dc3, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglmtsatdc3, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglgoes13dc4, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglgoes15dc4, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglmtsatdc4, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglfy2e, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglfy2g, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglh8, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglviirsm, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglmetop, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglnoaa, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglhrp, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); connect(seglist->seglgac, SIGNAL(progressCounter(int)), formtoolbox, SLOT(setValueProgressBar(int))); formglobecyl = new FormMapCyl( this, mapcyl, globe, formtoolbox, satlist, seglist); connect(seglist, SIGNAL(signalNothingSelected()), formglobecyl, SLOT(slotNothingSelected())); createDockWindows(); ui->stackedWidget->addWidget(formglobecyl); // index 2 ui->stackedWidget->addWidget(imagescrollarea); // index 3 ui->stackedWidget->setCurrentIndex(0); connect(seglist->seglmetop, SIGNAL(segmentlistfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect(seglist->seglnoaa, SIGNAL(segmentlistfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect(seglist->seglhrp, SIGNAL(segmentlistfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect(seglist->seglgac, SIGNAL(segmentlistfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect(seglist->seglviirsm, SIGNAL(segmentlistfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect(seglist->seglviirsdnb, SIGNAL(segmentlistfinished(bool)), formimage, SLOT(setPixmapToLabelDNB(bool))); connect(seglist->seglmetop, SIGNAL(segmentprojectionfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect(seglist->seglnoaa, SIGNAL(segmentprojectionfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect(seglist->seglhrp, SIGNAL(segmentprojectionfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect(seglist->seglgac, SIGNAL(segmentprojectionfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect(seglist->seglviirsm, SIGNAL(segmentprojectionfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect(seglist->seglviirsdnb, SIGNAL(segmentprojectionfinished(bool)), formimage, SLOT(setPixmapToLabel(bool))); connect( formglobecyl, SIGNAL(signalSegmentChanged(QString)), this, SLOT(updateStatusBarIndicator(QString)) ); connect( ui->stackedWidget, SIGNAL(currentChanged(int)),formglobecyl, SLOT(updatesatmap(int)) ); connect( formephem,SIGNAL(signalDirectoriesRead()), formgeostationary, SLOT(PopulateTree()) ); connect( seglist,SIGNAL(signalAddedSegmentlist()), formephem, SLOT(showSegmentsAdded())); connect( formephem,SIGNAL(signalDirectoriesRead()), formglobecyl, SLOT(setScrollBarMaximum())); connect( formglobecyl, SIGNAL(emitMakeImage()), formimage, SLOT(slotMakeImage())); connect( formtoolbox, SIGNAL(emitShowVIIRSImage()), formimage, SLOT(slotShowVIIRSImage())); connect( globe , SIGNAL(mapClicked()), formephem, SLOT(showSelectedSegmentList())); connect( mapcyl , SIGNAL(mapClicked()), formephem, SLOT(showSelectedSegmentList())); connect( formephem, SIGNAL(signalDatagram(QByteArray)), seglist, SLOT(AddSegmentsToListFromUdp(QByteArray))); connect( formimage, SIGNAL(render3dgeo(SegmentListGeostationary::eGeoSatellite)), globe, SLOT(Render3DGeo(SegmentListGeostationary::eGeoSatellite))); connect( formimage, SIGNAL(allsegmentsreceivedbuttons(bool)), formtoolbox, SLOT(setToolboxButtons(bool))); connect( globe, SIGNAL(renderingglobefinished(bool)), formtoolbox, SLOT(setToolboxButtons(bool))); connect( formgeostationary, SIGNAL(geostationarysegmentschosen(SegmentListGeostationary::eGeoSatellite, QStringList)), formtoolbox, SLOT(geostationarysegmentsChosen(SegmentListGeostationary::eGeoSatellite, QStringList))); connect( formtoolbox, SIGNAL(getmeteosatchannel(QString, QVector<QString>, QVector<bool>)), formgeostationary, SLOT(CreateGeoImage(QString, QVector<QString>, QVector<bool>))); connect( formtoolbox, SIGNAL(screenupdateprojection()), formimage, SLOT(slotUpdateProjection())); connect( formtoolbox, SIGNAL(switchstackedwidget(int)), this, SLOT(slotSwitchStackedWindow(int))); connect( formgeostationary, SIGNAL(enabletoolboxbuttons(bool)), formtoolbox, SLOT(setToolboxButtons(bool))); formtoolbox->setChannelIndex(); setWindowTitle(tr("EUMETCast Viewer")); timer = new QTimer( this ); timer->start( 1000); connect(timer, SIGNAL(timeout()), formephem, SLOT(timerDone())); connect(timer, SIGNAL(timeout()), this, SLOT(timerDone())); herr_t h5_status; unsigned int majnum; unsigned int minnum; unsigned int relnum; h5_status = H5get_libversion(&majnum, &minnum, &relnum); qDebug() << QString("HDF5 library %1.%2.%3").arg(majnum).arg(minnum).arg(relnum); }