这篇教程C++ updateLabel函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateLabel函数的典型用法代码示例。如果您正苦于以下问题:C++ updateLabel函数的具体用法?C++ updateLabel怎么用?C++ updateLabel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateLabel函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: doIMUvoid doIMU() { // Accel (degrees) IntToStr((int)(MPU9150A.out_accel.x * 90.0f),txt); updateLabel(&accelX, ltrim(txt)); IntToStr((int)(MPU9150A.out_accel.y * 90.0f),txt); updateLabel(&accelY, ltrim(txt)); IntToStr((int)(MPU9150A.out_accel.z * 90.0f),txt); updateLabel(&accelZ, ltrim(txt)); // Gyro (degrees/second) IntToStr((int)(MPU9150A.out_gyro.x * 1000.0f / MPU9150A.gdt),txt); updateLabel(&gyroX, ltrim(txt)); IntToStr((int)(MPU9150A.out_gyro.y * 1000.0f / MPU9150A.gdt),txt); updateLabel(&gyroY, ltrim(txt)); IntToStr((int)(MPU9150A.out_gyro.z * 1000.0f / MPU9150A.gdt),txt); updateLabel(&gyroZ, ltrim(txt)); // Mag WordToStr((int)(MPU9150A.mag.x),txt); updateLabel(&magX, ltrim(txt)); IntToStr((int)(MPU9150A.mag.y),txt); updateLabel(&magY, ltrim(txt)); IntToStr((int)(MPU9150A.mag.z),txt); updateLabel(&magZ, ltrim(txt)); //temperature (celsius) sprintf(txt, "%.2f", MPU9150A.temp); strcat (txt, " °C"); updateLabel(&lblTemp, ltrim(txt));}
开发者ID:jemmicat,项目名称:Ducati_Mikro,代码行数:27,
示例2: reset/** * Called when a widget wishes to display its documentation in the * doc window. If there was already documentation there, that will * be updated before being removed from the view. * * Also call this function if you update the documentation in another * place, such as a properties dialog. Just set overwrite to true. * * Overwrite is used when you believe that the documentation window * is already displaying documentation for the widget you wish to * display. * Overwrite just determines whose version is more up to date. */void DocWindow::showDocumentation(UMLObject * object, bool overwrite){ if (!object) { reset(); return; } if (m_Showing == st_UMLObject && object == m_pUMLObject) { if (!overwrite) { return; } } else if (m_Showing == st_UMLWidget && object == m_pUMLWidget->umlObject()) { if (!overwrite) { updateDocumentation(); } } else { updateDocumentation(true); } m_Showing = st_UMLObject; m_pUMLObject = object; m_docTE->setText(m_pUMLObject->doc()); if (m_pUMLObject->baseType() == UMLObject::ot_Folder) { UMLFolder *folder = m_pUMLObject->asUMLFolder(); updateLabel(folder->localName()); } else updateLabel(m_pUMLObject->name()); toForeground();}
开发者ID:KDE,项目名称:umbrello,代码行数:45,
示例3: addStepvoid LLPreviewGesture::initDefaultGesture(){ LLScrollListItem* item; item = addStep("Animation"); LLGestureStepAnimation* anim = (LLGestureStepAnimation*)item->getUserdata(); anim->mAnimAssetID = ANIM_AGENT_HELLO; anim->mAnimName = "Wave"; updateLabel(item); item = addStep("Wait"); LLGestureStepWait* wait = (LLGestureStepWait*)item->getUserdata(); wait->mFlags = WAIT_FLAG_ALL_ANIM; updateLabel(item); item = addStep("Chat"); LLGestureStepChat* chat_step = (LLGestureStepChat*)item->getUserdata(); chat_step->mChatText = "Hello, avatar!"; updateLabel(item); // Start with item list selected mStepList->selectFirstItem(); // this is *new* content, so we are dirty mDirty = TRUE;}
开发者ID:xinyaojiejie,项目名称:Dale,代码行数:25,
示例4: sizeofvoid ImageWidget::execPrg(QAction *action) { QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); QString actionText = action->text(); if (actionText.startsWith("Set label")) { int no = sizeof("Set label to "); QString labelText = actionText.mid(no -1); if (labelText == "None") updateLabel(""); else updateLabel(labelText);qDebug() << "Setting label to " + labelText; } else { int space = actionText.indexOf(" "); int no = actionText.left(space).toInt() -1; InterlaceConfig* conf = InterlaceConfig::getInstance(); QString confCommand = conf->getPrgCommand(no); QString file = QDir::toNativeSeparators(imageAbsoluteName); QString command = confCommand.replace("${file}", file); QProcess *proc = new QProcess(); connect(proc, SIGNAL( finished ( int , QProcess::ExitStatus)), proc, SLOT(deleteLater())); proc->start(command); proc->waitForStarted(-1); } QApplication::restoreOverrideCursor();}
开发者ID:susannej,项目名称:interlace,代码行数:31,
示例5: KPushButtonKisMouseInputEditor::KisMouseInputEditor(QWidget *parent) : KPushButton(parent), d(new Private){ QWidget *popup = new QWidget(); d->ui = new Ui::KisMouseInputEditor; d->ui->setupUi(popup); d->ui->mouseButton->setType(KisInputButton::MouseType); d->ui->clearModifiersButton->setIcon(KisIconUtils::loadIcon("edit-clear")); d->ui->clearMouseButton->setIcon(KisIconUtils::loadIcon("edit-clear")); QWidgetAction *action = new QWidgetAction(this); action->setDefaultWidget(popup); QMenu *menu = new QMenu(this); menu->addAction(action); setMenu(menu); QTimer::singleShot(0, this, SLOT(showMenu())); connect(d->ui->mouseButton, SIGNAL(dataChanged()), SLOT(updateLabel())); connect(d->ui->modifiersButton, SIGNAL(dataChanged()), SLOT(updateLabel())); connect(d->ui->clearMouseButton, SIGNAL(clicked(bool)), d->ui->mouseButton, SLOT(clear())); connect(d->ui->clearModifiersButton, SIGNAL(clicked(bool)), d->ui->modifiersButton, SLOT(clear()));}
开发者ID:woylaski,项目名称:kexi,代码行数:26,
示例6: updateLabelvoid Annotator::pickLabel(void){ uint64_t index = 0; bool picked = false; int label = -1; for(std::vector<QWidget*>::iterator iter=inputs_.begin();iter!=inputs_.end();++iter) { MeshPairViewerWidget* w = (MeshPairViewerWidget*)(*iter); if(picked)w->first_selected().clear(); else { if(!w->first_selected().empty()) { label = labels_[index](w->first_selected().back()); picked = true; w->first_selected().clear(); } } QApplication::processEvents(); ++index; } if( label >= 0 ) { updateLabel(label); }}
开发者ID:samhu1989,项目名称:DevBundle,代码行数:25,
示例7: whilevoid ofxUIMinimalSlider::setParent(ofxUIWidget *_parent){ parent = _parent; ofxUIRectangle *labelrect = label->getRect(); while(labelrect->width > rect->width) { string labelstring = label->getLabel(); string::iterator it; it=labelstring.end(); it--; labelstring.erase (it); label->setLabel(labelstring); } if(autoSize || rect->height < label->getPaddingRect()->height) { rect->height = label->getPaddingRect()->height; } float h = labelrect->getHeight(); float ph = rect->getHeight(); labelrect->y = (int)(ph*.5 - h*.5); labelrect->x = padding; paddedRect->height = rect->height+padding*2.0; paddedRect->width = rect->width+padding*2.0; updateLabel(); }
开发者ID:echa,项目名称:libopenframeworks,代码行数:28,
示例8: addClicked //@{ void addClicked() { QTreeWidgetItem *newRow = 0; QList<QTreeWidgetItem*> selectedPaths = m_treeView->selectedItems(); if(selectedPaths.empty()) { newRow = new QTreeWidgetItem( m_treeView ); } else { newRow = new QTreeWidgetItem(); m_treeView->insertTopLevelItem(m_treeView->indexOfTopLevelItem(selectedPaths.last()) + 1, newRow); } if(newRow) { newRow->setFlags(newRow->flags() | Qt::ItemIsEditable); m_adapter.updateToRow(newRow, typename MFAdapter::value_type()); updateLabel(); rebuildRowIndexes(); } Q_EMIT signalChanged(); }
开发者ID:npapier,项目名称:vgsdk,代码行数:26,
示例9: switchbool BaseModel::setData(const QModelIndex & index, const QVariant & value, int role){ if(!index.isValid() || role != Qt::EditRole || index.column() != 0) return false; switch(value.toInt()) { case(0): if(selected_.contains(index)) selected_.remove(index); break; case(2): if(!selected_.contains(index)) selected_ << index; break; case(3): if(selected_.contains(index)) selected_.remove(index); else selected_ << index; break; } emit dataChanged(index, index); emit updateLabel(0); return true;}
开发者ID:sharkman,项目名称:plugins,代码行数:27,
示例10: layoutAboutToBeChangedvoid BaseModel::unselectAll(){ emit layoutAboutToBeChanged(); selected_.clear(); emit updateLabel(0); emit layoutChanged();}
开发者ID:sharkman,项目名称:plugins,代码行数:7,
示例11: QWidgetMumeClockWidget::MumeClockWidget(MumeClock *clock, QWidget *parent) : QWidget(parent), m_clock(clock){ setupUi(this); m_lastSeason = SEASON_UNKNOWN; m_lastTime = TIME_UNKNOWN; m_lastPrecision = MUMECLOCK_UNSET; m_timer = new QTimer(this); connect(m_timer, SIGNAL(timeout()), this, SLOT(updateLabel())); m_timer->start(1000); updateLabel();}
开发者ID:midoc,项目名称:MMapper,代码行数:16,
示例12: contentsMarginsvoidQueryLabel::setResult( const Tomahawk::result_ptr& result ){ if ( result.isNull() ) return; if ( !m_text.isEmpty() && contentsMargins().left() != 0 ) // FIXME: hacky m_textMargins = contentsMargins(); setContentsMargins( BOXMARGIN * 2, BOXMARGIN / 2, BOXMARGIN * 2, BOXMARGIN / 2); if ( m_result.isNull() || m_result.data() != result.data() ) { m_result = result; m_query = m_result->toQuery(); QList<Tomahawk::result_ptr> rl; rl << m_result; m_query->addResults( rl ); updateLabel(); emit textChanged( text() ); emit resultChanged( m_result ); }}
开发者ID:LittleForker,项目名称:tomahawk,代码行数:26,
示例13: updateLabel// staticvoid LLPreviewGesture::onCommitAnimationTrigger(LLUICtrl* ctrl, void *data){ LLPreviewGesture* self = (LLPreviewGesture*)data; LLScrollListItem* step_item = self->mStepList->getFirstSelected(); if (step_item) { LLGestureStep* step = (LLGestureStep*)step_item->getUserdata(); if (step->getType() == STEP_ANIMATION) { LLGestureStepAnimation* anim_step = (LLGestureStepAnimation*)step; if (self->mAnimationRadio->getSelectedIndex() == 0) { // start anim_step->mFlags &= ~ANIM_FLAG_STOP; } else { // stop anim_step->mFlags |= ANIM_FLAG_STOP; } // Update the UI label in the list updateLabel(step_item); self->mDirty = TRUE; self->refresh(); } }}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:30,
示例14: locale// staticvoid LLPreviewGesture::onCommitWait(LLUICtrl* ctrl, void* data){ LLPreviewGesture* self = (LLPreviewGesture*)data; LLScrollListItem* step_item = self->mStepList->getFirstSelected(); if (!step_item) return; LLGestureStep* step = (LLGestureStep*)step_item->getUserdata(); if (step->getType() != STEP_WAIT) return; LLGestureStepWait* wait_step = (LLGestureStepWait*)step; U32 flags = 0x0; if (self->mWaitAnimCheck->get()) flags |= WAIT_FLAG_ALL_ANIM; if (self->mWaitTimeCheck->get()) flags |= WAIT_FLAG_TIME; wait_step->mFlags = flags; { LLLocale locale(LLLocale::USER_LOCALE); F32 wait_seconds = (F32)atof(self->mWaitTimeEditor->getText().c_str()); if (wait_seconds < 0.f) wait_seconds = 0.f; if (wait_seconds > 3600.f) wait_seconds = 3600.f; wait_step->mWaitSeconds = wait_seconds; } // Enable the input area if necessary self->mWaitTimeEditor->setEnabled(self->mWaitTimeCheck->get()); // Update the UI label in the list updateLabel(step_item); self->mDirty = TRUE; self->refresh();}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:35,
示例15: parse_messagesvoid CandidateWindowProxy::slotReadyStandardOutput(){ QByteArray output = process->readAllStandardOutput(); QList<QStringList> messageList = parse_messages(QString(output)); for (int i = 0, j = messageList.count(); i < j; i++) { QStringList message = messageList[i]; QString command = message[0]; if (command == "set_candidate_index") { uim_set_candidate_index(ic->uimContext(), message[1].toInt()); } else if (command == "set_candidate_index_2") { candidateIndex = pageIndex * displayLimit + message[1].toInt(); uim_set_candidate_index(ic->uimContext(), candidateIndex); } else if (command == "set_candwin_active") { ic->setCandwinActive(); } else if (command == "set_focus_widget") { setFocusWidget(); } else if (command == "update_label") { updateLabel(); }#ifdef WORKAROUND_BROKEN_RESET_IN_QT4 else if (command == "shown") { m_isVisible = true; } else if (command == "hidden") { m_isVisible = false; }#endif }}
开发者ID:doughdemon,项目名称:uim,代码行数:28,
示例16: switchvoid BowButton::onTouchEnded(Touch *pTouch, Event *event) { int unlockJewel = 250; if (this->isTouchedInsert(pTouch)) { switch (_state) { case BowButtonState::LOCKED: if (DATAOPERATOR->getJewel() > unlockJewel && this->isUpgradeEnable()) { DATAOPERATOR->setJewel(DATAOPERATOR->getJewel() - unlockJewel); auto parent = dynamic_cast<SelectScene *>(_parent); parent->updateLabel(); this->unlock(); } else { if (DATAOPERATOR->getEffectEnable()) AUDIOENGINE->playEffect(GOLDOVER_EFFECT_NAME); } break; case BowButtonState::UNLOCK_UNSELECTED: this->select(); _showSprite->setSpriteFrame(_up); break; case BowButtonState::UNLOCK_SELECTED: _showSprite->setSpriteFrame(_up); break; default: break; } }}
开发者ID:empblackmax,项目名称:MagicHero,代码行数:28,
示例17: countChanged void StatusSummaryItem::setCount(uint count) { if (m_count != count) emit countChanged(); m_count = count; updateLabel(); }
开发者ID:Jellofishi,项目名称:Desktop,代码行数:7,
示例18: ofxUIMapvoid ofxUISlider_<T>::setValue(T _value){ value = ofxUIMap(_value, min, max, 0.0, 1.0, bClampValue); updateValueRef(); updateLabel();}
开发者ID:genekogan,项目名称:ofxUI,代码行数:7,
示例19: setWindowTitleGeometry::Geometry(){ setWindowTitle(tr("Geometry")); label1 = new QLabel; label1->setText("x():"); label2 = new QLabel; label2->setText("y():"); label3 = new QLabel; label3->setText("frameGeometry():"); label4 = new QLabel; label4->setText("pos():"); label5 = new QLabel; label5->setText("geometry():"); label6 = new QLabel; label6->setText("width():"); label7 = new QLabel; label7->setText("height():"); label8 = new QLabel; label8->setText("rect():"); label9 = new QLabel; label9->setText("size():"); xLabel = new QLabel; yLabel = new QLabel; frameGeoLabel = new QLabel; posLabel = new QLabel; geoLabel = new QLabel; widthLabel = new QLabel; heightLabel = new QLabel; rectLabel = new QLabel; sizeLabel = new QLabel; QGridLayout *layout = new QGridLayout(this); layout->setMargin(20); layout->setSpacing(10); int l = 0; int c = 1; layout->addWidget(label1,0,l); layout->addWidget(xLabel,0,c); layout->addWidget(label2,1,l); layout->addWidget(yLabel,1,c); layout->addWidget(label3,2,l); layout->addWidget(frameGeoLabel,2,c); layout->addWidget(label4,3,l); layout->addWidget(posLabel,3,c); layout->addWidget(label5,4,l); layout->addWidget(geoLabel,4,c); layout->addWidget(label6,5,l); layout->addWidget(widthLabel,5,c); layout->addWidget(label7,6,l); layout->addWidget(heightLabel,6,c); layout->addWidget(label8,7,l); layout->addWidget(rectLabel,7,c); layout->addWidget(label9,8,l); layout->addWidget(sizeLabel,8,c); updateLabel();}
开发者ID:cugxiangzhenwei,项目名称:MySrcCode,代码行数:59,
示例20: QTextEditEmailComposer::EmailComposer( QWidget *parent, const char *name ) : QTextEdit( parent ), m_index( -1 ){ setObjectName(name); setFrameStyle(NoFrame); setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); connect( this, SIGNAL(textChanged()), this, SIGNAL(contentChanged()) ); connect( this, SIGNAL(textChanged()), this, SLOT(updateLabel()) ); setWordWrapMode( QTextOption::WordWrap); m_addAttDialog = new AddAttDialog(this, "attachmentDialog"); updateLabel();}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:17,
示例21: colorSkyLine::SkyLine(SKY_LINE_TYPE _line_type) : color(0.f, 0.f, 1.f){ // Font size is 14 font.setPixelSize(StelApp::getInstance().getBaseFontSize()+1); line_type = _line_type; updateLabel();}
开发者ID:mvancompernolle,项目名称:ai_project,代码行数:8,
示例22: calculatePaddingRectvoid ofxUISlider_<T>::setParent(ofxUIWidget *_parent){ parent = _parent; label->getRect()->setY(rect->getHeight()+padding); calculatePaddingRect(); updateValueRef(); updateLabel();}
开发者ID:BentleyBlanks,项目名称:ksApp,代码行数:8,
示例23: updateLabelvoidElideLabel::setElideMode(Qt::TextElideMode mode) { if (mode == m_elideMode) return; m_elideMode = mode; updateLabel();}
开发者ID:CharlesLio,项目名称:mkvtoolnix,代码行数:8,
示例24: ofxUIMapvoid ofxUIRotarySlider::update(){ if(useReference) { value = ofxUIMap(*valueRef, min, max, 0.0, 1.0, true); updateLabel(); }}
开发者ID:Aharobot,项目名称:ofxUI,代码行数:8,
示例25: connectvoid WTrackProperty::slotTrackLoaded(TrackPointer track) { if (track) { m_pCurrentTrack = track; connect(track.data(), SIGNAL(changed(Track*)), this, SLOT(updateLabel(Track*))); updateLabel(track.data()); }}
开发者ID:Alppasa,项目名称:mixxx,代码行数:8,
示例26: ofxUIMapvoid ofxUISlider_<T>::update(){ if(useReference) { value = ofxUIMap(*valueRef, min, max, 0.0, 1.0, bClampValue); updateLabel(); }}
开发者ID:BentleyBlanks,项目名称:ksApp,代码行数:8,
注:本文中的updateLabel函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateLayout函数代码示例 C++ updateItem函数代码示例 |