//-------------------------------------------------------------- void ofApp::setup(){ ofSetFrameRate(60); ofSetVerticalSync(true); ofBackground(0); ofSetLogLevel(OF_LOG_SILENT); setupViewports(); parameters.setup(); robot.setup("192.168.1.9",parameters); // <-- swap with your robot's ip address setupGUI(); positionGUI(); // setup path controller path.setup(); line = buildPath(); // load/create different paths path.set(line); vector<Path *> pathPtrs; pathPtrs.push_back(&path); paths.setup(pathPtrs); feedRate = 0.001; }
void testApp::setup() { //Creates the semaphore with permisions rw,r,r, and 0 tokens mutex = sem_open("mutexForServer", O_CREAT, 0644, 0); if(mutex == SEM_FAILED) { perror("testApp: error creating semaphore"); return; } // Initialize last mouse position. lastMouseX = guiW+RENDER_WINDOW_BORDER; lastMouseY = RENDER_WINDOW_BORDER; // Initialize NXT server. The server thread will be waiting for new // polygons to send to the NXT. server = Server::getInstance(); server->startThread( true, false ); // blocking, non verbose // Initialize currentPolygon iterator to the begin of the polygons container. currentPolygon = polygons.begin(); //Initialise tempPolygon tempPolygon = (ofPtr<Polygon>)( new Polygon() ); // Setup GUI panel. setupGUI(); // Default app mode is polygon creation. appMode = MODE_POLYGON_CREATION; fractalCurrentRefVertex = 0; }
LoginDialog::LoginDialog(QWidget* parent) : QDialog(parent) { setupGUI(); setWindowTitle("Login"); setModal(true); }
KPlatoWork_MainWindow::KPlatoWork_MainWindow() : KParts::MainWindow() { debugPlanWork<<this; m_part = new KPlatoWork::Part( this, this ); KStandardAction::quit(qApp, SLOT(quit()), actionCollection()); KStandardAction::open(this, SLOT(slotFileOpen()), actionCollection()); // KStandardAction::save(this, SLOT(slotFileSave()), actionCollection()); QAction *a = KStandardAction::undo(m_part->undoStack(), SLOT(undo()), actionCollection()); a->setEnabled( false ); connect( m_part->undoStack(), SIGNAL(canUndoChanged(bool)), a, SLOT(setEnabled(bool)) ); a = KStandardAction::redo(m_part->undoStack(), SLOT(redo()), actionCollection()); a->setEnabled( false ); connect( m_part->undoStack(), SIGNAL(canRedoChanged(bool)), a, SLOT(setEnabled(bool)) ); setCentralWidget( m_part->widget() ); setupGUI( KXmlGuiWindow::ToolBar | KXmlGuiWindow::Keys | KXmlGuiWindow::StatusBar | KXmlGuiWindow::Save); createGUI( m_part ); connect( m_part, SIGNAL(captionChanged(QString,bool)), SLOT(setCaption(QString,bool)) ); }
DTipDialog::DTipDialog(const QString &file, QWidget *parent) : QDialog(parent) { m_database = new DTipDatabase(file); setupGUI(); setAttribute(Qt::WA_DeleteOnClose); }
void ClassMainWindow::initGUI() { m_centralWidget = new QWidget( this ); setCentralWidget( m_centralWidget ); QHBoxLayout *layout = new QHBoxLayout( m_centralWidget ); m_classChooser = new ClassChooser( m_centralWidget ); m_classChooser->setMaximumWidth( 200 ); m_classChooser->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); layout->addWidget( m_classChooser ); QVBoxLayout *vlayout = new QVBoxLayout( layout ); m_listView = new CollectionListView( 0, m_centralWidget ); m_listView->setClassInfo( m_classChooser->currentClass() ); m_classChooser->load(); m_listView->setClassInfo( m_classChooser->currentClass() ); connect( m_listView, SIGNAL(doubleClicked(QListViewItem*,const QPoint&, int)), SLOT(slotDoubleClicked(QListViewItem*,const QPoint&, int))); connect( m_listView, SIGNAL(rightButtonClicked(QListViewItem*,const QPoint&,int)), SLOT(slotRightClick(QListViewItem*,const QPoint &,int)) ); m_listViewSearchLine = new KListViewSearchLine( m_centralWidget ); m_listViewSearchLine->setListView( m_listView ); vlayout->addWidget( m_listViewSearchLine ); vlayout->addWidget( m_listView ); KStdAction::save( this, SLOT(slotSave()), actionCollection() ); setupGUI(); connect( m_classChooser, SIGNAL(classSelected(const ClassInfo*)), SLOT(slotCurrentClassChanged(const ClassInfo*)) ); }
KTutorialEditor::KTutorialEditor(): KXmlGuiWindow(0), mTutorial(0) { mTreeView = new AutoExpandableTreeView(); mTreeView->setObjectName("centralTreeView"); mTreeView->setWordWrap(true); setCentralWidget(mTreeView); setupDocks(); setupActions(); connect(mEditActions, SIGNAL(cleanChanged(bool)), this, SIGNAL(cleanChanged(bool))); connect(this, SIGNAL(cleanChanged(bool)), this, SLOT(handleUndoStackCleanChanged(bool))); //The actions can not be added in setupDocks because setupActions() needs //the docks to be created (to get their toggleAction), so it can be called //before setupDocks(). setupActionListWidgets(); mFileActions->newTutorial(); ktutorial::KTutorial::self()->setup(this); setupGUI(); }
Opeke::Opeke() : KXmlGuiWindow(), m_printer ( 0 ), fileName ( QString() ), Bricks ( QList<Brick>() ) { // accept dnd setAcceptDrops ( true ); // tell the KXmlGuiWindow that this is indeed the main widget m_view = new OpekeView ( this ); m_tool = new OpekeTool ( this ); m_tool->setObjectName("Tool Options"); m_dockWidget = new QDockWidget(this); m_dockWidget->setWidget(m_tool); m_dockWidget->setObjectName("Tool Dock"); addDockWidget (Qt::LeftDockWidgetArea, m_dockWidget); m_tool->show(); setCentralWidget (m_view); m_view->setFocus(); setupActions(); undoAct->setEnabled(false); redoAct->setEnabled(false); statusBar()->show(); setupGUI(); setWindowModified(false); setCaption(QString::null, false); }
MainWindow::MainWindow(const QUrl& url) : m_markpad(0) , m_recentFiles(0) , m_firstTextChange(false) { m_markpad = new Markpado(this); setupAction(); setupConnect(); setCentralWidget(m_markpad); setupGUI(QSize(500,600), Default, "markpado.rc"); guiFactory()->addClient(m_markpad->m_editor); setStandardToolBarMenuEnabled(true); // FIXME: make sure the config dir exists, any idea how to do it more cleanly? QDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)).mkpath(QStringLiteral(".")); setAutoSaveSettings(); readConfig(); slotOpen(url); show(); }
StorageServiceManagerMainWindow::StorageServiceManagerMainWindow() : KXmlGuiWindow() { StorageServiceManagerSettingsJob *settingsJob = new StorageServiceManagerSettingsJob; PimCommon::StorageServiceJobConfig *configJob = PimCommon::StorageServiceJobConfig::self(); configJob->registerConfigIf(settingsJob); mStorageManager = new PimCommon::StorageServiceManager(this); connect(mStorageManager, &PimCommon::StorageServiceManager::servicesChanged, this, &StorageServiceManagerMainWindow::slotServicesChanged); mStorageServiceMainWidget = new StorageServiceManagerMainWidget; connect(mStorageServiceMainWidget, &StorageServiceManagerMainWidget::configureClicked, this, &StorageServiceManagerMainWindow::slotConfigure); connect(mStorageServiceMainWidget->storageServiceTabWidget(), &QTabWidget::currentChanged, this, &StorageServiceManagerMainWindow::slotUpdateActions); connect(mStorageServiceMainWidget->storageServiceTabWidget(), &StorageServiceTabWidget::updateStatusBarMessage, this, &StorageServiceManagerMainWindow::slotSetStatusBarMessage); connect(mStorageServiceMainWidget->storageServiceTabWidget(), &StorageServiceTabWidget::listFileWasInitialized, this, &StorageServiceManagerMainWindow::slotUpdateActions); connect(mStorageServiceMainWidget->storageServiceTabWidget(), &StorageServiceTabWidget::selectionChanged, this, &StorageServiceManagerMainWindow::slotUpdateActions); setCentralWidget(mStorageServiceMainWidget); mNetworkConfigurationManager = new QNetworkConfigurationManager(); connect(mNetworkConfigurationManager, &QNetworkConfigurationManager::onlineStateChanged, this, &StorageServiceManagerMainWindow::slotSystemNetworkOnlineStateChanged); setupActions(); setupGUI(Keys | StatusBar | Save | Create); readConfig(); mStorageServiceMainWidget->storageServiceTabWidget()->setListStorageService(mStorageManager->listService()); slotUpdateActions(); initStatusBar(); slotSystemNetworkOnlineStateChanged(mNetworkConfigurationManager->isOnline()); }
MainWindow::MainWindow() { // set xml of the main window setXML("mainwindow.rc"); setupGUI(); }
/*! * \brief Constructor. * \param[in] pMainWindow - pointer to MainWindow * \param[in] binaryName - name of module executable * \param[in] moduleTitle - title of this module * \param[in] server - server where the module runs * \param[in] instanceID - module identification number * \param[in] tabID - module tab index */ ERA::ERA(MainWindow *pMainWindow, QString binaryName, QString moduleTitle, QString server, int instanceID, int tabID) : GUI(pMainWindow, binaryName, moduleTitle, server, instanceID, tabID), ui(new Ui::ERA) { if(moduleConnected) { setupGUI(); } }
MainWindow::MainWindow( const QString &icsfile ) : KParts::MainWindow( ) { kDebug(5970) << "Entering function, icsfile is " << icsfile; // Setup our actions setupActions(); // this routine will find and load our Part. KLibFactory *factory = KLibLoader::self()->factory("ktimetrackerpart"); if (factory) { // now that the Part is loaded, we cast it to a Part to get // our hands on it m_part = static_cast<ktimetrackerpart *>(factory->create(this, "ktimetrackerpart" )); if (m_part) { // tell the KParts::MainWindow that this is indeed // the main widget setCentralWidget(m_part->widget()); m_part->openFile(icsfile); slotSetCaption( icsfile ); // set the window title to our iCal file connect(configureAction, SIGNAL(triggered(bool)), m_part->widget(), SLOT(showSettingsDialog())); ((TimetrackerWidget *) (m_part->widget()))->setupActions( actionCollection() ); setupGUI(); } } else {
SerialManagerView::SerialManagerView(QWidget *parent) : QWidget(parent) { /// Timer for Polling timer = new QTimer(this); timer->setInterval(1000); PortSettings settings = {BAUD115200, DATA_8, PAR_NONE, STOP_1, FLOW_OFF, 10}; port = new QextSerialPort(QLatin1String("/dev/tty.usbmodem622"), settings, QextSerialPort::Polling); connect(timer, SIGNAL(timeout()), SLOT(onReadyRead())); /// protocoles connect(port, SIGNAL(readyRead()), SLOT(onReadyRead())); /// Enumerator /// enumerator = new QextSerialEnumerator(this); enumerator->setUpNotifications(); connect(enumerator, SIGNAL(deviceDiscovered(QextPortInfo)), SLOT(onPortAddedOrRemoved())); connect(enumerator, SIGNAL(deviceRemoved(QextPortInfo)), SLOT(onPortAddedOrRemoved())); message = new QLineEdit(this); setupGUI(); }
//-------------------------------------------------------------- void testApp::setup() { ofSetLogLevel(OF_LOG_VERBOSE); ofSetFrameRate(60); openNIRecorder.setup(); openNIRecorder.addDepthGenerator(); openNIRecorder.addImageGenerator(); openNIRecorder.setRegister(true); openNIRecorder.setMirror(true); openNIRecorder.addUserGenerator(); openNIRecorder.setMaxNumUsers(1); //1 for this one.... // uncomment these if you want to ensure a clean exit from the application! openNIRecorder.setSafeThreading(true); //start with the live image from the kinect to initialise the gui live image preview elements theOpenNI = &openNIRecorder; setupGUI(); for(int i=0; i<16; i++){ //16 is hardcoded for the number of limbs SinglePosition2DChart new2DChart; new2DChart.maxPosition = ofVec2f(700.f,500.f); bodyCharts.push_back(new2DChart); } hipChart.maxPosition = ofVec2f(700.f,500.f); shoulderChart.maxPosition = ofVec2f(700.f,500.f); handsChart.maxPosition = ofVec2f(700.f,500.f); }
MainWindow::MainWindow(QWidget *parent) : KXmlGuiWindow(parent) { layout = new KVBox(this); setCentralWidget(layout); bindAddress = new KComboBox(true, layout); resourcesView = new QTreeView(layout); logList = new KListWidget(layout); setupGUI(); logList->addItem(i18n("Application started")); //add some test content root = new WebContent_VirtualFolder(); c1 = new WebContent_Dummy("arq1"); c2 = new WebContent_Dummy("arq2"); c3 = new WebContent_Dummy("arq3"); f1 = new WebContent_VirtualFolder("folder1"); fileOk = new WebContent_File("fileOK", "/home/vitor/sancalivre.iso"); fileError = new WebContent_File("fileError", "/home/vitor/nonExistent"); daemon.setRootContent(root); root->addContent(c1); root->addContent(c2); root->addContent(f1); root->addContent(fileOk); root->addContent(fileError); f1->addContent(c3); root->updateCache(); f1->updateCache(); if (daemon.listen(QHostAddress::Any, 8080)) { logList->addItem(i18n("Daemon started")); } }
Controller::Controller(QWidget* _parent): QWidget(_parent), signalMapperParticleColor(NULL), signalMapperParticleViewing(NULL) { setupGUI(); }
KTNEFMain::KTNEFMain( QWidget *parent ) : KXmlGuiWindow( parent ) { setupActions(); setupStatusbar(); setupTNEF(); KConfigGroup config( KGlobal::config(), "Settings" ); mDefaultDir = config.readPathEntry( "defaultdir", "/tmp/" ); mLastDir = mDefaultDir; // create personale temo extract dir KStandardDirs::makeDir( KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp" ); resize( 430, 350 ); setStandardToolBarMenuEnabled( true ); createStandardStatusBarAction(); setupGUI( Keys | Save | Create, "ktnefui.rc" ); setAutoSaveSettings(); }
//-------------------------------------------------------------- void testApp::setup(){ //fft ofSoundStreamSetup(0,2,this, 44100, BUFFER_SIZE, 4); FFTanalyzer.setup(44100, BUFFER_SIZE/2, 2); FFTanalyzer.peakHoldTime = 15; // hold longer FFTanalyzer.peakDecayRate = 0.95f; // decay slower FFTanalyzer.linearEQIntercept = 0.9f; // reduced gain at lowest frequency FFTanalyzer.linearEQSlope = 0.01f; // increasing gain at higher frequencies //--------------------------------------------------------------------- ofBackground(0); ofSetBackgroundAuto(false); ofSetVerticalSync(true); xNoiseValue=0.0025; yNoiseValue=0.0025; zNoiseValue=0.001; xNoiseScale=10; yNoiseScale=10; xAngleOffset=0; yAngleOffset=0; speedScale = 0.2; pr=1; // color1=10; // color2=80; // color3=150; setupGUI(); }
KPlatoWork_MainWindow::KPlatoWork_MainWindow() : KParts::MainWindow() { kDebug(planworkDbg())<<this; m_part = new KPlatoWork::Part( this, this ); KStandardAction::quit(kapp, SLOT(quit()), actionCollection()); KStandardAction::open(this, SLOT(slotFileOpen()), actionCollection()); // KStandardAction::save(this, SLOT(slotFileSave()), actionCollection()); QAction *a = KStandardAction::undo(m_part->undoStack(), SLOT(undo()), actionCollection()); a->setEnabled( false ); connect( m_part->undoStack(), SIGNAL(canUndoChanged(bool)), a, SLOT(setEnabled(bool)) ); a = KStandardAction::redo(m_part->undoStack(), SLOT(redo()), actionCollection()); a->setEnabled( false ); connect( m_part->undoStack(), SIGNAL(canRedoChanged(bool)), a, SLOT(setEnabled(bool)) ); setupGUI( KXmlGuiWindow::Default, "planwork_mainwindow.rc" ); setCentralWidget( m_part->widget() ); createGUI( m_part ); connect( m_part, SIGNAL(captionChanged(QString,bool)), SLOT(setCaption(QString,bool)) ); }
void Phantom::setupPhantomGUI() { setupGUI(); Ogre::MaterialPtr scanMat = Ogre::MaterialManager::getSingleton().create("ScanIcon", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); scanMat->getTechnique(0)->getPass(0)->createTextureUnitState("NeuroResources/ScanIcon.png"); scanMat->getTechnique(0)->getPass(0)->setDepthCheckEnabled(false); scanMat->getTechnique(0)->getPass(0)->setDepthWriteEnabled(false); scanMat->getTechnique(0)->getPass(0)->setLightingEnabled(false); scanMat->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBF_SOURCE_ALPHA, Ogre::SBF_ONE_MINUS_DEST_COLOUR); scanIcon = static_cast<Ogre::OverlayContainer*>(Terminal::getSingletonPtr()->_overlayMgr->createOverlayElement("Panel", "ScanIcon"+boost::lexical_cast<std::string>(this->id ))); scanIcon->setMetricsMode(Ogre::GMM_PIXELS); scanIcon->setPosition(scanPos.x*Terminal::getSingletonPtr()->pixelSize+Terminal::getSingletonPtr()->pixelSize*0.25, scanPos.y*Terminal::getSingletonPtr()->pixelSize+Terminal::getSingletonPtr()->pixelSize*0.25); scanIcon->setWidth(Terminal::getSingletonPtr()->pixelSize*0.5); scanIcon->setHeight(Terminal::getSingletonPtr()->pixelSize*0.5); scanIcon->setParameter("uv_coords","0 0 1 1"); scanIcon->setMaterialName("ScanIcon"); // Terminal::getSingletonPtra()->_panel2->addChild(scanIcon); // targetIcon = static_cast<Ogre::OverlayContainer*>(Terminal::getSingletonPtr()->_overlayMgr->createOverlayElement("Panel", "TargetIcon"+boost::lexical_cast<std::string>(this->id ))); // targetIcon->setMetricsMode(Ogre::GMM_PIXELS); // targetIcon->setPosition(targetPos.x*Terminal::getSingletonPtr()->pixelSize+Terminal::getSingletonPtr()->pixelSize*0.25, targetPos.y*Terminal::getSingletonPtr()->pixelSize+Terminal::getSingletonPtr()->pixelSize*0.25); // targetIcon->setWidth(Terminal::getSingletonPtr()->pixelSize*0.5); // targetIcon->setHeight(Terminal::getSingletonPtr()->pixelSize*0.5); // targetIcon->setParameter("uv_coords","0 0 1 1"); // targetIcon->setMaterialName("ScanIcon"); // Terminal::getSingletonPtr()->_panel2->addChild(targetIcon); guiSetup = true; }
TipDialog::TipDialog(QStringList &labels, const QString &file, QWidget *parent) : QDialog(parent) { setModal(true); tags = labels; m_database = new TipDatabase(file, parent); setupGUI(); }
MainWindow::MainWindow(QWidget *parent) : KXmlGuiWindow(parent) { setWindowTitle(i18n("Silence")); Controller *controller = Controller::create(); controller->setMainWindow(this); controller->setActionManager(new ActionManager(actionCollection())); centralwidgetstack = new QStackedWidget; setCentralWidget(centralwidgetstack); // ContentView contentview = new ContentView; centralwidgetstack->addWidget(contentview); controller->setContentView(contentview); nodepropertywidget = new NodePropertyWidget(i18n("Properties"), this); nodepropertywidget->hide(); controller->setNodePropertyWidget(nodepropertywidget); // the treeview on the left side treeview = new TreeView(i18n("Nodes"), this); controller->setTreeView(treeview); // search sidebar searchnodesidebar = new SearchNodeSidebar(i18n("Search Nodes"), this); controller->setSearchNodeSidebar(searchnodesidebar); // navigation sidebar navigationsidebar = new NavigationSidebar(i18nc("title of the navigation sidebar", "Navigation"), this); controller->setNavigationSidebar(navigationsidebar); // information sidebar to show the metainfos infosidebar = new InfoSidebar(i18n("Information"), this); controller->setInfoSidebar(infosidebar); // docking the widgets addDockWidget(Qt::RightDockWidgetArea, navigationsidebar); addDockWidget(Qt::RightDockWidgetArea, infosidebar); addDockWidget(Qt::LeftDockWidgetArea, treeview); addDockWidget(Qt::LeftDockWidgetArea, treeview); tabifyDockWidget(treeview, searchnodesidebar); addDockWidget(Qt::LeftDockWidgetArea, nodepropertywidget); statusbar = new SiStatusBar; setStatusBar(statusbar); controller->setStatusBar(statusbar); controller->getTextEdit()->setVisible(false); controller->getRichTextEdit()->setVisible(false); viewmenu = new ViewMenu(); connect(controller->getActionManager()->getGlobalAction(Actions::EXIT), SIGNAL(triggered()), this, SLOT(quit())); silencemenu = new SilenceMenu(actionCollection()); setupGUI(QSize(1100, 600), Keys | StatusBar | Save | Create); }
/** * setup menu, shortcuts, create GUI */ void KLinPopup::setupActions() { KStandardAction::quit(this, SLOT(exit()), actionCollection()); setStandardToolBarMenuEnabled(true); createStandardStatusBarAction(); menubarAction = KStandardAction::showMenubar(this, SLOT(optionsShowMenubar(bool)), actionCollection()); menubarAction->setChecked(!menuBar()->isHidden()); KStandardAction::preferences(this, SLOT(optionsPreferences()), actionCollection()); autoReplyAction = new KToggleAction(KIcon("mail-reply-all"), i18n("&Autoreply"), this); autoReplyAction->setShortcut(Qt::CTRL+Qt::Key_A); actionCollection()->addAction("auto_reply", autoReplyAction); connect(autoReplyAction, SIGNAL(triggered(bool)), this, SLOT(statusAutoReply())); newPopupAction = new KAction(KIcon("mail-new"), i18n("&New"), this); newPopupAction->setShortcut(Qt::CTRL+Qt::Key_N); actionCollection()->addAction("new_popup", newPopupAction); connect(newPopupAction, SIGNAL(triggered(bool)), this, SLOT(newPopup())); replyPopupAction = new KAction(KIcon("mail-reply-sender"), i18n("&Reply"), this); replyPopupAction->setShortcut(Qt::CTRL+Qt::Key_R); actionCollection()->addAction("reply_popup", replyPopupAction); connect(replyPopupAction, SIGNAL(triggered(bool)), this, SLOT(replyPopup())); firstPopupAction = new KAction(KIcon("arrow-left-double"), i18n("&First"), this); firstPopupAction->setShortcut(Qt::CTRL+Qt::Key_B); actionCollection()->addAction("first_popup", firstPopupAction); connect(firstPopupAction, SIGNAL(triggered(bool)), this, SLOT(firstPopup())); prevPopupAction = new KAction(KIcon("arrow-left"), i18n("&Previous"), this); prevPopupAction->setShortcut(Qt::CTRL+Qt::Key_P); actionCollection()->addAction("previous_popup", prevPopupAction); connect(prevPopupAction, SIGNAL(triggered(bool)), this, SLOT(prevPopup())); nextPopupAction = new KAction(KIcon("arrow-right"), i18n("&Next"), this); nextPopupAction->setShortcut(Qt::CTRL+Qt::Key_F); actionCollection()->addAction("next_popup", nextPopupAction); connect(nextPopupAction, SIGNAL(triggered(bool)), this, SLOT(nextPopup())); lastPopupAction = new KAction(KIcon("arrow-right-double"), i18n("&Last"), this); lastPopupAction->setShortcut(Qt::CTRL+Qt::Key_L); actionCollection()->addAction("last_popup", lastPopupAction); connect(lastPopupAction, SIGNAL(triggered(bool)), this, SLOT(lastPopup())); unreadPopupAction = new KAction(KIcon("new_popup"), i18n("&Unread"), this); unreadPopupAction->setShortcut(Qt::CTRL+Qt::Key_U); actionCollection()->addAction("unread_popup", unreadPopupAction); connect(unreadPopupAction, SIGNAL(triggered(bool)), this, SLOT(unreadPopup())); deletePopupAction = new KAction(KIcon("mail-delete"), i18n("&Delete"), this); deletePopupAction->setShortcut(Qt::CTRL+Qt::Key_D); actionCollection()->addAction("delete_popup", deletePopupAction); connect(deletePopupAction, SIGNAL(triggered(bool)), this, SLOT(deletePopup())); setupGUI(); }
// Create the dialog from a config group KCardWidget::KCardWidget(QWidget* parent) : QWidget(parent), d(new KCardWidgetPrivate) { // GUI setupGUI(); insertCardIcons(); setDeckName(CardDeckInfo::defaultDeckName()); }
void MainWindow::fileOpen() { QString const file_name = QFileDialog::getOpenFileName(this, "Open character file...", "", "*.cfg"); if (!file_name.isEmpty()) FileIO::readCharFile(file_name.toStdString(), _data); createWidgets(); setupGUI(); }
Widget::Widget(QWidget *parent): QWidget(parent) , m_fileSelector(0) { setFocusPolicy(Qt::StrongFocus); setFocus(); setupGUI(); onSelectSong(); }
void GraphicsImpl::threadWillStart() { subscribeToFeed("input_keyboard", boost::bind(&GraphicsImpl::handleKeyEvents, this, _1)); subscribeToFeed("input_mouse", boost::bind(&GraphicsImpl::handleMouseEvents, this, _1)); subscribeToFeed("world_dynamic", boost::bind(&GraphicsImpl::handleWorldEvents, this, _1)); subscribeToFeed("create_object", boost::bind(&GraphicsImpl::handleObjectEvents, this, _1)); subscribeToFeed("create_terrain", boost::bind(&GraphicsImpl::handleTerrainEvents, this, _1)); subscribeToFeed("world_removed", boost::bind(&GraphicsImpl::handleRemovedObjects, this, _1)); Dout << "Creating root"; root = new Ogre::Root("", "", resourcePath + "ogre.log"); Dout << "Loading plugins" ; loadPlugins(); Dout << "Setting Ressources" ; setupResources(); Dout << "Configuring root" ; if (!configure()) { Derr << "Failed to configure root"; } Dout << "Create Scenemanager" ; chooseSceneManager(); Dout << "Create Camera" ; createCamera(); Dout << "Create Viewport" ; createViewports(); Dout << "Set default MipMap lvl" ; Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5); Dout << "Create resource listeners" ; createResourceListener(); Dout << "Load resources" ; loadResources(); Dout << "Setup GUI"; setupGUI(); Dout << "Create Framelistener" ; createFrameListener(); Dout << "Create Basic Scene" ; createScene(); root->clearEventTimes(); InformationManager::Instance()->offerData("window", this); }
//-------------------------------------------------------------- void testApp::setup(){ ofSetFrameRate(30); ofSetDepthTest(true); state = 3; aa.playStems(0); cs.setup(); cs.gui->setVisible(false); // vector<ofFloatColor> colors; // for (int i = 0; i < 13; i++) { // colors.push_back(ofFloatColor(ofRandomuf())); // } // for (int i = 0; i < 13; i++) { // cs.addColorRef(&colors[i]); // } cs.assignRandom(true); tm.setup(&aa, &cs); cm.setup(&tm); lm.setup(&cs); pm.setup(); useLights = true; setupGUI(); isShaderDirty = true; mLigDirectional.setup(); mLigDirectional.setDirectional(); mLigDirectional.setAmbientColor(ofColor::fromHsb(100, 0, 100)); mLigDirectional.setDiffuseColor(ofColor::fromHsb(20, 120, 128)); mLigDirectional.setSpecularColor(ofColor(255,255,255)); mMatMainMaterial.setDiffuseColor(ofColor(0,0,0)); mMatMainMaterial.setSpecularColor(ofColor(200,200,200)); mMatMainMaterial.setShininess(64.0f); mCamMainCam.setupPerspective(false); cm.cam.setupPerspective(false); mCamMainCam.setDistance(200); // cm.cam.setDistance(200); updateCam = false; shouldRenderNormals = false; shouldUseFlatShading = false; }
KPrMSPresentationCreateDialog::KPrMSPresentationCreateDialog( KPrDocument *_doc, KPrView *_view, const KPrMSPresentation &_msPres ) : QDialog( 0, "", false ), msPres( _msPres ) { doc = _doc; view = _view; setupGUI(); }