这篇教程C++ updateInterface函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateInterface函数的典型用法代码示例。如果您正苦于以下问题:C++ updateInterface函数的具体用法?C++ updateInterface怎么用?C++ updateInterface使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateInterface函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DownloadThreadvoid InterfaceThread::run(){ DownloadThread *download = new DownloadThread(data); MainWindow *w = mainWindow(); connect(download, SIGNAL(finished()), w, SLOT(refreshDisplay())); download->start(); while (download->isRunning()) { msleep(200); updateInterface(progress_bar_fraction *100); } updateInterface(100);}
开发者ID:DeadRoolz,项目名称:subsurface,代码行数:12,
示例2: idstd::shared_ptr<InterfaceMap> ThriftConfigApplier::updateInterfaces() { auto origIntfs = orig_->getInterfaces(); InterfaceMap::NodeContainer newIntfs; bool changed = false; // Process all supplied interface configs size_t numExistingProcessed = 0; for (const auto& interfaceCfg : cfg_->interfaces) { InterfaceID id(interfaceCfg.intfID); auto origIntf = origIntfs->getInterfaceIf(id); shared_ptr<Interface> newIntf; auto newAddrs = getInterfaceAddresses(&interfaceCfg); if (origIntf) { newIntf = updateInterface(origIntf, &interfaceCfg, newAddrs); ++numExistingProcessed; } else { newIntf = createInterface(&interfaceCfg, newAddrs); } updateVlanInterfaces(newIntf ? newIntf.get() : origIntf.get()); changed |= updateMap(&newIntfs, origIntf, newIntf); } if (numExistingProcessed != origIntfs->size()) { // Some existing interfaces were removed. CHECK_LT(numExistingProcessed, origIntfs->size()); changed = true; } if (!changed) { return nullptr; } return origIntfs->clone(std::move(newIntfs));}
开发者ID:riseofthetigers,项目名称:fboss,代码行数:35,
示例3: updateInterfacevoid Notebook::editContent(){ oldTitle = titleLine->text(); oldContent = contentText->toPlainText(); updateInterface(EditingMode);}
开发者ID:rmpalmer,项目名称:notebook,代码行数:7,
示例4: updateInterfacevoid AddressBook::editContact(){ oldName = nameLine->text(); oldAddress = addressText->toPlainText(); updateInterface(EditingMode);}
开发者ID:maxxant,项目名称:qt,代码行数:7,
示例5: updateInterfacevoid AddressBook::editContact(){ oldName = nameLine->text(); // Сохраняет детали старого контакта перед переключением в режим EditingMode oldAddress = addressText->toPlainText(); // updateInterface(EditingMode);}
开发者ID:MaximRadionov,项目名称:CourseWork,代码行数:7,
示例6: while/** * Runs the game! WHOO! */int Game::start() { game_running = true; while(window.isOpen()) { while(game_running) { sf::Event event; while(window.pollEvent(event)) { if(event.type == sf::Event::Closed) { window.close(); game_running = false; game_over = true; } } bullets = p.getBullets(); spawnEnemies(); checkInput(); checkBorderCollision(p); checkEntityCollision(); checkDeath(); updateAnimations(); updateScore(); updateInterface(); updateGameClocks(); for(std::vector<Enemy*>::iterator iter = enemies.begin(); iter != enemies.end(); ++iter) { Enemy *eni = *iter; eni->stalkPlayer(p); } window.clear(sf::Color(0,230,0)); Sword * s = p.getSword(); if(s->isSwung()) { window.draw(s->shape); } window.draw(p.shape); for(std::vector<Enemy*>::iterator iter = enemies.begin(); iter != enemies.end(); ++iter) { Enemy *eni = *iter; window.draw(eni->shape); } for(std::vector<Bullet*>::iterator iter = bullets.begin(); iter != bullets.end(); ++iter) { Bullet *b = *iter; window.draw(b->shape); } for(std::vector<sf::Drawable*>::iterator iter = interface.begin(); iter != interface.end(); ++iter) { sf::Drawable *d = *iter; window.draw(*d); } window.display(); } setupEntities(); game_running = true; } return 0;}
开发者ID:timothyhahn,项目名称:StopDying,代码行数:63,
示例7: KToolBarMainToolBar::MainToolBar(KActionCollection* collection, QWidget* parent): KToolBar( parent){ setToolButtonStyle(Qt::ToolButtonIconOnly); toolBarCollection = collection; addAction( toolBarCollection->action("aim")); addAction( toolBarCollection->action("record")); addAction( toolBarCollection->action("play")); addAction( toolBarCollection->action("pause")); addAction( toolBarCollection->action("playAfterPause")); addAction( toolBarCollection->action("stop")); addSeparator(); timeSlider = new QSlider(this); timeSlider->setOrientation(Qt::Horizontal); timeSlider->setMinimum( 0 ); this->addWidget(timeSlider); this->addSeparator(); updateInterface( Default ); }
开发者ID:mluscon,项目名称:KDE-Usability-Inspector,代码行数:28,
示例8: trvoid AddressBook::loadFromFile(){ QString fileName = QFileDialog::getOpenFileName(this, tr("Open Address Book"), "", tr("Address Book (*.abk);;All Files (*)")); if (fileName.isEmpty()) return; else { QFile file(fileName); if (!file.open(QIODevice::ReadOnly)) { QMessageBox::information(this, tr("Unable to open file"), file.errorString()); return; } QDataStream in(&file); in.setVersion(QDataStream::Qt_4_3); contacts.empty(); // empty existing contacts in >> contacts; QMap<QString, QString>::iterator i = contacts.begin(); nameLine->setText(i.key()); addressText->setText(i.value()); } updateInterface(NavigationMode);}
开发者ID:Fale,项目名称:qtmoko,代码行数:29,
示例9: trvoid AddressBook::chargerFichier() { QString nomFichier = QFileDialog::getOpenFileName(this, tr ("Charger depuis un fichier"), "", tr ("Carnet d'adresse (*.abk);;Tous les fichiers (*)")); if (nomFichier.isEmpty()) return; else { QFile fichier (nomFichier); if (!fichier.open(QIODevice::ReadOnly)) { QMessageBox::information(this, tr ("Erreur de chargement"), fichier.errorString()); return; } QDataStream in (&fichier); in.setVersion(QDataStream::Qt_4_7); listeContacts.empty(); in >> listeContacts; if (listeContacts.isEmpty()) { QMessageBox::information (this , tr ("Pas de contacts"), tr ("Aucun contact à importer dans le fichier")); } else { QMap<QString , QString>::iterator i = listeContacts.begin(); nomLineEdit->setText(i.key()); adresseTextEdit->setText(i.value()); } } updateInterface(NavigationMode);}
开发者ID:sangfroid70,项目名称:carnet_adresse,代码行数:32,
示例10: updateInterfacevoid MathOperatorPlugin::changedParam( const OFX::InstanceChangedArgs &args, const std::string ¶mName ){ if( paramName == kMathOperatorType ) { updateInterface(); }}
开发者ID:Finaler,项目名称:TuttleOFX,代码行数:7,
示例11: updateInterfacevoid AddressBook::cancel(){ ui->nameLine->setText(oldName); ui->nameLine->setReadOnly(true); updateInterface(NavigationMode);}
开发者ID:CNOT,项目名称:julia-studio,代码行数:7,
示例12: trvoid AddressBook::loadFromFile(){ QString fileName = QFileDialog::getOpenFileName(this, tr("Open Address Book"), "C:/Users/Max/Google Диск", tr("Address Book (*.txt);;AllFiles (*)")); if (fileName.isEmpty()) return; else { QFile file(fileName); if (!file.open(QIODevice::ReadOnly)) { QMessageBox::information(this, tr("Unable to open file"), file.errorString()); return; } QDataStream in(&file); in.setVersion(QDataStream::Qt_5_5); contacts.empty(); // очищаем существующие контакты in >> contacts; // загрузка if (contacts.isEmpty()) { QMessageBox::information(this, tr("Нет контактов в файле"), tr("Файл который вы пытантесь открыть не содержит контактов.")); } else { QMap<QString, QString>::iterator i = contacts.begin(); // последовательно выводим контакты nameLine->setText(i.key()); addressText->setText(i.value()); } updateInterface(NavigationMode); }}
开发者ID:MaximRadionov,项目名称:CourseWork,代码行数:31,
示例13: QWidgetCameraWnd::CameraWnd(): QWidget(){ setMinimumSize( 160, 120 ); //preparation of the vlc command const char * const vlc_args[] = { "-I", "dummy", /* Don't use any interface */ "--ignore-config", /* Don't use VLC's config */ "--extraintf=logger", //log anything "--verbose=2", //be much more verbose then normal for debugging purpose "--plugin-path=./plugins/" };#ifdef Q_WS_X11 _videoWidget=new QX11EmbedContainer(this);#else _videoWidget=new QFrame(this);#endif // [20101215 JG] If KDE is used like unique desktop environment, only use _videoWidget=new QFrame(this); _volumeSlider=new QSlider(Qt::Horizontal,this); _volumeSlider->setMaximum(100); //the volume is between 0 and 100 _volumeSlider->setToolTip("Audio slider"); _volumeSlider->setVisible( false ); // Note: if you use streaming, there is no ability to use the position slider _positionSlider=new QSlider(Qt::Horizontal,this); _positionSlider->setMaximum(POSITION_RESOLUTION); _positionSlider->setVisible( false ); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(_videoWidget); layout->addWidget(_positionSlider); layout->addWidget(_volumeSlider); setLayout(layout); _isPlaying=false; poller=new QTimer(this); //Initialize an instance of vlc //a structure for the exception is neede for this initalization //libvlc_exception_init(&_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. //create a new libvlc instance _vlcinstance=libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args); //tricky calculation of the char space used //_vlcinstance=libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args,&_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. //raise (&_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. // Create a media player playing environement _mp = libvlc_media_player_new (_vlcinstance); //_mp = libvlc_media_player_new (_vlcinstance, &_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. //raise (&_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. //connect the two sliders to the corresponding slots (uses Qt's signal / slots technology) connect(poller, SIGNAL(timeout()), this, SLOT(updateInterface())); connect(_positionSlider, SIGNAL(sliderMoved(int)), this, SLOT(changePosition(int))); connect(_volumeSlider, SIGNAL(sliderMoved(int)), this, SLOT(changeVolume(int))); poller->start(100); //start timer to trigger every 100 ms the updateInterface slot}
开发者ID:z80,项目名称:IPM,代码行数:59,
示例14: updateInterfacenite::SkeletonState yarp::dev::OpenNI2DeviceDriverServer::getSkeletonState(int userID) { updateInterface();#ifdef OPENNI2_DRIVER_USES_NITE2 return OpenNI2SkeletonTracker::getSensor()->userSkeleton[userID-1].skeletonState;#else return 0;#endif}
开发者ID:CV-IP,项目名称:yarp,代码行数:8,
示例15: updateInterface/////////// Slots //////////void AddressBook::ajouterContact() { oldNom = nomLineEdit->text(); oldAdresse = adresseTextEdit->toPlainText(); nomLineEdit->clear(); adresseTextEdit->clear(); updateInterface(AddingMode);}
开发者ID:sangfroid70,项目名称:carnet_adresse,代码行数:10,
示例16: trvoid AvatarDialog::changeAvatar(){ QPixmap img = misc::getOpenThumbnailedPicture(this, tr("Load Avatar"), 128, 128); if (img.isNull()) return; ui->avatarLabel->setPixmap(img); updateInterface();}
开发者ID:MrKID,项目名称:RetroShare,代码行数:10,
示例17: beginUpdateConnectionNamesvoid BusInterfaceItem::setName( const QString& name ) { beginUpdateConnectionNames(); busInterface_->setName(name); updateInterface(); emit contentChanged(); endUpdateConnectionNames();}
开发者ID:kammoh,项目名称:kactus2,代码行数:10,
示例18: trvoid AddressBook::submitContact(){ QString name = ui->nameLine->text(); QString address = ui->addressText->toPlainText(); if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); updateInterface(NavigationMode); return; } if (currentMode == AddingMode) { if (!contacts.contains(name)) { contacts.insert(name, address); QMessageBox::information(this, tr("Add Successful"), tr("/"%1/" has been added to your address book.").arg(name)); } else { QMessageBox::information(this, tr("Add Unsuccessful"), tr("Sorry, /"%1/" is already in your address book.").arg(name)); } } else if (currentMode == EditingMode) { if (oldName != name) { if (!contacts.contains(name)) { QMessageBox::information(this, tr("Edit Successful"), tr("/"%1/" has been edited in your address book.").arg(oldName)); contacts.remove(oldName); contacts.insert(name, address); } else { QMessageBox::information(this, tr("Edit Unsuccessful"), tr("Sorry, /"%1/" is already in your address book.").arg(name)); } } else if (oldAddress != address) { QMessageBox::information(this, tr("Edit Successful"), tr("/"%1/" has been edited in your address book.").arg(name)); contacts[name] = address; } } updateInterface(NavigationMode);}
开发者ID:CNOT,项目名称:julia-studio,代码行数:43,
示例19: QDialog//-------------------------------------------------------// POI_Editor: Constructor for edit an existing POI//-------------------------------------------------------POI_Editor::POI_Editor(POI *poi_, QWidget *parent) : QDialog(parent){ setupUi(this); setModal(false); setAttribute(Qt::WA_DeleteOnClose); this->poi = poi_; modeCreation = false; setWindowTitle(tr("Point of interest: ")+poi->getName()); updateInterface();}
开发者ID:norulz,项目名称:zyGrib,代码行数:14,
示例20: enableHeader/** * /brief Initialization * * Initializes the TabsApplet with default parameters */voidTabsApplet::init(){ // applet base initialization Context::Applet::init(); // create the header label enableHeader( true ); setHeaderText( i18nc( "Guitar tablature", "Tabs" ) ); // creates the tab view m_tabsView = new TabsView( this ); // Set the collapse size setCollapseOffHeight( -1 ); setCollapseHeight( m_header->height() ); setMinimumHeight( collapseHeight() ); setPreferredHeight( collapseHeight() ); // create the reload icon QAction* reloadAction = new QAction( this ); reloadAction->setIcon( KIcon( "view-refresh" ) ); reloadAction->setVisible( true ); reloadAction->setEnabled( true ); reloadAction->setText( i18nc( "Guitar tablature", "Reload tabs" ) ); m_reloadIcon = addLeftHeaderAction( reloadAction ); m_reloadIcon.data()->setEnabled( false ); connect( m_reloadIcon.data(), SIGNAL(clicked()), this, SLOT(reloadTabs()) ); // create the settings icon QAction* settingsAction = new QAction( this ); settingsAction->setIcon( KIcon( "preferences-system" ) ); settingsAction->setEnabled( true ); settingsAction->setText( i18n( "Settings" ) ); QWeakPointer<Plasma::IconWidget> settingsIcon = addRightHeaderAction( settingsAction ); connect( settingsIcon.data(), SIGNAL(clicked()), this, SLOT(showConfigurationInterface()) ); m_layout = new QGraphicsLinearLayout( Qt::Vertical ); m_layout->addItem( m_header ); m_layout->addItem( m_tabsView ); setLayout( m_layout ); // read configuration data and update the engine. KConfigGroup config = Amarok::config("Tabs Applet"); m_fetchGuitar = config.readEntry( "FetchGuitar", true ); m_fetchBass = config.readEntry( "FetchBass", true ); Plasma::DataEngine *engine = dataEngine( "amarok-tabs" ); engine->setProperty( "fetchGuitarTabs", m_fetchGuitar ); engine->setProperty( "fetchBassTabs", m_fetchBass ); engine->connectSource( "tabs", this ); updateInterface( InitState );}
开发者ID:cancamilo,项目名称:amarok,代码行数:59,
示例21: QWidgetPlayer::Player(): QWidget(){ //preparation of the vlc command const char * const vlc_args[] = { "--sout=#transcode{vcodec=DIV3,vb=800,scale=1,acodec=mp3,ab=128,channels=2,samplerate=44100}:duplicate{dst=http{mux=asf,dst=:8983/},dst=display}",// to stream video with codec div3 & mp3 on port number 8983 "--sout-keep", "sout-all"}; //output each stream//#ifdef Q_WS_X11 // _videoWidget=new QX11EmbedContainer(this);//#else _videoWidget=new QFrame(this);//#endif // [20101215 JG] If KDE is used like unique desktop environment, only use _videoWidget=new QFrame(this); _volumeSlider=new QSlider(Qt::Horizontal,this); _volumeSlider->setMaximum(100); //the volume is between 0 and 100 _volumeSlider->setToolTip("Audio slider"); // Note: if you use streaming, there is no ability to use the position slider _positionSlider=new QSlider(Qt::Horizontal,this); _positionSlider->setMaximum(POSITION_RESOLUTION); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(_videoWidget); layout->addWidget(_positionSlider); layout->addWidget(_volumeSlider); setLayout(layout); _isPlaying=false; poller=new QTimer(this); //Initialize an instance of vlc //a structure for the exception is neede for this initalization //libvlc_exception_init(&_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. //create a new libvlc instance _vlcinstance=libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args); //tricky calculation of the char space used //_vlcinstance=libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args,&_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. //raise (&_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. // Create a media player playing environement _mp = libvlc_media_player_new (_vlcinstance); //_mp = libvlc_media_player_new (_vlcinstance, &_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. //raise (&_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. //connect the two sliders to the corresponding slots (uses Qt's signal / slots technology) connect(poller, SIGNAL(timeout()), this, SLOT(updateInterface())); connect(_positionSlider, SIGNAL(sliderMoved(int)), this, SLOT(changePosition(int))); connect(_volumeSlider, SIGNAL(sliderMoved(int)), this, SLOT(changeVolume(int))); poller->start(100); //start timer to trigger every 100 ms the updateInterface slot}
开发者ID:icanbeacoderdotcom,项目名称:virtual-class-room,代码行数:54,
示例22: SiftObjvoid MainWindow::load(){ QString filename = QFileDialog::getOpenFileName(this, "Load Video",QString()); if(!filename.isNull()) { siftObj = new SiftObj(); siftObj->setFilename(filename.toStdString()); _currentFrame = 1; updateInterface(); }}
开发者ID:rosaliaschneider,项目名称:Project2011b,代码行数:12,
示例23: HWConnectionEndpoint//-----------------------------------------------------------------------------// Function: BusInterfaceItem()//-----------------------------------------------------------------------------BusInterfaceItem::BusInterfaceItem(LibraryInterface* lh, QSharedPointer<Component> component, QSharedPointer<BusInterface> busIf, QGraphicsItem *parent) : HWConnectionEndpoint(parent, busIf == 0, QVector2D(1.0f, 0.0f)), lh_(lh), nameLabel_("", this), busInterface_(), component_(component), oldColumn_(0), oldPos_(), oldInterfacePositions_(), offPageConnector_(0), portsCopied_(false){ setType(ENDPOINT_TYPE_BUS); setTypeLocked(busIf != 0 && busIf->getInterfaceMode() != General::INTERFACE_MODE_COUNT); busInterface_ = busIf; int squareSize = GridSize; QPolygonF shape; shape << QPointF(-squareSize/2, squareSize / 2) << QPointF(-squareSize/2, -squareSize) << QPointF(squareSize/2, -squareSize) << QPointF(squareSize/2, squareSize / 2) << QPointF(0, squareSize); setPolygon(shape); QFont font = nameLabel_.font(); font.setPointSize(8); nameLabel_.setFont(font); nameLabel_.setRotation(-rotation()); nameLabel_.setFlag(ItemStacksBehindParent); QGraphicsDropShadowEffect *shadow = new QGraphicsDropShadowEffect; shadow->setXOffset(0); shadow->setYOffset(0); shadow->setBlurRadius(5); nameLabel_.setGraphicsEffect(shadow); setFlag(ItemIsMovable); setFlag(ItemIsSelectable); setFlag(ItemSendsGeometryChanges); setFlag(ItemSendsScenePositionChanges); // Create the off-page connector. offPageConnector_ = new OffPageConnectorItem(this); offPageConnector_->setPos(0.0, -GridSize * 3); offPageConnector_->setFlag(ItemStacksBehindParent); offPageConnector_->setVisible(false); updateInterface();}
开发者ID:kammoh,项目名称:kactus2,代码行数:56,
示例24: mainvoid main(void){ INIT_SHARC; initInterface(); while(1) { updateInterface(); } }
开发者ID:tiborsimon,项目名称:DSPController-DemoApp,代码行数:12,
示例25: nomvoid AddressBook::soumettreContact() { QString nom (nomLineEdit->text()); QString adresse (adresseTextEdit->toPlainText()); if (nom.isEmpty() || adresse.isEmpty()) { QMessageBox::information(this , tr("Champs obligatoires") , tr ("Veuillez remplir le nom et l'adresse.")); return; } if (currentMode == AddingMode) { if (! listeContacts.contains(nom)) { listeContacts.insert(nom , adresse); QMessageBox::information(this , tr("Contact ajouté") , tr ("Le contact /"%1/" a bien été ajouté").arg(nom)); } else { QMessageBox::information (this , tr ("Contact existant") , tr ("Un contact portant ce nom existe déjà")); return; } } else if (currentMode == EditingMode) { if (oldNom != nom) { if (!listeContacts.contains(nom)) { QMessageBox::information(this , tr("Contact modifié") , tr("Modification du contact /"%1/"").arg(oldNom)); listeContacts.remove(oldNom); listeContacts.insert(nom , adresse); } else { QMessageBox::information (this , tr ("Erreur modification") , tr ("/"%1/" figure déjà dans vos contacts.").arg(nom)); } } else if (oldAdresse != adresse){ QMessageBox::information(this , tr("Contact modifié") , tr("Modification du contact /"%1/"").arg(nom)); listeContacts[nom] = adresse; } } updateInterface(NavigationMode);}
开发者ID:sangfroid70,项目名称:carnet_adresse,代码行数:46,
注:本文中的updateInterface函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateItem函数代码示例 C++ updateInfo函数代码示例 |