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


C++ requestUpdate函数代码示例

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


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


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