MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); connectActions(); bridgeCPU = std::shared_ptr<COMMUNCATION_BRIDGE>(new COMMUNCATION_BRIDGE); bridgePPU = std::shared_ptr<COMMUNCATION_BRIDGE>(new COMMUNCATION_BRIDGE); cpu = std::shared_ptr<CPU_6502>(new CPU_6502(mapper, bridgeCPU)); }
void MainWindow::createActions() { m_loadLevelAct = new QAction(QIcon(":icons/resources/icons/open.png"), tr("&Load level"), this); m_startGameAct = new QAction(QIcon(":icons/resources/icons/restart.png"), tr("St&art"), this); m_stopGameAct = new QAction(QIcon(":icons/resources/icons/stop.png"), tr("&Stop"), this); m_pauseGameAct = new QAction(QIcon(":icons/resources/icons/pause.png"), tr("&Pause"), this); m_resumeGameAct = new QAction(QIcon(":icons/resources/icons/resume.png"), tr("&Resume"), this); QActionGroup * pauseResumeActGrp = new QActionGroup(this); pauseResumeActGrp->addAction(m_pauseGameAct); pauseResumeActGrp->addAction(m_resumeGameAct); pauseResumeActGrp->setExclusive(true); connectActions(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); connectActions(App::instance()); ui->menuEdit->addAction(App::instance()->undoAction()); ui->menuEdit->addAction(App::instance()->redoAction()); setShortcuts(); populateMenu(ui->menuAdd); }
MainWindow::MainWindow() : ui(new Ui::MainWindow) { ui->setupUi(this); //QDir::setCurrent(QApplication::applicationDirPath()); sketchWidgetCreated = false; singleMesh = true; foliage = true; renderWithTexture = true; lastGeneratedFile = ""; optionD = 2; optionB = 500; optionP = -1; textureIndex = 1; storeRoot = 1; subdivs = 0; connectActions(); createActions(); createToolBars(); setupWidgets(); this->releaseKeyboard(); setWindowTitle(tr("YggdrasilTreeDraw")); setLineMode(); brushSize->setCurrentIndex(2); acceptedImageFormats.append("*.jpg"); acceptedImageFormats.append("*.png"); acceptedImageFormats.append("*.pgm"); acceptedImageFormats.append("*.raw"); // QDir directory("./Resources/Textures/"); // QStringList textureList = directory.entryList(acceptedImageFormats); leafWindow = new LeafWindow(); foliageParameters = new FoliageParameters(); connect(foliageParameters,SIGNAL(foliageChanged()),this,SLOT(foliageChanged())); displayWidget->setBarkTexture("./Resources/Textures/bark.jpg"); displayWidget->setLeafTexture("./Resources/Generated_Leaves/Leaf_Textures/default/default_top.png"); //displayWidget->setLeafTexture("./Resources/Generated_Leaves/Leaf_Textures/default/alphaTest.png"); synthDialog = new TextureSynthesisDialog(); }
MainWindow::MainWindow(QWidget* parent): CGAL::Qt::DemosMainWindow(parent) { setupUi(this); this->viewer->setScene(&scene); process = new QProcess(this); connectActions(); this->addAboutDemo(":/cgal/help/about_Periodic_Lloyd_3.html"); this->addAboutCGAL(); scene.eight_copies=false; scene.two_dimensional=false; qtimer = new QTimer(this); connect(qtimer, SIGNAL(timeout()), this, SLOT(lloydStep())); }
GUI::AnalysisBox::AnalysisBox(QWidget* parent) : QFrame(parent) { createUi(); connectActions(); setContentsMargins(0,0,0,0); setFixedHeight(250); timer_updateLabels_.start(200); origVidPlayer_=std::make_unique<VideoPlayer>(); anaVidPlayer_=std::make_unique<VideoPlayer>(); graphPlayer_=std::make_unique<GraphPlayer>(); origVidPlayer_->addView(*origView_); anaVidPlayer_->addView(*anaView_); calculator_=std::make_unique<GraphCalculator>(); graphWidget_->setGraphCalculator(calculator_.get()); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); spreadsheet = new Spreadsheet; setCentralWidget(spreadsheet); createStatusBar(); connectActions(); createRecentFileActions(); createRecentFileMenus(); createContextMenu(); readSettings(); setCurrentFile(""); }
MainWindow::MainWindow(QWidget* parent) : CGAL::Qt::DemosMainWindow(parent) { // Qt Automatic Connections // http://doc.qt.io/qt-5/designer-using-a-ui-file.html#automatic-connections // setupUi(this) automatically generates connections to the slots named // "on_<action_name>_<signal_name>" setupUi(this); this->viewer->setScene(&m_scene); m_scene.setViewer(this->viewer); // setup Mode menu group actions QActionGroup *modeGroup = new QActionGroup(this); modeGroup->addAction(this->actionNormal_View); modeGroup->addAction(this->actionInsert_Vertex); modeGroup->addAction(this->actionInsert_Point); modeGroup->addAction(this->actionSelect_Vertex); modeGroup->addAction(this->actionMove_Vertex); modeGroup->addAction(this->actionFind_NearestNb); modeGroup->addAction(this->actionEmpty_Sphere); QObject::connect(modeGroup, SIGNAL(triggered(QAction *)), this, SLOT(setMode(QAction *))); // connect menu actions to viewer slots connectActions(); // About menu // addAboutCGAL() is a function in DemoMainWindow // it will add a menu action "About CGAL..." to Help menu and connect to popupAboutCGAL // default popupAboutCGAL points to a fixed file directory ":/cgal/help/about_CGAL.html" // here we override it with our directory this->addAboutCGAL(); // addAboutDemo(QString htmlResourceName) is also a function in DemoMainWindow // it will add a menu action "About Demo..." to Help menu // when the action is invoked, it will popup a messageBox showing the given html this->addAboutDemo( "documentation/about.html" ); // read last setting from .ini file viewer->readSettings(); }
GUI::PreviewControlPanel::PreviewControlPanel(QWidget* parent):QFrame(parent) { createUi(); connectActions(); updater_.start(500); }
GUI::YuvInfoDialog::YuvInfoDialog(QWidget* parent):QDialog(parent) { createUi(); connectActions(); }
GUI::YuvFileOpenDialog::YuvFileOpenDialog(QWidget* parent):QDialog(parent) { createUi(); connectActions(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { _core.loadPlugins("limbs"); ui->setupUi(this); _pluginsManager = new PluginsManagerWidget(this); _pluginsManager->setModal(true); _pluginsManager->setCore(&_core); _pluginsManager->close(); _settingsWidget = new SettingsWidget(this); _settingsWidget->setModal(true); _settingsWidget->setCore(&_core); connectActions(); populateMenus(); populateToolbars(); populateDocks(); populateViews(); populateCommands(); /*TreeInterface *iTree; SerializerInterface *iSerializer; foreach(QObject *object, _core.plugins()) { iTree = qobject_cast<TreeInterface *>(object); if ( !iTree ) continue; break; } foreach(QObject *object, _core.plugins()) { iSerializer = qobject_cast<SerializerInterface *>(object); if ( !iSerializer ) continue; break; } _root = iTree->create(); iSerializer->deserialize(QString("test2.yml"), _root); foreach(QObject *object, _core.plugins()) { MainWindowViewInterface *iView; iView = qobject_cast<MainWindowViewInterface *>(object); if ( !iView ) continue; ui->viewTabs->addTab(iView->newView(_root, this), tr("321")); break; }*/ }