• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ requestUpdate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: requestUpdate

void KisShapeSelectionModel::add(KoShape *child)
{
    if (!m_shapeSelection) return;

    if (m_shapeMap.contains(child))
        return;

    child->setStroke(0);
    child->setBackground( QSharedPointer<KoShapeBackground>(0));
    m_shapeMap.insert(child, child->boundingRect());
    m_shapeSelection->shapeManager()->addShape(child);

    QRect updateRect = child->boundingRect().toAlignedRect();
    if (m_image.isValid()) {
        QTransform matrix;
        matrix.scale(m_image->xRes(), m_image->yRes());
        updateRect = matrix.mapRect(updateRect);
    }

    if (m_shapeMap.count() == 1) {
        // The shape is the first one, so the shape selection just got created
        // Pixel selection provides no longer the datamanager of the selection
        // so update the whole selection
        requestUpdate(QRect());
    } else {
        requestUpdate(updateRect);
    }
}
开发者ID:ChrisJong,项目名称:krita,代码行数:28,代码来源:kis_shape_selection_model.cpp


示例2: QAbstractListModel

TransferMethodsModel::TransferMethodsModel(QObject* aParent):
    QAbstractListModel(aParent)
{
    iTransferEngine = new OrgNemoTransferEngine("org.nemo.transferengine",
        "/org/nemo/transferengine", QDBusConnection::sessionBus(), this);
    connect(iTransferEngine,
        SIGNAL(transferMethodListChanged()),
        SLOT(requestUpdate()));
    requestUpdate();
}
开发者ID:blacky-i,项目名称:harbour-mmslog,代码行数:10,代码来源:transfermethodsmodel.cpp


示例3: requestUpdate

void DatapickerImage::setPlotImageType(const DatapickerImage::PlotImageType type) {
	d->plotImageType = type;
	if (d->plotImageType == DatapickerImage::ProcessedImage)
		d->discretize();

	emit requestUpdate();
}
开发者ID:gerlachs,项目名称:labplot,代码行数:7,代码来源:DatapickerImage.cpp


示例4: LLSLURL

// Multiple calls to showInstance("inspect_avatar", foo) will provide different
// LLSD for foo, which we will catch here.
//virtual
void LLInspectAvatar::onOpen(const LLSD& data)
{
    // Start open animation
    LLInspect::onOpen(data);

    // Extract appropriate avatar id
    mAvatarID = data["avatar_id"];

    // Position the inspector relative to the mouse cursor
    // Similar to how tooltips are positioned
    // See LLToolTipMgr::createToolTip
    if (data.has("pos"))
    {
        LLUI::positionViewNearMouse(this, data["pos"]["x"].asInteger(), data["pos"]["y"].asInteger());
    }
    else
    {
        LLUI::positionViewNearMouse(this);
    }

    // Generate link to avatar profile.
    getChild<LLUICtrl>("avatar_profile_link")->setTextArg("[LINK]", LLSLURL("agent", mAvatarID, "about").getSLURLString());

    // can't call from constructor as widgets are not built yet
    requestUpdate();

    updateVolumeSlider();
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:31,代码来源:llinspectavatar.cpp


示例5: requestUpdate

void MotionPlayerClient::updateMotion(motionfile::Motion motion)
{
    if(motion.frames.size() < 1)
        return;

    requestUpdate(motion, TYPE_UPDATE_MOTION);
}
开发者ID:AIS-Bonn,项目名称:humanoid_op_ros,代码行数:7,代码来源:motionplayerclient.cpp


示例6: switch

void Player::use()
{
	Tile* curr = nullptr;
    switch (dir) {
        case kLeft:
            curr = tileAt(worldPos.x, worldPos.y, tileLeft().x, tileLeft().y);
            break;
        case kRight:
            curr = tileAt(worldPos.x, worldPos.y, tileRight().x, tileRight().y);
            break;
        case kDown:
            curr = tileAt(worldPos.x, worldPos.y, tileDown().x, tileDown().y);
            break;
        case kUp:
            curr = tileAt(worldPos.x, worldPos.y, tileUp().x, tileUp().y);
            break;
        default:
            break;
    }
	if (curr != nullptr)
    {
        if (curr->canUse())
        {
            if (curr->use())
            {
                requestUpdate(delegate);
            }
        }
    }
}
开发者ID:Samuel-Lewis,项目名称:Crypt,代码行数:30,代码来源:Player.cpp


示例7: setDisableDecoration

// currently we don't have a possibility to configure disableDecoration
// if we have an old config this value can be true which is... bad.
// so we upgrade the core stored bufferViewConfig.
// This can be removed with the next release
void ClientBufferViewConfig::ensureDecoration()
{
    if (!disableDecoration())
        return;
    setDisableDecoration(false);
    requestUpdate(toVariantMap());
}
开发者ID:TC01,项目名称:quassel,代码行数:11,代码来源:clientbufferviewconfig.cpp


示例8: while

void* InputDeviceAdapterTrackd::spinPollThreadMethod(void)
	{
	Threads::Thread::setCancelState(Threads::Thread::CANCEL_ENABLE);
	Misc::UInt32 lastSensorTime[2]={0U,0U};
	Misc::UInt32 lastControllerTime[2]={0U,0U};
	while(runSpinPollThread)
		{
		/* Spin until the next time the sensor data or controller data time stamps change: */
		while(runSpinPollThread
		      &&sensorHeader->dataTimeStamp[0]==lastControllerTime[0]&&sensorHeader->dataTimeStamp[1]==lastSensorTime[1]
		      &&controllerHeader->dataTimeStamp[0]==lastControllerTime[0]&&controllerHeader->dataTimeStamp[1]==lastControllerTime[1])
			;
		
		/* Trigger a new Vrui frame: */
		requestUpdate();
		
		/* Update the data time stamps: */
		lastSensorTime[0]=sensorHeader->dataTimeStamp[0];
		lastSensorTime[1]=sensorHeader->dataTimeStamp[1];
		lastControllerTime[0]=controllerHeader->dataTimeStamp[0];
		lastControllerTime[1]=controllerHeader->dataTimeStamp[1];
		}
	
	return 0;
	}
开发者ID:Doc-Ok,项目名称:OpticalTracking,代码行数:25,代码来源:InputDeviceAdapterTrackd.cpp


示例9: Vector_each

	void Widget::deleteChildren() {
		Vector_each(Widget*,it,mChildren)
			delete (*it);
		mChildren.clear();
		requestUpdate();
		requestRepaint();
	}
开发者ID:comforx,项目名称:MoSync,代码行数:7,代码来源:Widget.cpp


示例10: QWidget

UAVObjectBrowserWidget::UAVObjectBrowserWidget(QWidget *parent) : QWidget(parent),
    updatePeriod(MAXIMUM_UPDATE_PERIOD)
{
    // Create browser and configuration GUIs
    m_browser = new Ui_UAVObjectBrowser();
    m_viewoptions = new Ui_viewoptions();
    m_viewoptionsDialog = new QDialog(this);
    m_viewoptions->setupUi(m_viewoptionsDialog);
    m_browser->setupUi(this);

    // Create data model
    m_model = new UAVObjectTreeModel(this);

    // Create tree view and add to layout
    treeView = new UAVOBrowserTreeView(MAXIMUM_UPDATE_PERIOD);
    treeView->setObjectName(QString::fromUtf8("treeView"));
    m_browser->verticalLayout->addWidget(treeView);

    connect(m_browser->saveSDButton, SIGNAL(clicked()), this, SLOT(saveObject()));
    connect(m_browser->readSDButton, SIGNAL(clicked()), this, SLOT(loadObject()));
    connect(m_browser->eraseSDButton, SIGNAL(clicked()), this, SLOT(eraseObject()));
    connect(m_browser->sendButton, SIGNAL(clicked()), this, SLOT(sendUpdate()));
    connect(m_browser->requestButton, SIGNAL(clicked()), this, SLOT(requestUpdate()));
    connect(m_browser->viewSettingsButton,SIGNAL(clicked()),this,SLOT(viewSlot()));


    connect((QTreeView*) treeView, SIGNAL(collapsed(QModelIndex)), this, SLOT(onTreeItemCollapsed(QModelIndex) ));
    connect((QTreeView*) treeView, SIGNAL(expanded(QModelIndex)), this, SLOT(onTreeItemExpanded(QModelIndex) ));

    connect(m_browser->le_searchField, SIGNAL(textChanged(QString)), this, SLOT(searchTextChanged(QString)));
    connect(m_browser->bn_clearSearchField, SIGNAL(clicked()), this, SLOT(searchTextCleared()));

    // Set browser buttons to disabled
    enableUAVOBrowserButtons(false);
}
开发者ID:Trex4Git,项目名称:dRonin,代码行数:35,代码来源:uavobjectbrowserwidget.cpp


示例11: requestUpdate

void DesktopDeviceTool::frame(void)
	{
	int aib=axisIndexBase*factory->numValuators;
	
	/* Convert translational axes into translation vector: */
	Vector translation=Vector::zero;
	for(int i=0;i<factory->numTranslationAxes;++i)
		if(factory->translationAxes[i].index>=aib&&factory->translationAxes[i].index<aib+factory->numValuators)
			translation+=factory->translationAxes[i].axis*getDeviceValuator(0,factory->translationAxes[i].index-aib);
	translation*=factory->translateFactor*getFrameTime();
	
	/* Convert rotational axes into rotation axis vector and rotation angle: */
	Vector scaledRotationAxis=Vector::zero;
	for(int i=0;i<factory->numRotationAxes;++i)
		if(factory->rotationAxes[i].index>=aib&&factory->rotationAxes[i].index<aib+factory->numValuators)
			scaledRotationAxis+=factory->rotationAxes[i].axis*getDeviceValuator(0,factory->rotationAxes[i].index-aib);
	scaledRotationAxis*=factory->rotateFactor*getFrameTime();
	
	/* Calculate an incremental transformation for the virtual input device: */
	ONTransform deltaT=ONTransform::translate(translation);
	Point pos=transformedDevice->getPosition();
	deltaT*=ONTransform::translateFromOriginTo(pos);
	deltaT*=ONTransform::rotate(ONTransform::Rotation::rotateScaledAxis(scaledRotationAxis));
	deltaT*=ONTransform::translateToOriginFrom(pos);
	
	/* Update the virtual input device's transformation: */
	deltaT*=transformedDevice->getTransformation();
	deltaT.renormalize();
	transformedDevice->setTransformation(deltaT);
		
	requestUpdate();
	}
开发者ID:jrevote,项目名称:3DA-Vrui,代码行数:32,代码来源:DesktopDeviceTool.cpp


示例12: requestUpdate

// Multiple calls to showInstance("inspect_avatar", foo) will provide different
// LLSD for foo, which we will catch here.
//virtual
void LLInspectAvatar::onOpen(const LLSD& data)
{
	// Start open animation
	LLInspect::onOpen(data);

	// Extract appropriate avatar id
	mAvatarID = data["avatar_id"];

	BOOL self = mAvatarID == gAgent.getID();
	
	getChild<LLUICtrl>("gear_self_btn")->setVisible(self);
	getChild<LLUICtrl>("gear_btn")->setVisible(!self);

	// Position the inspector relative to the mouse cursor
	// Similar to how tooltips are positioned
	// See LLToolTipMgr::createToolTip
	if (data.has("pos"))
	{
		LLUI::positionViewNearMouse(this, data["pos"]["x"].asInteger(), data["pos"]["y"].asInteger());
	}
	else
	{
		LLUI::positionViewNearMouse(this);
	}

	// can't call from constructor as widgets are not built yet
	requestUpdate();

	updateVolumeSlider();

	updateModeratorPanel();
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:35,代码来源:llinspectavatar.cpp


示例13: QWidget

UAVObjectBrowserWidget::UAVObjectBrowserWidget(QWidget *parent) : QWidget(parent)
{
    m_browser     = new Ui_UAVObjectBrowser();
    m_viewoptions = new Ui_viewoptions();
    m_viewoptionsDialog = new QDialog(this);
    m_viewoptions->setupUi(m_viewoptionsDialog);
    m_browser->setupUi(this);
    m_model = new UAVObjectTreeModel();
    m_browser->treeView->setModel(m_model);
    m_browser->treeView->setColumnWidth(0, 300);
    // m_browser->treeView->expandAll();
    BrowserItemDelegate *m_delegate = new BrowserItemDelegate();
    m_browser->treeView->setItemDelegate(m_delegate);
    m_browser->treeView->setEditTriggers(QAbstractItemView::AllEditTriggers);
    m_browser->treeView->setSelectionBehavior(QAbstractItemView::SelectItems);
    showMetaData(m_viewoptions->cbMetaData->isChecked());
    connect(m_browser->treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), this, SLOT(currentChanged(QModelIndex, QModelIndex)), Qt::UniqueConnection);
    connect(m_viewoptions->cbMetaData, SIGNAL(toggled(bool)), this, SLOT(showMetaData(bool)));
    connect(m_viewoptions->cbCategorized, SIGNAL(toggled(bool)), this, SLOT(categorize(bool)));
    connect(m_browser->saveSDButton, SIGNAL(clicked()), this, SLOT(saveObject()));
    connect(m_browser->readSDButton, SIGNAL(clicked()), this, SLOT(loadObject()));
    connect(m_browser->eraseSDButton, SIGNAL(clicked()), this, SLOT(eraseObject()));
    connect(m_browser->sendButton, SIGNAL(clicked()), this, SLOT(sendUpdate()));
    connect(m_browser->requestButton, SIGNAL(clicked()), this, SLOT(requestUpdate()));
    connect(m_browser->tbView, SIGNAL(clicked()), this, SLOT(viewSlot()));
    connect(m_viewoptions->cbScientific, SIGNAL(toggled(bool)), this, SLOT(useScientificNotation(bool)));
    connect(m_viewoptions->cbScientific, SIGNAL(toggled(bool)), this, SLOT(viewOptionsChangedSlot()));
    connect(m_viewoptions->cbMetaData, SIGNAL(toggled(bool)), this, SLOT(viewOptionsChangedSlot()));
    connect(m_viewoptions->cbCategorized, SIGNAL(toggled(bool)), this, SLOT(viewOptionsChangedSlot()));
    enableSendRequest(false);
}
开发者ID:GennadyKharlam,项目名称:OpenPilot,代码行数:31,代码来源:uavobjectbrowserwidget.cpp


示例14: HighlightRuleManager

void CoreHighlightSettingsPage::save()
{
    if (!hasChanged())
        return;

    if (!_initialized)
        return;

    auto ruleManager = Client::highlightRuleManager();
    if (ruleManager == nullptr)
        return;

    auto clonedManager = HighlightRuleManager();
    clonedManager.fromVariantMap(ruleManager->toVariantMap());
    clonedManager.clear();

    for (auto &rule : highlightList) {
        clonedManager.addHighlightRule(rule.id, rule.name, rule.isRegEx, rule.isCaseSensitive, rule.isEnabled, false,
                                       rule.sender, rule.chanName);
    }

    for (auto &rule : ignoredList) {
        clonedManager.addHighlightRule(rule.id, rule.name, rule.isRegEx, rule.isCaseSensitive, rule.isEnabled, true,
                                       rule.sender, rule.chanName);
    }

    auto highlightNickType = ui.highlightNicksComboBox->itemData(ui.highlightNicksComboBox->currentIndex()).value<int>();

    clonedManager.setHighlightNick(HighlightRuleManager::HighlightNickType(highlightNickType));
    clonedManager.setNicksCaseSensitive(ui.nicksCaseSensitive->isChecked());

    ruleManager->requestUpdate(clonedManager.toVariantMap());
    setChangedState(false);
    load();
}
开发者ID:Sput42,项目名称:quassel,代码行数:35,代码来源:corehighlightsettingspage.cpp


示例15: memoChanged

//slot of the update button click envent
void EvaDetailsWindow::slotUpdateClick()
{
	if(!frd) return;
	if( m_IsMemoPage ){		//if the user is in Memo page and the id is set
		//if the auto uplad checkbutton selected
		m_Memo.name = codec->fromUnicode(leMemoName->text()).data();
		m_Memo.mobile = codec->fromUnicode(leMemoMobile->text()).data();
		m_Memo.telephone = codec->fromUnicode(leMemoTelephone->text()).data();
		m_Memo.address = codec->fromUnicode(leMemoAddress->text()).data();
		m_Memo.email = codec->fromUnicode(leMemoEmail->text()).data();
		m_Memo.zipcode = codec->fromUnicode(leMemoZipCode->text()).data();
		m_Memo.note = codec->fromUnicode(teMemoNote->text()).data();
		if(chbAutoUploadMemo->isChecked()){
			emit memoChanged(frd->getQQ(), m_Memo);
			emit requestUploadMemo(frd->getQQ(), m_Memo);
		}
		else{
			//save memo to local file
			
			emit memoChanged(frd->getQQ(), m_Memo);
			QMessageBox::information(this, i18n( "Store Memo"), i18n( "Store memo successfully"));
		}	
		
	}
	else{
		emit requestUpdate(id);
	}
}
开发者ID:evareborn,项目名称:eva-nirvana,代码行数:29,代码来源:evadetailswindow.cpp


示例16: requestUpdate

	void TwitterPage::recvdAuth (const QString& token, const QString& tokenSecret)
	{
		Settings_->setValue ("token", token);
		Settings_->setValue ("tokenSecret", tokenSecret);
		requestUpdate ();
		TwitterTimer_->start ();
	}
开发者ID:SboichakovDmitriy,项目名称:leechcraft,代码行数:7,代码来源:twitterpage.cpp


示例17: requestUpdate

 void Node::resetToInitialState()
 {
   mPosition = mInitialPosition;
   mOrientation = mInitialOrientation;
   mScale = mInitialScale;
   requestUpdate();
 }
开发者ID:bhautikj,项目名称:MeshFu,代码行数:7,代码来源:MeshFuNode.cpp


示例18: canvas

void RectTool::onHandleMoved(const QPointF &pos, int handleFlags)
{
	if (d->selectedLayerInfos.size() != 1)
		return;
	
	auto rectLayer = d->selectedLayerInfos.at(0).rectLayer;
	
	if (!rectLayer)
		return;
	
	QPointSet keys;
	
	auto rect = rectLayer->rect();
	keys |= d->rectKeysWithHandleMargin(rect);
	
	auto scenePos = pos * canvas()->transforms()->windowToScene;
	
	double left = rect.left();
	double right = rect.right();
	double top = rect.top();
	double bottom = rect.bottom();
	
	if (handleFlags & Left)
		left = scenePos.x();
	
	if (handleFlags & Right)
		right = scenePos.x();
	
	if (handleFlags & Top)
		top = scenePos.y();
	
	if (handleFlags & Bottom)
		bottom = scenePos.y();
	
	if (right < left)
	{
		std::swap(left, right);
		
		for (RectHandleItem *handle : d->handles)
			handle->invertHandleFlagsLeftRight();
	}
	
	if (bottom < top)
	{
		std::swap(top, bottom);
		
		for (RectHandleItem *handle : d->handles)
			handle->invertHandleFlagsTopBottom();
	}
	
	rect.setCoords(left, top, right, bottom);
	keys |= d->rectKeysWithHandleMargin(rect);
	
	rectLayer->setRect(rect);
	
	emit requestUpdate(keys);
	
	updateGraphicsItems();
}
开发者ID:h2so5,项目名称:PaintField,代码行数:59,代码来源:recttool.cpp


示例19: requestUpdate

/**
  * Provides a rotation compensated roll of the device, based on the latest update retrieved from the accelerometer.
  *
  * @return The roll of the device, in radians.
  *
  * @code
  * accelerometer.getRollRadians();
  * @endcode
  */
float MicroBitAccelerometer::getRollRadians()
{
    requestUpdate();
    if (!(status & MICROBIT_ACCELEROMETER_IMU_DATA_VALID))
        recalculatePitchRoll();

    return roll;
}
开发者ID:martinwork,项目名称:microbit-dal,代码行数:17,代码来源:MicroBitAccelerometer.cpp


示例20: requestUpdate

/******************************************************************************
* Handles notification events generated by the selected object nodes.
******************************************************************************/
void ModificationListModel::onNodeEvent(RefTarget* source, ReferenceEvent* event)
{
	// Update the entire modification list if the ObjectNode has been assigned a new
	// data object, or if the list of display objects has changed.
	if(event->type() == ReferenceEvent::ReferenceChanged || event->type() == ReferenceEvent::ReferenceAdded || event->type() == ReferenceEvent::ReferenceRemoved) {
		requestUpdate();
	}
}
开发者ID:bitzhuwei,项目名称:OVITO_sureface,代码行数:11,代码来源:ModificationListModel.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ request_destroy函数代码示例发布时间:2022-05-30
下一篇:
C++ requestTransaction函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap