本文整理汇总了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);
}
}
示例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();
}
示例3: requestUpdate
void DatapickerImage::setPlotImageType(const DatapickerImage::PlotImageType type) {
d->plotImageType = type;
if (d->plotImageType == DatapickerImage::ProcessedImage)
d->discretize();
emit requestUpdate();
}
示例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();
}
示例5: requestUpdate
void MotionPlayerClient::updateMotion(motionfile::Motion motion)
{
if(motion.frames.size() < 1)
return;
requestUpdate(motion, TYPE_UPDATE_MOTION);
}
示例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);
}
}
}
}
示例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());
}
示例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;
}
示例9: Vector_each
void Widget::deleteChildren() {
Vector_each(Widget*,it,mChildren)
delete (*it);
mChildren.clear();
requestUpdate();
requestRepaint();
}
示例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);
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}
示例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);
}
}