当前位置: 首页>>代码示例>>C++>>正文


C++ setupGUI函数代码示例

本文整理汇总了C++中setupGUI函数的典型用法代码示例。如果您正苦于以下问题:C++ setupGUI函数的具体用法?C++ setupGUI怎么用?C++ setupGUI使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setupGUI函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ofSetFrameRate

//--------------------------------------------------------------
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;
}
开发者ID:CreativeInquiry,项目名称:ofxRobotArm,代码行数:27,代码来源:ofApp.cpp

示例2: sem_open

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;
}
开发者ID:Garoe,项目名称:ulpgc-dgc-practica2,代码行数:34,代码来源:testApp.cpp

示例3: QDialog

LoginDialog::LoginDialog(QWidget* parent) :
    QDialog(parent)
{
    setupGUI();
    setWindowTitle("Login");
    setModal(true);
}
开发者ID:AlphaStaxLLC,项目名称:hifi,代码行数:7,代码来源:LoginDialog.cpp

示例4: SLOT

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)) );
}
开发者ID:KDE,项目名称:calligra,代码行数:26,代码来源:mainwindow.cpp

示例5: QDialog

DTipDialog::DTipDialog(const QString &file, QWidget *parent) : QDialog(parent)
{
    m_database = new DTipDatabase(file);
    setupGUI();

    setAttribute(Qt::WA_DeleteOnClose);
}
开发者ID:BackupTheBerlios,项目名称:adresis-svn,代码行数:7,代码来源:dtip.cpp

示例6: QWidget

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*)) );
}
开发者ID:BackupTheBerlios,项目名称:kandau-svn,代码行数:34,代码来源:classmainwindow.cpp

示例7: KXmlGuiWindow

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();
}
开发者ID:KDE,项目名称:ktutorial,代码行数:28,代码来源:KTutorialEditor.cpp

示例8: KXmlGuiWindow

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);
}
开发者ID:Noughmad,项目名称:Opeke,代码行数:32,代码来源:opeke.cpp

示例9: m_markpad

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();
}
开发者ID:Icyhs,项目名称:marketo,代码行数:25,代码来源:mainwindow.cpp

示例10: KXmlGuiWindow

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());
}
开发者ID:KDE,项目名称:kdepim,代码行数:28,代码来源:storageservicemanagermainwindow.cpp

示例11: setXML

MainWindow::MainWindow()
{
    // set xml of the main window
    setXML("mainwindow.rc");
    
    setupGUI();
}
开发者ID:riccardobellini,项目名称:VehicleReminder,代码行数:7,代码来源:mainwindow.cpp

示例12: GUI

/*!
 * \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();
	}
}
开发者ID:xufango,项目名称:contrib_bk,代码行数:16,代码来源:era.cpp

示例13: kDebug

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
    {
开发者ID:akhuettel,项目名称:kdepim-noakonadi,代码行数:30,代码来源:mainwindow.cpp

示例14: QWidget

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();


}
开发者ID:bourou01,项目名称:controLab,代码行数:34,代码来源:serialmanagerview.cpp

示例15: ofSetLogLevel

//--------------------------------------------------------------
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);
}
开发者ID:imclab,项目名称:Sync,代码行数:34,代码来源:testApp.cpp


注:本文中的setupGUI函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。