这篇教程C++ Changed函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中Changed函数的典型用法代码示例。如果您正苦于以下问题:C++ Changed函数的具体用法?C++ Changed怎么用?C++ Changed使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了Changed函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: QDialogCLayoutWizard::CLayoutWizard(QWidget *parent) : QDialog(parent,Qt::Sheet), ui(new Ui::CLayoutWizard){ ui->setupUi(this); setWindowModality(Qt::WindowModal); setVisible(false); TitleElement.SetFont(QFont("Times New Roman",24)); SubtitleElement.SetFont(QFont("Times New Roman",18)); ComposerElement.SetFont(QFont("Times New Roman",12)); NamesElement.SetFont(QFont("Times New Roman",8)); connect(ui->topMargin,SIGNAL(Changed()),this,SLOT(UpdateMargins())); connect(ui->leftMargin,SIGNAL(Changed()),this,SLOT(UpdateMargins())); connect(ui->rightMargin,SIGNAL(Changed()),this,SLOT(UpdateMargins())); connect(ui->bottomMargin,SIGNAL(Changed()),this,SLOT(UpdateMargins())); connect(ui->tabWidget,SIGNAL(currentChanged(int)),this,SLOT(UpdateMargins())); connect(ui->NoteSpace,SIGNAL(valueChanged(int)),this,SLOT(SpacingTooltip(int))); ui->graphicsView->setScene(&S); Printer=new QPrinter(); pageSetupButton=new QToolButton(ui->graphicsView); pageSetupButton->setProperty("transparent",true); pageSetupButton->setIcon(QIcon(":/preferences.png")); pageSetupButton->setIconSize(QSize(32,32)); pageSetupButton->setFixedSize(QSize(36,36)); connect(pageSetupButton,SIGNAL(clicked()),this,SLOT(ShowPageSetup())); UpdateMargins();}
开发者ID:vemod-,项目名称:ObjectComposerXML,代码行数:27,
示例2: MouseMove void MouseMove(IInputProvider* pprovider, const Point& point, bool bCaptured, bool bInside) { if (bCaptured) { ZAssert(m_bDragging && m_bCanDrag); float fScale = (m_xMax - m_xMin)/m_rectMap.XSize(); float fDeltaX = fScale * (m_pointLastDrag.X() - point.X()); float fDeltaY = fScale * (m_pointLastDrag.Y() - point.Y()); // make sure we don't drag the map off of the screen m_xDrag = max(min((m_xClusterMax - m_xClusterMin) - (m_xMax - m_xMin), m_xDrag + fDeltaX), 0); m_yDrag = max(min((m_yClusterMax - m_yClusterMin) - (m_yMax - m_yMin), m_yDrag + fDeltaY), 0); m_pointLastDrag = point; GetWindow()->SetCursor(AWF_CURSOR_DRAG); Changed(); } else { if (m_bCanDrag) { GetWindow()->SetCursor(AWF_CURSOR_DRAG); } else { GetWindow()->SetCursor(AWF_CURSOR_DEFAULT); } } Changed(); }
开发者ID:borgified,项目名称:Allegiance,代码行数:34,
示例3: disconnectvoid ResourceWizard::on_StartStringBuilder_clicked(){ disconnect(StringBuilder,SIGNAL(Changed(QString)),this,SLOT(SetRandomStringEdit(QString))); connect(StringBuilder,SIGNAL(Changed(QString)),this,SLOT(SetRandomStringEdit(QString))); StringBuilder->Show(ui->RandomStringValue->text()); disconnect(StringBuilder,SIGNAL(Changed(QString)),this,SLOT(SetRandomStringEdit(QString)));}
开发者ID:bablosoft,项目名称:BAS,代码行数:8,
示例4: QMainWindowMainWindow::MainWindow(Scene *scene, QWidget *parent) : QMainWindow(parent), ui_(new Ui::MainWindow), scene_(scene){ ui_->setupUi(this); gl_widget_ = new GLWidget(scene_); ui_->opengl_box->layout()->addWidget(gl_widget_); // connect(gl_widget_,SIGNAL(Changed()),this,SLOT(SceneChanged())); outer_view_widget_ = new OuterViewWidget(scene_); ui_->outerview_box->layout()->addWidget(outer_view_widget_); connect(outer_view_widget_,SIGNAL(Changed()),this,SLOT(SceneChanged())); ray_tracing_widget_ = new RayTracingWidget(scene_); ui_->raytracing_box->layout()->addWidget(ray_tracing_widget_); connect(ray_tracing_widget_,SIGNAL(Changed()),this,SLOT(SceneChanged())); connect(ui_->recursion_spinBox,SIGNAL(valueChanged(int)),ray_tracing_widget_,SLOT(RayTracingLevel(int))); const int default_fov_slider = ((100*(kDefaultFov-kMinFov))/(kMaxFov-kMinFov)); ui_->fov_slider->setValue(default_fov_slider); const int default_near_slider = ((100*(kDefaultNear-kMinNear))/(kMaxNear-kMinNear)); ui_->near_slider->setValue(default_near_slider); const int default_far_slider = ((100*(kDefaultFar-kMinFar))/(kMaxFar-kMinFar)); ui_->far_slider->setValue(default_far_slider); connect(ui_->fov_slider,SIGNAL(valueChanged(int)),this,SLOT(SetFov(int))); connect(ui_->near_slider,SIGNAL(valueChanged(int)),this,SLOT(SetNear(int))); connect(ui_->far_slider,SIGNAL(valueChanged(int)),this,SLOT(SetFar(int))); connect(ui_->light_check,SIGNAL(toggled(bool)),this,SLOT(SetLight(bool))); connect(ui_->track_ray_check,SIGNAL(toggled(bool)),this,SLOT(SetTrackRay(bool))); SetTrackRay(ui_->track_ray_check->isChecked()); connect(ui_->fast_render_check,SIGNAL(toggled(bool)),ray_tracing_widget_,SLOT(ToggleFastRenderOnly(bool))); ray_tracing_widget_->ToggleFastRenderOnly(ui_->fast_render_check->isChecked()); // connect(ui_->image_size_comboBox,SIGNAL(currentIndexChanged(int)),ray_tracing_widget_,SLOT(SelectImageSize(int))); // ray_tracing_widget_->SelectImageSize(ui_->image_size_comboBox->currentIndex()); connect(ui_->scene_comboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(LoadScene(int))); // connect(ui_->load1_pushButton,SIGNAL(clicked()),this,SLOT(LoadScene1())); // connect(ui_->load2_pushButton_2,SIGNAL(clicked()),this,SLOT(LoadScene2())); // connect(gl_widget_,SIGNAL(Moving(bool)),ray_tracing_widget_,SLOT(SetMoving(bool))); connect(gl_widget_,SIGNAL(MouseMoved(QMouseEvent*)),ray_tracing_widget_,SLOT(MouseMoved(QMouseEvent*))); connect(gl_widget_,SIGNAL(MousePressed(QMouseEvent*)),ray_tracing_widget_,SLOT(MousePressed(QMouseEvent*))); connect(gl_widget_,SIGNAL(MouseReleased(QMouseEvent*)),ray_tracing_widget_,SLOT(MouseReleased(QMouseEvent*))); connect(gl_widget_,SIGNAL(Wheel(QWheelEvent*)),ray_tracing_widget_,SLOT(Wheel(QWheelEvent*))); connect(ui_->render_button,SIGNAL(clicked()),this,SLOT(FinalRender())); SceneChanged();}
开发者ID:QtOpenGL,项目名称:bustamanprojects,代码行数:53,
示例5: Guardvoid TConfiguration::Default(){ TGuard Guard(FCriticalSection); FDisablePasswordStoring = false; FForceBanners = false; FDisableAcceptingHostKeys = false; std::unique_ptr<TRegistryStorage> AdminStorage(new TRegistryStorage(GetRegistryStorageKey(), HKEY_LOCAL_MACHINE)); try__finally { if (AdminStorage->OpenRootKey(false)) { LoadAdmin(AdminStorage.get()); AdminStorage->CloseSubKey(); } } __finally {// delete AdminStorage; }; SetRandomSeedFile(FDefaultRandomSeedFile); SetPuttyRegistryStorageKey(OriginalPuttyRegistryStorageKey); FConfirmOverwriting = true; FConfirmResume = true; FAutoReadDirectoryAfterOp = true; FSessionReopenAuto = 5000; FSessionReopenBackground = 2000; FSessionReopenTimeout = 0; FSessionReopenAutoStall = 60000; FTunnelLocalPortNumberLow = 50000; FTunnelLocalPortNumberHigh = 50099; FCacheDirectoryChangesMaxSize = 100; FShowFtpWelcomeMessage = false; FExternalIpAddress.Clear(); FTryFtpWhenSshFails = true; SetCollectUsage(FDefaultCollectUsage); FSessionReopenAutoMaximumNumberOfRetries = CONST_DEFAULT_NUMBER_OF_RETRIES; FDefaultCollectUsage = false; FLogging = false; FPermanentLogging = false; FLogFileName = GetDefaultLogFileName(); FPermanentLogFileName = FLogFileName; FLogFileAppend = true; FLogSensitive = false; FPermanentLogSensitive = FLogSensitive; FLogWindowLines = 100; FLogProtocol = 0; FPermanentLogProtocol = FLogProtocol; UpdateActualLogProtocol(); FLogActions = false; FPermanentLogActions = false; FActionsLogFileName = "%TEMP%" WGOOD_SLASH "&S.xml"; FPermanentActionsLogFileName = FActionsLogFileName; FProgramIniPathWrittable = -1; Changed();}
开发者ID:elfmz,项目名称:far2l,代码行数:60,
示例6: CudaSafeCallvoid TransferFunction::onColorTFChanged(){ //std::cout<<"Color changed"<<std::endl; if(compositeTex) { CudaSafeCall(cudaDestroyTextureObject(compositeTex)); compositeTex = 0; } colorTF->GetTable(0.0, 1.0, TABLE_SIZE, colorTable); size_t j = 0, k = 0; for(size_t i = 0; i < TABLE_SIZE; ++i) { compositeTable[j++] = colorTable[k++]; compositeTable[j++] = colorTable[k++]; compositeTable[j++] = colorTable[k++]; j++; } //CompositeTable(); CudaSafeCall(cudaMemcpyToArray(array, 0, 0, compositeTable, sizeof(float) * TABLE_SIZE * 4, cudaMemcpyHostToDevice)); CudaSafeCall(cudaCreateTextureObject(&compositeTex, &resourceDesc, &texDesc, NULL)); Changed();}
开发者ID:sunwj,项目名称:SunVRVR,代码行数:25,
示例7: blockSignalsQTransferFunction& QTransferFunction::operator = (const QTransferFunction& Other) { QPresetXML::operator=(Other); blockSignals(true); m_Nodes = Other.m_Nodes; m_pSelectedNode = Other.m_pSelectedNode; // Notify us when the nodes change for (int i = 0; i < m_Nodes.size(); i++) connect(&m_Nodes[i], SIGNAL(NodeChanged(QNode*)), this, SLOT(OnNodeChanged(QNode*))); m_DensityScale = Other.m_DensityScale; m_ShadingType = Other.m_ShadingType; m_GradientFactor = Other.m_GradientFactor; // Update node's range UpdateNodeRanges(); blockSignals(false); // Notify others that the function has changed selection has changed emit Changed(); SetSelectedNode(NULL); return *this;}
开发者ID:ChuckDanglars,项目名称:exposure-render.release110,代码行数:29,
示例8: disconnectvoid QTransferFunction::RemoveNode(QNode* pNode){ if (!pNode) return; // Remove the connection disconnect(pNode, SIGNAL(NodeChanged(QNode*)), this, SLOT(OnNodeChanged(QNode*))); // Node index of the to be removed node int NodeIndex = m_Nodes.indexOf(*pNode); // Remove from list and memory m_Nodes.remove(*pNode); // Update ID's for (int i = 0; i < m_Nodes.size(); i++) m_Nodes[i].m_ID = i; // Update node's range UpdateNodeRanges(); // Select the previous node NodeIndex = qMax(0, NodeIndex - 1); SetSelectedNode(NodeIndex); // Inform others that the transfer function has changed emit Changed(); Log("Removed node", "layer-select-point");}
开发者ID:ChuckDanglars,项目名称:exposure-render.release110,代码行数:31,
示例9: ifbool nuiTreeBase::SetChild(uint32 Index, nuiTreePtr pChild){ pChild->Acquire(); if (mpChildren.size() < Index+1) mpChildren.resize(Index+1); if (mpChildren[Index]) mpChildren[Index]->Release(); else if (mpChildren[Index]) { mTreeNodeEventSink.DisconnectSource(mpChildren[Index]->Changed); mpChildren[Index]->SetParent(NULL); } mpChildren[Index] = pChild; mTreeNodeEventSink.Connect(pChild->Changed, &nuiTreeBase::OnChildChanged, pChild); mTreeNodeEventSink.Connect(pChild->ChildAdded, &nuiTreeBase::OnChildAdded, pChild); mTreeNodeEventSink.Connect(pChild->ChildDeleted, &nuiTreeBase::OnChildRemoved, pChild); mTreeNodeEventSink.Connect(pChild->Deleted, &nuiTreeBase::OnChildDeleted, pChild); pChild->SetParent(this); AutoSort(); Changed(); ChildAdded(this, pChild); return true;}
开发者ID:YetToCome,项目名称:nui3,代码行数:25,
示例10: AddChildbool nuiTreeBase::InsertChild(uint32 Index, nuiTreePtr pChild){ if (mpAutoSort) return AddChild(pChild); if (mpChildren.size() < Index+1) mpChildren.resize(Index+1); std::vector<nuiTreePtr>::iterator it = mpChildren.begin(); it+=Index; if (it == mpChildren.end()) { mpChildren.resize(mpChildren.size() - 1); return false; } mpChildren.insert(it, pChild); pChild->Acquire(); mTreeNodeEventSink.Connect(pChild->Changed, &nuiTreeBase::OnChildChanged, pChild); mTreeNodeEventSink.Connect(pChild->ChildAdded, &nuiTreeBase::OnChildAdded, pChild); mTreeNodeEventSink.Connect(pChild->ChildDeleted, &nuiTreeBase::OnChildRemoved, pChild); mTreeNodeEventSink.Connect(pChild->Deleted, &nuiTreeBase::OnChildDeleted, pChild); pChild->SetParent(this); AutoSort(); Changed(); ChildAdded(this, pChild); return true;}
开发者ID:YetToCome,项目名称:nui3,代码行数:28,
示例11: PrivateSortFunctionbool nuiTreeBase::AddChild(nuiTreePtr pChild){ pChild->Acquire(); if (!mpAutoSort) { mpChildren.push_back(pChild); } else { // Sorted insert: std::vector<nuiTreePtr>::iterator it = std::upper_bound(mpChildren.begin(), mpChildren.end(), pChild, PrivateSortFunction(mpAutoSort)); mpChildren.insert(it, pChild); } mTreeNodeEventSink.Connect(pChild->Changed, &nuiTreeBase::OnChildChanged, pChild); mTreeNodeEventSink.Connect(pChild->ChildAdded, &nuiTreeBase::OnChildAdded, pChild); mTreeNodeEventSink.Connect(pChild->ChildDeleted, &nuiTreeBase::OnChildRemoved, pChild); mTreeNodeEventSink.Connect(pChild->Deleted, &nuiTreeBase::OnChildDeleted, pChild); pChild->SetParent(this); Changed(); ChildAdded(this, pChild); return false;}
开发者ID:YetToCome,项目名称:nui3,代码行数:25,
示例12: ChildDeletedbool nuiTreeBase::Clear(bool erase){ for (uint32 i = 0; i < mpChildren.size(); i++) { nuiTreeBase* pChild = mpChildren[i]; ChildDeleted(this, pChild); } if (erase) { std::vector<nuiTreePtr>::iterator it = mpChildren.begin(); for (; it != mpChildren.end();) { nuiTreeBase* pChild = (*it); it = mpChildren.erase(it); pChild->Release(); } } else { for (uint32 i = 0; i < mpChildren.size(); i++) { mpChildren[i]->SetParent(NULL); mTreeNodeEventSink.DisconnectSource(mpChildren[i]->Changed); mTreeNodeEventSink.DisconnectSource(mpChildren[i]->ChildAdded); mTreeNodeEventSink.DisconnectSource(mpChildren[i]->ChildDeleted); mTreeNodeEventSink.DisconnectSource(mpChildren[i]->Deleted); } } mpChildren.clear(); Changed(); return true;}
开发者ID:YetToCome,项目名称:nui3,代码行数:32,
示例13: Changedvoid nuiBorderDecoration::SetStrokeBottomColor(const nuiColor& color){ mStrokeBottomColor = color; mUseStrokeBottomColor = true; mUseStrokeGlobalColor = false; Changed();}
开发者ID:JamesLinus,项目名称:nui3,代码行数:7,
示例14: assertvoid EntityRef::onEntitySeen(Entity* e){ assert(e); m_inner = e; m_inner->BeingDeleted.connect(sigc::mem_fun(this, &EntityRef::onEntityDeleted)); Changed();}
开发者ID:worldforge,项目名称:eris,代码行数:7,
示例15: Changed////////////////////////////////////////////////////////////// Tone change///////////////////////////////////////////////////////////void Bitmap::ToneChange(Tone tone) { if (tone.red == 0 && tone.green == 0 && tone.blue == 0 && tone.gray == 0) return; Uint8* dst_pixels = (Uint8*)&pixels[0]; if (tone.gray == 0) { for (int i = 0; i < GetHeight(); i++) { for (int j = 0; j < GetWidth(); j++) { Uint8* pixel = dst_pixels; pixel[0] = (Uint8)max(min(pixel[0] + tone.red, 255), 0); pixel[1] = (Uint8)max(min(pixel[1] + tone.green, 255), 0); pixel[2] = (Uint8)max(min(pixel[2] + tone.blue, 255), 0); dst_pixels += 4; } } } else { double factor = (255 - tone.gray) / 255.0; double gray; for (int i = 0; i < GetHeight(); i++) { for (int j = 0; j < GetWidth(); j++) { Uint8* pixel = dst_pixels; gray = pixel[0] * 0.299 + pixel[1] * 0.587 + pixel[2] * 0.114; pixel[0] = (Uint8)max(min((pixel[0] - gray) * factor + gray + tone.red + 0.5, 255), 0); pixel[1] = (Uint8)max(min((pixel[1] - gray) * factor + gray + tone.green + 0.5, 255), 0); pixel[2] = (Uint8)max(min((pixel[2] - gray) * factor + gray + tone.blue + 0.5, 255), 0); dst_pixels += 4; } } } Changed();}
开发者ID:cstrahan,项目名称:argss,代码行数:36,
示例16: ifvoid SearchTermWidget::OpChanged(int index) { // Determine the currently selected operator SearchTerm::Operator op = static_cast<SearchTerm::Operator>( // This uses the operators’s index in the combobox to get its enum value ui_->op->itemData(ui_->op->currentIndex()).toInt() ); // We need to change the page only in the following case if ((ui_->value_stack->currentWidget() == ui_->page_text) || (ui_->value_stack->currentWidget() == ui_->page_empty)) { QWidget* page = nullptr; if (op == SearchTerm::Op_Empty || op == SearchTerm::Op_NotEmpty) { page = ui_->page_empty; } else { page = ui_->page_text; } ui_->value_stack->setCurrentWidget(page); } else if ((ui_->value_stack->currentWidget() == ui_->page_date) || (ui_->value_stack->currentWidget() == ui_->page_date_numeric) || (ui_->value_stack->currentWidget() == ui_->page_date_relative)) { QWidget* page = nullptr; if (op == SearchTerm::Op_NumericDate || op == SearchTerm::Op_NumericDateNot) { page = ui_->page_date_numeric; } else if (op == SearchTerm::Op_RelativeDate) { page = ui_->page_date_relative; } else { page = ui_->page_date; } ui_->value_stack->setCurrentWidget(page); } emit Changed();}
开发者ID:Atrament666,项目名称:Clementine,代码行数:33,
示例17: MouseLeave virtual void MouseLeave(IInputProvider* pprovider) { if (!m_bDragging) GetWindow()->SetCursor(AWF_CURSOR_DEFAULT); Changed(); }
开发者ID:borgified,项目名称:Allegiance,代码行数:7,
示例18: QFrameCWaveLayers::CWaveLayers(QWidget *parent) : QFrame(parent), ui(new Ui::CWaveLayers){ ui->setupUi(this); connect(ui->VolSpin,SIGNAL(valueChanged(int)),this,SLOT(UpdateGraph())); connect(ui->TransposeSpin,SIGNAL(valueChanged(int)),this,SLOT(UpdateGraph())); connect(ui->TuneSpin,SIGNAL(valueChanged(int)),this,SLOT(UpdateGraph())); connect(ui->LowVelFullSpin,SIGNAL(valueChanged(int)),this,SLOT(UpdateGraph())); connect(ui->HighVelFullSpin,SIGNAL(valueChanged(int)),this,SLOT(UpdateGraph())); connect(ui->LowVelXSpin,SIGNAL(valueChanged(int)),this,SLOT(UpdateGraph())); connect(ui->HighVelXSpin,SIGNAL(valueChanged(int)),this,SLOT(UpdateGraph())); connect(ui->ADSRWidget,SIGNAL(Changed(CADSR::ADSRParams)),this,SLOT(UpdateADSRs(CADSR::ADSRParams))); connect(ui->LayersControl,SIGNAL(CurrentLayerChanged(CLayer::LayerParams)),this,SLOT(UpdateControls(CLayer::LayerParams))); connect(ui->LayersControl,SIGNAL(LayerIndexChanged(int)),this,SLOT(SelectLayer(int))); connect(ui->LayersControl,SIGNAL(Add(int,int)),this,SLOT(AddLayer(int,int))); //connect(ui->KeyLayoutControl,SIGNAL(ReleaseLoop()),this,SLOT(ReleaseLoop())); connect(ui->FixLayerButton,SIGNAL(clicked()),this,SLOT(FixLayer())); connect(ui->FixAllButton,SIGNAL(clicked()),this,SLOT(FixAll())); connect(ui->PitchLayerButton,SIGNAL(clicked()),this,SLOT(PitchLayer())); connect(ui->PitchAllButton,SIGNAL(clicked()),this,SLOT(PitchAll())); connect(ui->DeleteLayerButton,SIGNAL(clicked()),this,SLOT(DeleteLayer())); MD=false; Working=false; //Update();}
开发者ID:vemod-,项目名称:Object-Studio,代码行数:28,
示例19: QObjectDevice::Device(const QString &p, QObject *parent) : QObject(parent) , m_path(p) , m_type(Device::Undefined){#ifndef NO_DBUS m_deviceInterface = new UDisksDeviceInterface("org.freedesktop.UDisks", m_path, QDBusConnection::systemBus(), this); if (!m_deviceInterface->isValid()) { m_valid = false; return; } m_valid = true; m_isPartition = m_deviceInterface->DeviceIsPartition(); m_mountPoint = m_deviceInterface->DeviceMountPath(); m_label = m_deviceInterface->IdLabel(); m_uuid = m_deviceInterface->IdUuid(); m_type = Device::UsbDrive; connect(m_deviceInterface, SIGNAL(Changed()), this, SLOT(deviceChanged()));#else // no implementation yet, so not valid m_valid = false; m_isPartition = false;#endif emit changed();}
开发者ID:dmore,项目名称:sasquatch,代码行数:27,
示例20: qSortvoid QTransferFunction::AddNode(const QNode& Node){ // Add the node to the list m_Nodes.append(Node); // Cache node QNode& CacheNode = m_Nodes.back(); // Sort the transfer function nodes based on intensity qSort(m_Nodes.begin(), m_Nodes.end(), CompareNodes); // Update ID's for (int i = 0; i < m_Nodes.size(); i++) m_Nodes[i].m_ID = i; // Update ranges UpdateNodeRanges(); // Notify us when the node changes connect(&CacheNode, SIGNAL(NodeChanged(QNode*)), this, SLOT(OnNodeChanged(QNode*))); for (int i = 0; i < m_Nodes.size(); i++) { if (Node.GetIntensity() == m_Nodes[i].GetIntensity()) SetSelectedNode(&m_Nodes[i]); } // Inform others that the transfer function has changed emit Changed(); if (!signalsBlocked()) Log("Inserted node", "layer-select-point");}
开发者ID:ChuckDanglars,项目名称:exposure-render.release110,代码行数:33,
示例21: Changedbool Category::Rename(const Category &from, const Category &to){ if (from._names.size() != to._names.size()) { return false; } unsigned num = from._names.size () < _names.size() ? from._names.size() : _names.size(); bool changed = false; for (int i=0; i<num; i++) { if (_names[i] != from._names[i]) { break; } if (_names[i] != to._names[i]) { _names[i] = to._names[i]; changed = true; } } if (changed) { emit Changed(); } return changed;}
开发者ID:BtbN,项目名称:crimson-core,代码行数:29,
示例22: SetString void SetString(int row, int column, const ZString& str) { if (m_vvstr.Get(row).Get(column) != str) { m_vvstr.Get(row).Set(column, str); Changed(); } }
开发者ID:borgified,项目名称:Allegiance,代码行数:7,
示例23: QDBusInterfacebool UPower::connectInterfaces() { if(m_interface==0 || !m_interface->isValid()) { m_interface = new QDBusInterface("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.UPower", QDBusConnection::systemBus()); if(!m_interface->isValid()) { m_interface->deleteLater(); m_interface = 0; if (m_interfaceProps) m_interfaceProps->deleteLater(); m_interfaceProps = 0; return false; } connect(m_interface, SIGNAL(DeviceAdded(QString)), this, SLOT(deviceAdded(QString))); connect(m_interface, SIGNAL(DeviceRemoved(QString)), this, SIGNAL(batteryDisconnected(QString))); connect(m_interface, SIGNAL(Changed()), this, SLOT(changed())); } if(m_interfaceProps==0 || !m_interfaceProps->isValid()) { m_interfaceProps = new QDBusInterface("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.DBus.Properties", QDBusConnection::systemBus()); if(!m_interfaceProps->isValid()) { if (m_interface) m_interface->deleteLater(); m_interface = 0; m_interfaceProps->deleteLater(); m_interfaceProps = 0; return false; } } emit upowerAvailable(); return true;}
开发者ID:grimtraveller,项目名称:netbas,代码行数:35,
示例24: SetColor void SetColor(int row, const Color& color) { if (m_vcolor.Get(row) != color) { m_vcolor.Set(row, color); Changed(); } }
开发者ID:borgified,项目名称:Allegiance,代码行数:7,
示例25: MoveEnd void MoveEnd() { m_timeStart = GetTime()->GetValue(); m_bGotoStart = false; m_bStationary = false; Changed(); }
开发者ID:kgersen,项目名称:Allegiance,代码行数:7,
示例26: memcpy////////////////////////////////////////////////////////////// Copy///////////////////////////////////////////////////////////void Bitmap::Copy(int x, int y, Bitmap* src_bitmap, Rect src_rect) { if (src_bitmap->GetWidth() == 0 || src_bitmap->GetHeight() == 0 || width == 0 || height == 0) return; if (x >= width || y >= height) return; if (x < 0) { src_rect.x -= x; x = 0; } if (y < 0) { src_rect.y -= y; y = 0; } src_rect.Adjust(src_bitmap->GetWidth(), src_bitmap->GetHeight()); if (src_rect.IsOutOfBounds(src_bitmap->GetWidth(), src_bitmap->GetHeight())) return; int src_width = src_rect.width; int src_height = src_rect.height; if (x + src_width > width) src_width = width - x; if (y + src_height > height) src_height = height - y; if (src_width <= 0 || src_height <= 0) return; int src_pitch = src_width * 4; int src_row = src_bitmap->GetWidth(); const Uint32* src_pixels = ((Uint32*)(&src_bitmap->pixels[0])) + src_rect.x + src_rect.y * src_bitmap->GetWidth(); Uint32* dst_pixels = ((Uint32*)(&pixels[0])) + x + y * width; for (int i = 0; i < src_height; ++i) { memcpy(dst_pixels, src_pixels, src_pitch); src_pixels += src_row; dst_pixels += width; } Changed();}
开发者ID:cstrahan,项目名称:argss,代码行数:38,
注:本文中的Changed函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ Channel函数代码示例 C++ ChangeWeapon函数代码示例 |