这篇教程C++ updateModel函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateModel函数的典型用法代码示例。如果您正苦于以下问题:C++ updateModel函数的具体用法?C++ updateModel怎么用?C++ updateModel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateModel函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: finishedvoid QueryUpdate::process(){ auto data = QueryClient::Get().Query(); if (QueryClient::Get().Status() != ID_MASTER_QUERY) { emit finished(); return; } for (const auto &server : data) emit updateModel(server.first.ToString(false), server.first.GetPort(), server.second); emit finished();}
开发者ID:GrimKriegor,项目名称:openmw-tes3mp,代码行数:13,
示例2: updateModelvoid CommentWindow::comment(){ if (g_umUserManager.Comment(m_mvModel.m_sVideoID, m_qteComment->toPlainText().toStdString()) == SUCCESS) { g_umUserManager.GetLastVideo(m_mvModel); emit updateModel(m_mvModel); m_qteComment->clear(); m_qmbMsg->setText("Comment Successfully"); m_qmbMsg->setWindowModality(Qt::WindowModal); m_qmbMsg->show(); connect(m_qmbMsg, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(toComment())); }
开发者ID:aaronguo1996,项目名称:posture,代码行数:13,
示例3: CACLIENTTEST_FUNC_ENTRY/*! Sets parent /param parentId */void CaItemModelPrivate::setParentId(int parentId){ CACLIENTTEST_FUNC_ENTRY("CaItemModelPrivate::setParentId"); mQuery.setParentId(parentId); if (mNotifier) { delete mNotifier; mNotifier = mService->createNotifier(CaNotifierFilter(mQuery)); reconnectSlots(); } updateModel(); CACLIENTTEST_FUNC_EXIT("CaItemModelPrivate::setParentId");}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:17,
示例4: updateModelvoid ToolKillZoneFrustum::setCenter(const Point& newCenter) { /* Transform the new center to screen coordinates: */ ONTransform screenT=screen->getScreenTransformation(); Point newBoxCenter=screenT.inverseTransform(newCenter); newBoxCenter[2]=Scalar(0); /* Move the box to the new center position: */ box.setOrigin(newBoxCenter-Vector(box.getSize())*Scalar(0.5)); /* Update the model: */ updateModel(); }
开发者ID:jrevote,项目名称:3DA-Vrui,代码行数:13,
示例5: updateModelvoid EventViewer::prevEvent(){ if (!matrixDataIsAvailable()) return; _EVENT evt; evt.Reset(); if (m_data->GetPrevEvent(evt)) { //treeView model update updateModel(evt); //update spectrogram data updatePlot(evt); }}
开发者ID:f-giorgi,项目名称:MTG,代码行数:14,
示例6: domainChangeint XC::HHTHybridSimulation::update(const XC::Vector &deltaU){ AnalysisModel *theModel = this->getAnalysisModelPtr(); if (theModel == 0) { std::cerr << "WARNING XC::HHTHybridSimulation::update() - no XC::AnalysisModel set/n"; return -1; } // check domainChanged() has been called, i.e. Ut will not be zero if (Ut.get().Size() == 0) { std::cerr << "WARNING XC::HHTHybridSimulation::update() - domainChange() failed or not called/n"; return -2; } // check deltaU is of correct size if (deltaU.Size() != U.get().Size()) { std::cerr << "WARNING XC::HHTHybridSimulation::update() - Vectors of incompatible size "; std::cerr << " expecting " << U.get().Size() << " obtained " << deltaU.Size() << std::endl; return -3; } // determine the displacement increment reduction factor rFact = 1.0/(theTest->getMaxNumTests() - theTest->getNumTests() + 1.0); // determine the response at t+deltaT (U.get()) += rFact*deltaU; U.getDot().addVector(1.0, deltaU, rFact*c2); U.getDotDot().addVector(1.0, deltaU, rFact*c3); // determine displacement and velocity at t+alpha*deltaT (Ualpha.get()) = Ut.get(); Ualpha.get().addVector((1.0-alphaF), U.get(), alphaF); (Ualpha.getDot()) = Ut.getDot(); Ualpha.get().addVector((1.0-alphaF), U.getDot(), alphaF); (Ualpha.getDotDot()) = Ut.getDotDot(); Ualpha.getDotDot().addVector((1.0-alphaI()), U.getDotDot(), alphaI()); // update the response at the DOFs theModel->setResponse(Ualpha.get(),Ualpha.getDot(),Ualpha.getDotDot()); if(updateModel() < 0) { std::cerr << "XC::HHTHybridSimulation::update() - failed to update the domain/n"; return -4; } return 0; }
开发者ID:lcpt,项目名称:xc,代码行数:50,
示例7: AbstractDataPluginEarthquakePlugin::EarthquakePlugin( const MarbleModel *marbleModel ) : AbstractDataPlugin( marbleModel ), m_ui( 0 ), m_configDialog( 0 ), m_minMagnitude( 0.0 ), m_startDate( QDateTime::fromString( "2006-02-04", "yyyy-MM-dd" ) ), m_endDate( marbleModel->clockDateTime() ), m_maximumNumberOfItems( 100 ){ setEnabled( true ); // Plugin is enabled by default setVisible( false ); // Plugin is invisible by default connect( this, SIGNAL(settingsChanged(QString)), this, SLOT(updateModel()) );}
开发者ID:Earthwings,项目名称:marble,代码行数:14,
示例8: emptyStats/*********************************************************************** * Character * updateEquip***********************************************************************/void fired::Character::updateEquip() { emptyStats(&equipStats); if (helm) helm = NULL; if (arms) arms = NULL; if (legs) legs = NULL; if (body) body = NULL; if (shoe) shoe = NULL; if (fist) fist = NULL; if (inventory->helm.base) { helm = container->armors[inventory->helm.base->UID]; equipStats.armor += helm->armor; } if (inventory->body.base) { body = container->armors[inventory->body.base->UID]; equipStats.armor += body->armor; } if (inventory->arms.base) { arms = container->armors[inventory->arms.base->UID]; equipStats.armor += arms->armor; } if (inventory->fist.base) { fist = container->armors[inventory->fist.base->UID]; equipStats.armor += fist->armor; } if (inventory->legs.base) { legs = container->armors[inventory->legs.base->UID]; equipStats.armor += legs->armor; } if (inventory->shoe.base) { shoe = container->armors[inventory->shoe.base->UID]; equipStats.armor += shoe->armor; } if (inventory->primaryWeapon.base) setWeapon(container->weapons[inventory->primaryWeapon.base->UID]); else setWeapon(base->weapon); if (inventory->primaryAmmo.base) ammo = container->ammos[inventory->primaryAmmo.base->UID]; else ammo = base->ammo; updateModel();}
开发者ID:MORTAL2000,项目名称:fired,代码行数:54,
示例9: cubemodelModelOptionChangestatic voidcubemodelModelOptionChange (CompScreen *s, CompOption *opt, CubemodelScreenOptions num){ CUBEMODEL_SCREEN (s); if (!cms->models || cms->numModels <= 0) { updateCubemodel (s); return; } updateModel (s, 0, cms->numModels);}
开发者ID:JakeSFR,项目名称:compiz-plugins-experimental,代码行数:15,
示例10: serverAvailableChangedvoid VariableModelManager::setServerAvailable(bool available){ m_serverAvailable = available; emit serverAvailableChanged(available); if (available){ m_timer.start(); updateModel(); } else{ m_timer.stop(); }}
开发者ID:think-free,项目名称:QtHelpers,代码行数:15,
示例11: whilevoid Graph::optimizeCommus(){ bool haschanged = true; while(haschanged){ haschanged = false; for(int v=0; v<numVertices; v++){ intset neighborcommus; for(edgemap::iterator e = vertices[v].edges.begin(); e != vertices[v].edges.end(); e++){ for(int i=0; i<commupervertex[e->first].size(); i++){ neighborcommus.insert(commupervertex[e->first][i]); } } for(int i=0; i<commupervertex[v].size(); i++){ neighborcommus.erase(commupervertex[v][i]); } for(int i=0; i<commupervertex[v].size(); i++){ if(testwithout(v,commupervertex[v][i])){ removeVertexCommunity(v,commupervertex[v][i]); if(testsig(commupervertex[v][i]) > sigthresh){ deleteCommunity(commupervertex[v][i]); } updateModel(); } } for(intset::iterator c = neighborcommus.begin(); c != neighborcommus.end(); c++){ if(testwith(v,*c)){ addVertexCommunity(v,*c); if(testsig(*c) > sigthresh){ removeVertexCommunity(v,*c); }else{ updateModel(); } } } } }}
开发者ID:VDalibard,项目名称:Project12,代码行数:36,
示例12: QGraphicsItemGroupLegendGroup::LegendGroup(const QPointF& Clicked, MarkerModel* model, QGraphicsItem* parent): QGraphicsItemGroup(parent), origin(Clicked), model(model){ mySize = 20; frame = new RectItem(QRectF()); frame->setBrush(QColor(255, 255, 255, 192)); setFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemSendsGeometryChanges); addToGroup(frame); auto s = Settings("LegendL"); myPenWidth = s.penWidth(); mySize = s.size(); myFont = s.font(); myFontSize = s.fontSize(); updateModel();}
开发者ID:lebenasa,项目名称:ImageRasterReboot,代码行数:15,
示例13: QTableViewLayerTableView::LayerTableView(QWidget *parent): QTableView(parent){ delegate = new LayerItemDelegate(); model = new LayerTableModel(); this->setContentsMargins(0, 0, 0, 0); this->setModel(model); this->setItemDelegate(delegate); this->setEditTriggers(QAbstractItemView::DoubleClicked); this->horizontalHeader()->setStretchLastSection(true); this->horizontalHeader()->setHighlightSections(false); this->setFrameShape(QFrame::NoFrame);#if defined(Q_OS_WIN)this->setColumnWidth(0, 20);#elif defined(Q_OS_MAC)this->setColumnWidth(0, 30);#endif this->setColumnWidth(1, 170); this->verticalHeader()->setVisible(false); this->horizontalHeader()->setVisible(false); this->setSelectionMode(QAbstractItemView::ExtendedSelection); this->setDefaultDropAction(Qt::MoveAction); this->setDragEnabled(true); this->setDragDropOverwriteMode(false); this->viewport()->setAcceptDrops(true); this->setDragDropMode(QAbstractItemView::InternalMove); this->setAcceptDrops(true); this->setDropIndicatorShown(true); this->setMouseTracking(true);//important connect(this->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), / this, SLOT(selectionChangedSlot(const QItemSelection&, const QItemSelection&))); //When click on the checkbox it will emit signal twice.Click on the cell emit only once. connect(this, SIGNAL(clicked(const QModelIndex&)), this, SLOT(itemClicked(const QModelIndex&))); LayerManager* pManager = LayerManager::getInstance(); connect(pManager, SIGNAL(updateModel()), this, SLOT(updateView())); contextMenu = new QMenu(this); this->createActions();}
开发者ID:Iownnoname,项目名称:qt,代码行数:48,
示例14: FMU2_LOGfmi2Status FMU2Wrapper::getString(const fmi2ValueReference vr[], size_t nvr, fmi2String value[]){ if (nvr > _string_buffer.size()) { FMU2_LOG(this, fmi2Error, logStatusError, "Attempt to get %d fmi2String; FMU only has %d", nvr, _string_buffer.size()); return fmi2Error; } if (_need_update) updateModel(); _model->getString(vr, nvr, &_string_buffer[0]); for (size_t i = 0; i < nvr; i++) value[i] = _string_buffer[i].c_str(); // convert to fmi2String return fmi2OK;}
开发者ID:gthorslund,项目名称:OMCompiler,代码行数:16,
示例15: QTreeViewInstrumentTree::InstrumentTree(QWidget* parent, MidiInstrument* i, bool popup) : QTreeView(parent){ m_instrument = i; m_popup = popup; _patchModel = new QStandardItemModel(0, 2, this); _patchSelModel = new QItemSelectionModel(_patchModel); setExpandsOnDoubleClick(true); setModel(_patchModel); connect(this, SIGNAL( doubleClicked(const QModelIndex&) ), this, SLOT(patchDoubleClicked(const QModelIndex&) ) ); connect(this, SIGNAL( clicked(const QModelIndex&) ), this, SLOT(patchClicked(const QModelIndex&) ) ); if(popup) { setWindowFlags(Qt::SplashScreen | Qt::WindowStaysOnTopHint); } updateModel();}
开发者ID:87maxi,项目名称:oom,代码行数:16,
示例16: CSVViewQObject *CSVFactory::create(const QString &mimeType, const QUrl &url, const QStringList &argumentNames, const QStringList &argumentValues) const{ if (mimeType != "text/csv") return 0; CSVView *view = new CSVView(argumentValues[argumentNames.indexOf("type")]); QNetworkRequest request(url); QNetworkReply *reply = manager->get(request); connect(reply, SIGNAL(finished()), view, SLOT(updateModel())); connect(reply, SIGNAL(finished()), reply, SLOT(deleteLater())); return view;}
开发者ID:yuyichao,项目名称:explore,代码行数:16,
示例17: QModelIndexQModelIndex CObjectInspectorTreeModel::index(int row, int column, const QModelIndex &parent) const{ if(!frootNode || row<0 || column<0 || column>=maxColumn || (parent.isValid() && parent.column()!=0)) return QModelIndex(); TreeNode * parentNode = nodeForIndex(parent); Q_ASSERT(parentNode); if(TreeNode * item = dynamic_cast<TreeNode*>(parentNode->childAt(row))) { QModelIndex createdIndex = createIndex(row,column,item); item->setModelIndex(createdIndex); connect(item,SIGNAL(updateModel(QModelIndex,QModelIndex)),this,SIGNAL(dataChanged(QModelIndex,QModelIndex))); return createdIndex; } return QModelIndex();}
开发者ID:Jinxiaohai,项目名称:QT,代码行数:16,
示例18: Controller/* * Function called from main block of code * Returns true (1) if sucessful, 0, if unsucessful */ int Controller() { // Robot will turn this angle in this timestep // DEFAULT = no change in current heading double angleOfTurn = 0; // INITIALIZE VALUES initialize(); // Checks for that remode control option is disabled if (rcDisabled) { return false; } // Set ERROR flag when updating values int ERROR = updateVar(); // Runs linear controller w/Control Law (calculates next step) linearAngle = linearController(); // Checks/updates computer model to see if robot is on // desired trajectory modelAngle = modelController(); //CURRENTLY SET FOR ALL SENSOR INPUT int c1 = 1; int c2 = 0; if (ERROR == true) { //STEER WITHOUT SENSORY INPUT c1 = 0; c2 = 1; } // CONTROL LAW - MODEL VS. SENSOR DATA angleOfTurn = c1 * linearAngle + c2 * modelAngle; // Send commands to steering board (set values of enums) steer(angleOfTurn); // Update robot model of location updateModel(angleOfTurn); return ERROR;}
开发者ID:RuinaLab,项目名称:Ranger,代码行数:51,
示例19: getSymbol/*------------------------------------------------------*/unsigned getSymbol(struct Model *m){ unsigned symbol; unsigned const *f; u_int32_t smallL, smallH, smallT, smallR, smallR_x_smallL, target; smallT = m->totFreq; /* Get target value */ smallR = bigR / smallT; target = bigD / smallR; if (target >= smallT) target = smallT - 1; smallH = 0; for (f = m->freq; ; f++) { assert(f < &m->freq[m->numSymbols]); smallH += *f; if (smallH > target) break; } smallL = smallH - *f; smallR_x_smallL = smallR * smallL; bigD -= smallR_x_smallL; if (smallH < smallT) bigR = smallR * *f; else bigR -= smallR_x_smallL; while (bigR <= TWO_TO_THE(smallB - 2)) { bigR <<= 1; bigD <<= 1; bigD |= bs_get_bit(); } symbol = f - m->freq; assert(INRANGE(symbol, 0, m->numSymbols - 1)); updateModel(m, symbol); return symbol;} /* getSymbol */
开发者ID:enadam,项目名称:bzip,代码行数:47,
示例20: getPuvoid MeanShiftTracker::trackObject(const cv::Mat &image) { double temp = 0; double pu_actual[colorBins][colorBins][colorBins]; double pu_nuevo[colorBins][colorBins][colorBins]; cv::Point newCenter = cv::Point(-1, -1); cv::Point currentCenter = cv::Point(-1, -1); currentCenter = trackingWindowCenter; iteration = 1; do { getPu(image, pu_actual, currentCenter); newCenter = MeanShift(image, pu_actual, currentCenter); getPu(image, pu_nuevo, newCenter); temp = getBhattaCoefficient(qu, pu_nuevo) - getBhattaCoefficient(qu, pu_actual) ; if (temp < bhattaEpsilon || (iteration == maxIterations)) { if (temp < 0) newCenter = currentCenter; bhattaCoefficient = getBhattaCoefficient(qu, pu_nuevo); break; } else { currentCenter = newCenter; iteration += 1; } } while (true); getPu(image, pu_nuevo, newCenter); double newPu = getBhattaCoefficient(qu, pu_nuevo); lastError = newPu; trackingWindowCenter = newCenter; if (enableModelUpdate) //if (getBhattaCoefficient(qu, pu_nuevo) < modelUpdateEpsilon) updateModel(image, newCenter); trackingWindow = calculateTrackingWindow(trackingWindowCenter);}
开发者ID:manlito,项目名称:roytracker,代码行数:46,
示例21: ossimNotify//*****************************************************************************// METHOD: ossimTileMapModel::loadState()//// Restores the model's state from the KWL. This KWL also serves as a// geometry file.////***************************************************************************** bool ossimTileMapModel::loadState(const ossimKeywordlist& kwl, const char* prefix) { if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::loadState: entering..." << std::endl; if (traceDebug()) { ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::loadState:" << "/nInput kwl: " << kwl << std::endl; } const char* value = NULL; //const char* keyword =NULL; bool success; //*** // Assure this keywordlist contains correct type info: //*** value = kwl.find(prefix, ossimKeywordNames::TYPE_KW); if (!value || (strcmp(value, TYPE_NAME(this)))) { theErrorStatus = 1; return false; } value = kwl.find(prefix, "depth"); qDepth = atoi(value); //*** // Pass on to the base-class for parsing first: //*** success = ossimSensorModel::loadState(kwl, prefix); if (!success) { theErrorStatus++; return false; } updateModel(); if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG ossimTileMapModel::loadState: returning..." << std::endl; return true; }
开发者ID:573671712,项目名称:OTB,代码行数:52,
示例22: ossimTangentialRadialLensDistortionossimSpectraboticsRedEdgeModel::ossimSpectraboticsRedEdgeModel(const ossimDrect& imageRect, const ossimGpt& platformPosition, double roll, double pitch, double heading, const ossimDpt& /* principalPoint */, // in millimeters double focalLength, // in millimeters const ossimDpt& pixelSize) // in millimeters{ theImageClipRect = imageRect; theRefImgPt = theImageClipRect.midPoint(); m_compositeMatrix = ossimMatrix4x4::createIdentity(); m_compositeMatrixInverse = ossimMatrix4x4::createIdentity(); m_roll = roll; m_pitch = pitch; m_heading = heading; m_focalLength = focalLength; m_pixelSize = pixelSize; m_ecefPlatformPosition = platformPosition; m_adjEcefPlatformPosition = platformPosition; m_lensDistortion = new ossimTangentialRadialLensDistortion(); initAdjustableParameters(); updateModel(); try { // Method throws ossimException. // computeGsd(); } catch (const ossimException& e) { ossimNotify(ossimNotifyLevel_WARN) << "ossimSpectrabotics Constructor caught Exception:/n" << e.what() << std::endl; } if (traceDebug()) { ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSpectraboticsRedEdgeModel::ossimSpectrabotics DEBUG:" << endl;#ifdef OSSIM_ID_ENABLED ossimNotify(ossimNotifyLevel_DEBUG)<< "OSSIM_ID: " << OSSIM_ID << endl;#endif }}
开发者ID:ossimlabs,项目名称:ossim,代码行数:45,
示例23: initAdjustableParametersrspfApplanixEcefModel::rspfApplanixEcefModel(const rspfDrect& imageRect, const rspfGpt& platformPosition, double roll, double pitch, double heading, const rspfDpt& /* principalPoint */, // in millimeters double focalLength, // in millimeters const rspfDpt& pixelSize) // in millimeters{ theImageClipRect = imageRect; theRefImgPt = theImageClipRect.midPoint(); theCompositeMatrix = rspfMatrix4x4::createIdentity(); theCompositeMatrixInverse = rspfMatrix4x4::createIdentity(); theRoll = roll; thePitch = pitch; theHeading = heading; theFocalLength = focalLength; thePixelSize = pixelSize; theEcefPlatformPosition = platformPosition; theAdjEcefPlatformPosition = platformPosition; theLensDistortion = new rspfMeanRadialLensDistortion; initAdjustableParameters(); updateModel(); try { // Method throws rspfException. computeGsd(); } catch (const rspfException& e) { rspfNotify(rspfNotifyLevel_WARN) << "rspfApplanixEcefModel Constructor caught Exception:/n" << e.what() << std::endl; } if (traceDebug()) { rspfNotify(rspfNotifyLevel_DEBUG) << "rspfApplanixEcefModel::rspfApplanixEcefModel DEBUG:" << endl;#ifdef RSPF_ID_ENABLED rspfNotify(rspfNotifyLevel_DEBUG)<< "RSPF_ID: " << RSPF_ID << endl;#endif }}
开发者ID:vapd-radi,项目名称:rspf_v2.0,代码行数:45,
示例24: disconnectvoid QgsFieldModel::setLayer( QgsVectorLayer *layer ){ if ( mLayer ) { disconnect( mLayer, &QgsVectorLayer::updatedFields, this, &QgsFieldModel::updateModel ); disconnect( mLayer, &QObject::destroyed, this, &QgsFieldModel::layerDeleted ); } mLayer = layer; if ( mLayer ) { connect( mLayer, &QgsVectorLayer::updatedFields, this, &QgsFieldModel::updateModel ); connect( mLayer, &QObject::destroyed, this, &QgsFieldModel::layerDeleted ); } updateModel();}
开发者ID:alexbruy,项目名称:QGIS,代码行数:18,
示例25: updateModel//*************************************************************************************************//! Collects common code among all parsers//*************************************************************************************************void rspfQuickbirdRpcModel::finishConstruction(){ theImageSize.line = theImageClipRect.height(); theImageSize.samp = theImageClipRect.width(); theRefImgPt.line = theImageClipRect.midPoint().y; theRefImgPt.samp = theImageClipRect.midPoint().x; theRefGndPt.lat = theLatOffset; theRefGndPt.lon = theLonOffset; theRefGndPt.hgt = theHgtOffset; //--- // NOTE: We must call "updateModel()" to set parameter used by base // rspfRpcModel prior to calling lineSampleHeightToWorld or all // the world points will be same. //--- updateModel(); rspfGpt v0, v1, v2, v3; lineSampleHeightToWorld(theImageClipRect.ul(), theHgtOffset, v0); lineSampleHeightToWorld(theImageClipRect.ur(), theHgtOffset, v1); lineSampleHeightToWorld(theImageClipRect.lr(), theHgtOffset, v2); lineSampleHeightToWorld(theImageClipRect.ll(), theHgtOffset, v3); theBoundGndPolygon = rspfPolygon (rspfDpt(v0), rspfDpt(v1), rspfDpt(v2), rspfDpt(v3)); // Set the ground reference point using the model. lineSampleHeightToWorld(theRefImgPt, theHgtOffset, theRefGndPt); if( theGSD.hasNans() ) { try { // This will set theGSD and theMeanGSD. Method throws rspfException. computeGsd(); } catch (const rspfException& e) { rspfNotify(rspfNotifyLevel_WARN) << "rspfQuickbirdRpcModel::finishConstruction -- caught exception:/n" << e.what() << std::endl; } }}
开发者ID:vapd-radi,项目名称:rspf_v2.0,代码行数:46,
示例26: process void process() { updateModel(model_); if (model_->validate()) { // Do something with the data in the model: show it. bindString("submit-info", Wt::WString::fromUTF8("Saved user data for ") + model_->userData(), Wt::PlainText); // Udate the view: Delete any validation message in the view, etc. updateView(model_); // Set the focus on the first field in the form. Wt::WLineEdit *viewField = resolve<Wt::WLineEdit*>(UserFormModel::FirstNameField); viewField->setFocus(); } else { bindEmpty("submit-info"); // Delete the previous user data. updateView(model_); } }
开发者ID:NeilNienaber,项目名称:wt,代码行数:19,
示例27: QMainWindowMainWindow::MainWindow(QWidget *parent) : QMainWindow(parent){ HomeWidget* homeWidget = new HomeWidget; SettingsWidget* settingsWidget = new SettingsWidget; LogsWidget* logsWidget = new LogsWidget; ScreenshotWidget* screenshotWidget = new ScreenshotWidget; BrowseTimeWidget* browseTimeWidget = new BrowseTimeWidget; WebsiteLockerWidget* websiteLockerWidget = new WebsiteLockerWidget; ProgramLockerWidget* programLockerWidget = new ProgramLockerWidget; currentPageLabel = new QLabel; versionLabel = new QLabel; versionLabel->setObjectName("versionLabel"); connect(homeWidget,SIGNAL(updateModel()),settingsWidget,SLOT(updateUsersModel())); connect(homeWidget,SIGNAL(updateModel()),logsWidget,SLOT(updateUsersModel())); connect(homeWidget,SIGNAL(updateModel()),screenshotWidget,SLOT(updateUsersModel())); connect(homeWidget,SIGNAL(updateModel()),browseTimeWidget,SLOT(updateUsersModel())); connect(homeWidget,SIGNAL(updateModel()),websiteLockerWidget,SLOT(updateUsersModel())); connect(homeWidget,SIGNAL(updateModel()),programLockerWidget,SLOT(updateUsersModel())); connect(homeWidget,SIGNAL(registerd()),this,SLOT(readAvailableDays())); connect(this,SIGNAL(updateLogs()),logsWidget,SLOT(updateLog())); connect(this,SIGNAL(updateScreenshots()),screenshotWidget,SLOT(updateScreenshot())); connect(this,SIGNAL(updateStatistics()),settingsWidget,SLOT(updateStatistics())); stackedWidget = new SlidingStackedWidget(this); stackedWidget->addWidget(homeWidget); stackedWidget->addWidget(settingsWidget); stackedWidget->addWidget(logsWidget); stackedWidget->addWidget(screenshotWidget); stackedWidget->addWidget(browseTimeWidget); stackedWidget->addWidget(websiteLockerWidget); stackedWidget->addWidget(programLockerWidget); stackedWidget->setSpeed(500); this->setCentralWidget(stackedWidget); createDockWidget(); readAvailableDays(); createStatusBar(); this->setWindowTitle(" C++ updateName函数代码示例 C++ updateMenu函数代码示例
|