这篇教程C++ updateContent函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateContent函数的典型用法代码示例。如果您正苦于以下问题:C++ updateContent函数的具体用法?C++ updateContent怎么用?C++ updateContent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateContent函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: updateContent//==============================================================================void FileListComponent::changeListenerCallback (ChangeBroadcaster*){ updateContent(); if (lastDirectory != fileList.getDirectory()) { lastDirectory = fileList.getDirectory(); deselectAllRows(); }}
开发者ID:0x4d52,项目名称:JUCE,代码行数:11,
示例2: updateContentvoid Label::setColor(const Color3B& color){ _fontDefinition._fontFillColor = color; if (_textSprite) { updateContent(); } _reusedLetter->setColor(color); SpriteBatchNode::setColor(color);}
开发者ID:khanhbui,项目名称:ThreeDots,代码行数:10,
示例3: updateFontvoid Label::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags){ if (! _visible || _originalUTF8String.empty()) { return; } if (_systemFontDirty) { updateFont(); } if (_contentDirty) { updateContent(); } uint32_t flags = processParentFlags(parentTransform, parentFlags); if (_shadowEnabled && _shadowBlurRadius <= 0 && (_shadowDirty || (flags & FLAGS_DIRTY_MASK))) { _position.x += _shadowOffset.width; _position.y += _shadowOffset.height; _transformDirty = _inverseDirty = true; _shadowTransform = transform(parentTransform); _position.x -= _shadowOffset.width; _position.y -= _shadowOffset.height; _transformDirty = _inverseDirty = true; _shadowDirty = false; } // IMPORTANT: // To ease the migration to v3.0, we still support the Mat4 stack, // but it is deprecated and your code should not rely on it Director* director = Director::getInstance(); CCASSERT(nullptr != director, "Director is null when seting matrix stack"); director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform); if (_textSprite) { drawTextSprite(renderer, flags); } else { draw(renderer, _modelViewTransform, flags); } director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); setOrderOfArrival(0);}
开发者ID:4an70m,项目名称:Cocos2dxTest,代码行数:55,
示例4: heightvoid TimeLine::updateLayerView(){ int pageStep = ( height() - mTracks->getOffsetY() - mHScrollbar->height() ) / mTracks->getLayerHeight() - 2; mVScrollbar->setPageStep( pageStep ); mVScrollbar->setMinimum( 0 ); mVScrollbar->setMaximum( qMax(0, mNumLayers - mVScrollbar->pageStep()) ); update(); updateContent();}
开发者ID:4423Q,项目名称:pencil,代码行数:11,
示例5: syncSelectedItemsWithDeviceList //============================================================================== void syncSelectedItemsWithDeviceList (const ReferenceCountedArray<MidiDeviceListEntry>& midiDevices) { SparseSet<int> selectedRows; for (int i = 0; i < midiDevices.size(); ++i) if (midiDevices[i]->inDevice != nullptr || midiDevices[i]->outDevice != nullptr) selectedRows.addRange (Range<int> (i, i+1)); lastSelectedItems = selectedRows; updateContent(); setSelectedRows (selectedRows, dontSendNotification); }
开发者ID:Neknail,项目名称:JUCE,代码行数:12,
示例6: disconnectedDeviceClicked //============================================================================== void disconnectedDeviceClicked (int row) { stopTimer(); AndroidBluetoothMidiDevice& device = devices.getReference (row); device.connectionStatus = AndroidBluetoothMidiDevice::connecting; updateContent(); repaint(); new PairDeviceThread (device.bluetoothAddress, *this); }
开发者ID:410pfeliciano,项目名称:JUCE,代码行数:12,
示例7: setCommentvoid JavaClassDeclarationBlock::init (JavaClassifierCodeDocument *parentDoc, const QString &comment){ setComment(new JavaCodeDocumentation(parentDoc)); getComment()->setText(comment); setEndText("}"); updateContent();}
开发者ID:serghei,项目名称:kde-kdesdk,代码行数:11,
示例8: setCommentvoid XMLElementCodeBlock::init (CodeDocument *parentDoc, const QString &nodeName, const QString &comment){ setComment(new XMLCodeComment(parentDoc)); getComment()->setText(comment); m_nodeName = nodeName; updateContent();}
开发者ID:serghei,项目名称:kde-kdesdk,代码行数:11,
示例9: SequenceLayerTimelineAudioLayerTimeline::AudioLayerTimeline(AudioLayer * layer) : SequenceLayerTimeline(layer), audioLayer(layer){ bgColor = AUDIO_COLOR.withSaturation(.2f).darker(1); cmMUI = new AudioLayerClipManagerUI(this,&layer->clipManager); addAndMakeVisible(cmMUI); updateContent();}
开发者ID:haskellstudio,项目名称:Chataigne,代码行数:11,
示例10: updateHistoryElemvoid URLNavigator::goBack(){ updateHistoryElem(); const int count = m_history.count(); if (m_historyIndex < count - 1) { ++m_historyIndex; updateContent(); emit urlChanged(url()); emit historyChanged(); }}
开发者ID:serghei,项目名称:kde3-apps-dolphin,代码行数:12,
示例11: abortbool FunctionHintProposalWidget::updateAndCheck(const QString &prefix){ const int activeArgument = d->m_model->activeArgument(prefix); if (activeArgument == -1) { abort(); return false; } else if (activeArgument != d->m_currentArgument) { d->m_currentArgument = activeArgument; updateContent(); } return true;}
开发者ID:Azarien,项目名称:qt-creator,代码行数:13,
示例12: updateLengthvoid TimeLine::forceUpdateLength(QString newLength){ bool ok; int dec = newLength.toInt(&ok, 10); if ( dec > getFrameLength()) { updateLength(dec); updateContent(); QSettings settings("Pencil","Pencil"); settings.setValue("length", dec); }}
开发者ID:4423Q,项目名称:pencil,代码行数:13,
示例13: updateContentvoid DockItem::removeClient(Client* client){ m_clients.remove(m_clients.indexOf(client)); if(m_clients.isEmpty()) { // TODO: Stub. Item may be a launcher. delete this; } else { updateContent(); }}
开发者ID:ViktorNova,项目名称:qtpanel,代码行数:13,
示例14: updateContentvoidRoutingStatsScene::reloadContent(bool force){ if(m_nodeIdProxyWidgets.empty()) { return; } m_lastX = 0; m_lastY = 0; m_bottomY = 0; qreal currentTime = StatsMode::getInstance()->getCurrentTime(); qreal currentMaxHeight = 0; for(NodeIdProxyWidgetMap_t::const_iterator i = m_nodeIdProxyWidgets.begin(); i != m_nodeIdProxyWidgets.end(); ++i) { QGraphicsProxyWidget * pw = i->second; if((force) || (!m_lastTime) || (m_lastTime != currentTime)) { updateContent(i->first, pw); } bool nodeIsActive = StatsMode::getInstance()->isNodeActive(i->first); pw->setVisible(nodeIsActive); if(nodeIsActive) { qreal newX = m_lastX + pw->size().width(); currentMaxHeight = qMax(currentMaxHeight, pw->size().height()); if(newX >= sceneRect().right()) { m_lastX = 0; m_lastY += currentMaxHeight + INTERSTATS_SPACE; currentMaxHeight = 0; } pw->setPos(m_lastX, m_lastY); m_lastX = pw->pos().x() + pw->size().width() + INTERSTATS_SPACE; m_lastY = pw->pos().y(); m_bottomY = m_lastY + currentMaxHeight; adjustRect(); } } m_lastTime = currentTime;}
开发者ID:DunamisEric,项目名称:RepSys_Manets_NS-3.17,代码行数:51,
示例15: CodeOperationRubyCodeOperation::RubyCodeOperation ( RubyClassifierCodeDocument * doc, UMLOperation *parent, const QString & body, const QString & comment ) : CodeOperation (doc, parent, body, comment){ // lets not go with the default comment and instead use // full-blown ruby documentation object instead setComment(new RubyCodeDocumentation(doc)); // these things never change.. setOverallIndentationLevel(1); updateMethodDeclaration(); updateContent();}
开发者ID:serghei,项目名称:kde-kdesdk,代码行数:14,
示例16: updateContentvoid Bubble::setEntity(NotificationEntity *entity){ if (!entity) return; m_entity = entity; m_outTimer->stop(); updateContent(); show(); m_outTimer->start();}
开发者ID:linuxdeepin,项目名称:deepin-notifications,代码行数:14,
示例17: updateContentvoid MyTextField::deleteBackward(){ TextFieldTTF::deleteBackward(); if(m_orientation == TextFieldOrientation::VERTICAL){ //删非/n的字符 if(_inputText.length() > 0 && _inputText.at(_inputText.length() - 1) != '/n'){ TextFieldTTF::deleteBackward(); } } if(_charCount == 0){ updateContent(); }}
开发者ID:cleverpo,项目名称:BSpokeApp,代码行数:14,
示例18: updateContentint Label::getStringNumLines(){ if (_contentDirty) { updateContent(); } if (_currentLabelType == LabelType::STRING_TEXTURE) { computeStringNumLines(); } return _numberOfLines;}
开发者ID:wade0317,项目名称:Calc,代码行数:14,
示例19: updateContent//==============================================================================void FileListComponent::changeListenerCallback (ChangeBroadcaster*){ updateContent(); if (lastDirectory != directoryContentsList.getDirectory()) { fileWaitingToBeSelected = File(); lastDirectory = directoryContentsList.getDirectory(); deselectAllRows(); } if (fileWaitingToBeSelected != File()) setSelectedFile (fileWaitingToBeSelected);}
开发者ID:RomanKubiak,项目名称:amnesia,代码行数:15,
示例20: killTimervoid FileContentTracker::setFile(const QUrl &file){ if (m_watcher) { delete m_watcher; m_watcher = 0; killTimer(m_timer); m_timer = 0; } m_fileName = file.toLocalFile(); QFileInfo info(m_fileName); if (!info.exists()) { qDebug() << "FileContentTracker: file does not exist:" << m_fileName; return; } if (!info.isFile()) { qDebug() << "FileContentTracker: not a file:" << m_fileName; return; } m_watcher = new QFileSystemWatcher(this); if (!m_watcher->addPath(m_fileName)) { qDebug() << "FileContentTracker: failed to track file" << m_fileName; delete m_watcher; m_watcher = 0; return; } qDebug() << "FileContentTracker: now tracking" << m_fileName; connect(m_watcher, SIGNAL(fileChanged(QString)), this, SLOT(updateContent(QString))); updateContent(m_fileName); m_timer = startTimer(1000); // Need this because it doesn't seem to track on Mac OS X.}
开发者ID:gerchanovsky,项目名称:stuff,代码行数:36,
示例21: updateContentbool UrlNavigator::setHistoryIndex(int index){ if (index < 0 || index > m_history.size() - 1) { return false; } if (index == m_historyIndex) { return true; } m_historyIndex = index; updateContent(); emit historyChanged(); return true;}
开发者ID:nikola-kocic,项目名称:KIV,代码行数:17,
示例22: updateContentvoid GlobalRouterStatisticsWidget::wheelEvent(QWheelEvent *e){ if(e->x() < mMinWheelZoneX || e->x() > mMaxWheelZoneX || e->y() < mMinWheelZoneY || e->y() > mMaxWheelZoneY) { QWidget::wheelEvent(e) ; return ; } if(e->delta() > 0 && mCurrentN+PARTIAL_VIEW_SIZE/2+1 < mNumberOfKnownKeys) mCurrentN++ ; if(e->delta() < 0 && mCurrentN > PARTIAL_VIEW_SIZE/2+1) mCurrentN-- ; updateContent(); update();}
开发者ID:heini,项目名称:RetroShare,代码行数:17,
示例23: setupUIvoid VAttachmentList::init(){ if (m_initialized) { return; } m_initialized = true; setupUI(); QShortcut *infoShortcut = new QShortcut(QKeySequence(c_infoShortcutSequence), this); infoShortcut->setContext(Qt::WidgetWithChildrenShortcut); connect(infoShortcut, &QShortcut::activated, this, &VAttachmentList::attachmentInfo); updateContent();}
开发者ID:getwindow,项目名称:vnote,代码行数:17,
示例24: updateFont///// PROTOCOL STUFFSprite * Label::getLetter(int letterIndex){ if (_fontDirty) { updateFont(); return nullptr; } if (_contentDirty) { updateContent(); } if (! _textSprite && letterIndex < _limitShowCount) { const auto &letter = _lettersInfo[letterIndex]; if(! letter.def.validDefinition) return nullptr; Sprite* sp = static_cast<Sprite*>(this->getChildByTag(letterIndex)); if (!sp) { Rect uvRect; uvRect.size.height = letter.def.height; uvRect.size.width = letter.def.width; uvRect.origin.x = letter.def.U; uvRect.origin.y = letter.def.V; sp = Sprite::createWithTexture(_fontAtlas->getTexture(letter.def.textureID),uvRect); sp->setBatchNode(_batchNodes[letter.def.textureID]); sp->setPosition(Point(letter.position.x + uvRect.size.width / 2, letter.position.y - uvRect.size.height / 2)); sp->setOpacity(_realOpacity); _batchNodes[letter.def.textureID]->addSpriteWithoutQuad(sp, letter.atlasIndex, letterIndex); } return sp; } return nullptr;}
开发者ID:Ratel13,项目名称:cocos2d-lua-Facebook,代码行数:44,
示例25: QHBoxURLNavigator::URLNavigator(const KURL& url, DolphinView* dolphinView) : QHBox(dolphinView), m_historyIndex(0), m_dolphinView(dolphinView){ m_history.prepend(HistoryElem(url)); QFontMetrics fontMetrics(font()); setMinimumHeight(fontMetrics.height() + 8); m_toggleButton = new QPushButton(SmallIcon("editurl"), 0, this); m_toggleButton->setFlat(true); m_toggleButton->setToggleButton(true); m_toggleButton->setFocusPolicy(QWidget::NoFocus); m_toggleButton->setMinimumHeight(minimumHeight()); connect(m_toggleButton, SIGNAL(clicked()), this, SLOT(slotClicked())); if (DolphinSettings::instance().isURLEditable()) { m_toggleButton->toggle(); } m_bookmarkSelector = new BookmarkSelector(this); connect(m_bookmarkSelector, SIGNAL(bookmarkActivated(int)), this, SLOT(slotBookmarkActivated(int))); m_pathBox = new KURLComboBox(KURLComboBox::Directories, true, this); KURLCompletion* kurlCompletion = new KURLCompletion(KURLCompletion::DirCompletion); m_pathBox->setCompletionObject(kurlCompletion); m_pathBox->setAutoDeleteCompletionObject(true); connect(m_pathBox, SIGNAL(returnPressed(const QString&)), this, SLOT(slotReturnPressed(const QString&))); connect(m_pathBox, SIGNAL(urlActivated(const KURL&)), this, SLOT(slotURLActivated(const KURL&))); connect(dolphinView, SIGNAL(contentsMoved(int, int)), this, SLOT(slotContentsMoved(int, int))); updateContent();}
开发者ID:serghei,项目名称:kde3-apps-dolphin,代码行数:41,
示例26: updateDeviceList //============================================================================== void updateDeviceList() { StringArray bluetoothAddresses = AndroidBluetoothMidiInterface::getBluetoothMidiDevicesNearby(); Array<AndroidBluetoothMidiDevice> newDevices; for (String* address = bluetoothAddresses.begin(); address != bluetoothAddresses.end(); ++address) { String name = AndroidBluetoothMidiInterface::getHumanReadableStringForBluetoothAddress (*address); DeviceStatus status = AndroidBluetoothMidiInterface::isBluetoothDevicePaired (*address) ? AndroidBluetoothMidiDevice::connected : AndroidBluetoothMidiDevice::disconnected; newDevices.add (AndroidBluetoothMidiDevice (name, *address, status)); } devices.swapWith (newDevices); updateContent(); repaint(); }
开发者ID:410pfeliciano,项目名称:JUCE,代码行数:22,
示例27: ASSERTvoid LayoutListMarker::computePreferredLogicalWidths() { ASSERT(preferredLogicalWidthsDirty()); updateContent(); if (isImage()) { LayoutSize imageSize(imageBulletSize()); m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = style()->isHorizontalWritingMode() ? imageSize.width() : imageSize.height(); clearPreferredLogicalWidthsDirty(); updateMargins(); return; } const Font& font = style()->font(); const SimpleFontData* fontData = font.primaryFont(); DCHECK(fontData); if (!fontData) return; LayoutUnit logicalWidth; switch (getListStyleCategory()) { case ListStyleCategory::None: break; case ListStyleCategory::Symbol: logicalWidth = LayoutUnit((fontData->getFontMetrics().ascent() * 2 / 3 + 1) / 2 + 2); break; case ListStyleCategory::Language: logicalWidth = getWidthOfTextWithSuffix(); break; } m_minPreferredLogicalWidth = logicalWidth; m_maxPreferredLogicalWidth = logicalWidth; clearPreferredLogicalWidthsDirty(); updateMargins();}
开发者ID:mirror,项目名称:chromium,代码行数:40,
注:本文中的updateContent函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateContentSizeWithTextureSize函数代码示例 C++ updateColors函数代码示例 |