您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ updatePlot函数代码示例

51自学网 2021-06-03 09:14:13
  C++
这篇教程C++ updatePlot函数代码示例写得很实用,希望能帮到您。

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

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

示例1: QMainWindow

MainWindow::MainWindow(QWidget *parent) :    QMainWindow(parent){    Settings settings;    settings.s_plot.Xfrom = 0;    settings.s_plot.Xto = 500;    settings.s_plot.Yfrom = 0;    settings.s_plot.Yto = 500;    settings.s_plot.x_name = "X";    settings.s_plot.y_name = "Y";    d_panel = new Panel();    d_panel->setSettings(settings);    QWidget *w = new QWidget( this );    graf = new Graf();    QHBoxLayout *hLayout = new QHBoxLayout( w );    hLayout->addWidget( d_panel );    hLayout->addWidget( graf, 10 );    setCentralWidget( w );    updatePlot();    connect( d_panel, SIGNAL( edited() ), SLOT( updatePlot() ) );    createAction();    createToolBar();}
开发者ID:ChebotarDmytro,项目名称:Graph,代码行数:35,


示例2: QMainWindow

MainWindow::MainWindow( QWidget *parent ):    QMainWindow( parent ){    Settings settings;#if 1    settings.startDateTime = QDateTime( QDate( 2012, 10, 27 ), QTime( 18, 5, 0, 0 ) );    settings.endDateTime = QDateTime( QDate( 2012, 10, 28 ), QTime( 12, 12, 0, 0 ) );#else    settings.startDateTime = QDateTime( QDate( 2011, 5, 3 ), QTime( 0, 6, 0, 0 ) );    settings.endDateTime = QDateTime( QDate( 2012, 3, 10 ), QTime( 0, 5, 0, 0 ) );#endif    settings.maxMajorSteps = 10;    settings.maxMinorSteps = 8;    settings.maxWeeks = -1;    d_plot = new Plot();    d_panel = new Panel();    d_panel->setSettings( settings );    QWidget *box = new QWidget( this );    QHBoxLayout *layout = new QHBoxLayout( box );    layout->addWidget( d_plot, 10 );    layout->addWidget( d_panel );    setCentralWidget( box );    updatePlot();    connect( d_panel, SIGNAL( edited() ), SLOT( updatePlot() ) );    connect( d_plot->axisWidget( QwtAxis::yLeft ),         SIGNAL( scaleDivChanged() ), SLOT( updatePanel() ) );}
开发者ID:27sparks,项目名称:GoldenCheetah,代码行数:33,


示例3: switch

void Plot3DDialog::pickAxisLabelFont(){    bool ok;    QFont font;    switch(axesList2->currentRow())    {    case 0:        font = QFontDialog::getFont(&ok, xAxisFont, this);        if ( ok ) {            xAxisFont=font;            updatePlot();        } else            return;        break;    case 1:        font = QFontDialog::getFont(&ok, yAxisFont, this);        if ( ok ) {            yAxisFont = font;            updatePlot();        } else            return;        break;    case 2:        font = QFontDialog::getFont(&ok, zAxisFont, this);        if ( ok ) {            zAxisFont = font;            updatePlot();        } else            return;        break;    }}
开发者ID:kuzavas,项目名称:qtiplot,代码行数:34,


示例4: GausCurv

void caWaterfallPlot::TimeOut(){    // demo curve    if(thisUnits != Monitor) {        if(!disableDemo) {            datamutex->lock();            GausCurv(position);            m_data->setData(reducedArray, countRows, ActualNumberOfColumns, getRows(), ActualNumberOfColumns);            setCols(ActualNumberOfColumns);            if(firstDemoPlot) {                updatePlot();                m_data->setLimits(0., getCols(), 0., getRows(), thisIntensityMin, thisIntensityMax);                firstDemoPlot = false;            }            datamutex->unlock();            if(drift > 0 && position >= NumberOfColumns) drift = -1;            if(drift < 0 && position <= 0)  drift = 1;            position += drift;        } else {            if(reducedArray != (double*) 0) {                datamutex->lock();                m_data->setData(reducedArray, countRows, ActualNumberOfColumns, getRows(),  ActualNumberOfColumns);                if(firstTimerPlot) {                    updatePlot();                    m_data->setLimits(0., getCols(), 0., getRows(), thisIntensityMin, thisIntensityMax);                    firstTimerPlot = false;                }                datamutex->unlock();            }        }        myReplot();    }}
开发者ID:jerryjiahaha,项目名称:caqtdm,代码行数:35,


示例5: tr

void AnalysisDEA::slotDEAComputed(){    // stop progress bar    m_ui->progressBar->setMaximum(10);    // enable run button    m_ui->run->setEnabled(true);    // check that the DE genes were computed    if (m_results_rows.empty() || m_results_cols.empty() || m_results.empty()) {        QMessageBox::critical(this,                              tr("DEA Analysis"),                              tr("There was an error performing the DEA"));        return;    }    // enable controls    m_ui->exportTable->setEnabled(true);    m_ui->exportPlot->setEnabled(true);    m_ui->searchField->setEnabled(true);    // update table with fdr and foldchange    updateTable();    // update plot with fdr and foldchange    updatePlot();}
开发者ID:SpatialTranscriptomicsResearch,项目名称:st_viewer,代码行数:26,


示例6: QPointF

void AnalysisDEA::slotGeneSelected(QModelIndex index){    // Check if the selection is valid    if (!index.isValid() || m_proxy.isNull()) {        m_gene_highlight = QPointF();        return;    }    const QItemSelection &selected = m_ui->tableview->selectionModel()->selection();    const QModelIndexList &selected_indexes = m_proxy->mapSelectionToSource(selected).indexes();    // Check if only elements are selected    if (selected_indexes.empty()) {        m_gene_highlight = QPointF();        return;    }    // update the highlight coordinate and refresh the plot    const bool DESEQ2 = m_method == AnalysisDEA::DESEQ2;    const int row_index = selected_indexes.first().row();    const int pvalue_index = DESEQ2 ? 4 : 2;    const int fc_index = DESEQ2 ? 1 : 0;    const double pvalue = -log10(m_results.at(row_index, pvalue_index) + std::numeric_limits<double>::epsilon());    const double foldchange = m_results.at(row_index, fc_index);    m_gene_highlight = QPointF(foldchange, pvalue);    updatePlot();}
开发者ID:SpatialTranscriptomicsResearch,项目名称:st_viewer,代码行数:27,


示例7: Graph

InterpolatingGraph::InterpolatingGraph(QCustomPlot *plot, const DoubleSeries &d, PlotSettings::ScalingMode scalingMode, PlotSettings::ScaleType scaleType) :    Graph(plot),    series(d),    plot(plot),    lastUpdate(-1),    currentMin(std::numeric_limits<double>::max()),    currentMax(std::numeric_limits<double>::min()),    currentScalingMode(PlotSettings::NOSCALING),    currentScaleType(PlotSettings::LINSCALE){    setObjectName("InterpolatingGraph");    connect(&series, SIGNAL(newData(qint64)), this, SLOT(onNewData(qint64)));    connect(&series, SIGNAL(offsetChanged()), this, SLOT(onOffsetChanged()));    graph = plot->addGraph();    // Ensure value axis is visible.    plot->yAxis->setVisible(true);    plot->yAxis->setGrid(true);    configureAppearance(graph);    initialize(graph, series);    rescale(scalingMode, scaleType);    updatePlot(scalingMode);}
开发者ID:hanikesn,项目名称:octopus,代码行数:25,


示例8: initialize

void InterpolatingGraph::onOffsetChanged(){    graph->clearData();    initialize(graph, series);    rescale(currentScalingMode, currentScaleType);    updatePlot(currentScalingMode);}
开发者ID:hanikesn,项目名称:octopus,代码行数:7,


示例9: if

void CopasiPlot::output(const Activity & activity){  size_t i, imax;  C_INT32 ItemActivity;  if (mHaveBefore && (activity == COutputInterface::BEFORE)) mDataBefore++;  else if (mHaveDuring && (activity == COutputInterface::DURING)) mDataDuring++;  else if (mHaveAfter && (activity == COutputInterface::AFTER)) mDataAfter++;  for (ItemActivity = 0; ItemActivity < ActivitySize; ItemActivity++)    if ((ItemActivity & activity) && mData[ItemActivity].size())      {        std::vector< CVector< double > * > & data = mData[ItemActivity];        size_t & ndata = mDataSize[ItemActivity];        if ((imax = data.size()) != 0)          {            if (ndata >= data[0]->size())              {                resizeCurveData(ItemActivity);              }            //the data that needs to be stored internally:            for (i = 0; i < imax; ++i)              if (mObjectInteger[ItemActivity][i])                (*data[i])[ndata] = *(C_INT32 *)mObjectValues[ItemActivity][i];              else                (*data[i])[ndata] = *mObjectValues[ItemActivity][i];            ++ndata;          }      }  updatePlot();}
开发者ID:bmoreau,项目名称:COPASI,代码行数:35,


示例10: CloseStatistics

void HistogramPage::SetStatistics(HistogramCollection &collection){	CloseStatistics();	_histograms = new HistogramCollection(collection);	_summedPolarizationHistograms = _histograms->CreateSummedPolarizationCollection();	updatePlot();}
开发者ID:pkgw,项目名称:aoflagger,代码行数:7,


示例11: QDialog

StatisticsDialog::StatisticsDialog(QWidget *parent, CommunicationService* communicationService) :    QDialog(parent),    ui(new Ui::StatisticsDialog){    ui->setupUi(this);    this->setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);    ui->customPlot->setLocale(QLocale(QLocale::Polish, QLocale::Poland));    ui->customPlot->setBackground(QBrush(QColor(235,235,235,255)));    this->communicationService = communicationService;    setStartPack();    updatePlot();    connect(ui->isoffer_rbtn_true,SIGNAL(clicked()),this,SLOT(updatePlot()));    connect(ui->isoffer_rbtn_false,SIGNAL(clicked()),this,SLOT(updatePlot()));    connect(ui->startdateEdit,SIGNAL(userDateChanged(QDate)),this,SLOT(updatePlot()));    connect(ui->enddateEdit,SIGNAL(userDateChanged(QDate)),this,SLOT(updatePlot()));}
开发者ID:maniekstasz,项目名称:OfferSeeker,代码行数:16,


示例12: ensureDistinctColors

void MainWindow::onPacketParsed(Packet packet){    _packetsReceivedCount++;    if(!packet.isCrcValid())    {        _crcErrorCount++;    }    QString sourceId = ByteArrayUtils::toString(packet.sourceId()).replace(" 0x", "").replace("0x", "");    if(!_rssValues.contains(sourceId))    {        _rssValues.insert(sourceId, QVector<double>());        _timestampValues.insert(sourceId, QVector<double>());        QCPGraph* deviceGraph = ui->plotWidget->addGraph();        deviceGraph->setScatterStyle(QCP::ssDisc);        deviceGraph->setScatterSize(5);        deviceGraph->setName(sourceId);        ensureDistinctColors();    }    _rssValues[sourceId].append(packet.rss());    _timestampValues[sourceId].append(packet.timestamp().toTime_t());    updatePlot();    updateStatus();}
开发者ID:GlennVDLocht,项目名称:dash7-ap-open-source-stack,代码行数:28,


示例13: isotope

void Nmr::on_isotopeCombo_currentIndexChanged(QString const& text){   QString isotope(currentIsotope(text));   Data::NmrReferenceLibrary& library(Data::NmrReferenceLibrary::instance());   QList<Data::NmrReference const*> refs(library.filter(isotope));   QStringList systems;   QList<Data::NmrReference const*>::iterator iter;   for (iter = refs.begin(); iter != refs.end(); ++iter) {       QString system((*iter)->system());       if (!systems.contains(system)) systems.append(system);   }   QComboBox* combo(m_ui->systemCombo);   combo->clear();   combo->addItems(systems);   loadShifts(currentReference(), isotope);   QPair<double, double> range(standardRange(isotope));   m_plot->xAxis->setRange(range.first, range.second);   updatePlot();}
开发者ID:autodataming,项目名称:IQmol,代码行数:25,


示例14: updateProjectChooser

void BurnUpChartCreator::showControls(){    updateProjectChooser();    updatePlot();    ProjectAnalyzer::showControls();}
开发者ID:atilm,项目名称:TaskBoard,代码行数:8,


示例15: table

void Frequencies::on_scaleFactor_valueChanged(double scale){   QTableWidget* table(m_configurator.frequencyTable);   for (int mode = 0; mode < m_rawData.size(); ++mode) {       table->item(mode, 0)->setText(QString::number(m_rawData[mode].first * scale,'f', 2));   }      updatePlot();}
开发者ID:jlane-waikato,项目名称:IQmol,代码行数:9,


示例16: updatePlot

void StatisticsDialog::on_endDate_cbox_clicked(){    if(ui->endDate_cbox->isChecked()){        ui->enddateEdit->setEnabled(true);    }    else{        ui->enddateEdit->setEnabled(false);    }    updatePlot();}
开发者ID:maniekstasz,项目名称:OfferSeeker,代码行数:9,


示例17: drawRubberBand

void CurveWidget::mouseMoveEvent(QMouseEvent *mouseEvent){	if (leftPressed || rightPressed)	{		drawRubberBand(mousePressBeginPoint, mousePressEndPoint, DASH_SIZE, RUBBER_BAND_COLOR);		mousePressEndPoint = mouseEvent->pos();		updatePlot();	}}
开发者ID:eugenechereshnev,项目名称:computer-graphics,代码行数:9,


示例18: updatePlot

void Plot3DDialog::pickNumbersFont(){    bool ok;    QFont font = QFontDialog::getFont(&ok,numbersFont,this);    if ( ok ) {        numbersFont = font;        updatePlot();    } else        return;}
开发者ID:kuzavas,项目名称:qtiplot,代码行数:10,


示例19: Q_ASSERT

int TimePlotWidget::addTimeData(GenericTimeData * gtd) {    if (!gtd) return -1;    m_curveList.append(gtd);    gtd->getCurve()->setZ(m_curveList.length());    gtd->getCurve()->attach(this);    Q_ASSERT(connect(gtd,SIGNAL(dataChanged()),this,SLOT(recalcAndUpdatePlot())));    Q_ASSERT(connect(gtd,SIGNAL(curveAttributeChanged()),this,SLOT(updatePlot())));    emit curveListChanged();    return (m_curveList.length()-1);}
开发者ID:lawrence-iviani,项目名称:QT_tone_generator,代码行数:10,


示例20: updateColorButtons

void QgsVectorGradientColorRampV2Dialog::on_cboType_currentIndexChanged( int index ){  if (( index == 0 && mRamp->isDiscrete() ) ||      ( index == 1 && !mRamp->isDiscrete() ) )    return;  mRamp->convertToDiscrete( index == 0 );  updateColorButtons();  updateStopEditor();  updatePlot();}
开发者ID:NyakudyaA,项目名称:QGIS,代码行数:10,


示例21: updateColorButtons

void QgsGradientColorRampDialog::setRamp( const QgsGradientColorRamp &ramp ){  mRamp = ramp;  updateColorButtons();  updateStopEditor();  updatePlot();  emit changed();}
开发者ID:exlimit,项目名称:QGIS,代码行数:10,


示例22: updateStatus

void MainWindow::on_restartAction_triggered(){    ui->parsedOutputPlainTextEdit->clear();    _packetsReceivedCount = 0;    _crcErrorCount = 0;    updateStatus();    _timestampValues.clear();    _rssValues.clear();    updatePlot();}
开发者ID:GlennVDLocht,项目名称:dash7-ap-open-source-stack,代码行数:11,


示例23: set_filter_type

void MainWindow::BoxChecked(bool t) {	if (ui->LowPass->isChecked()) {		set_filter_type(0);	} else if (ui->HighPass->isChecked()) {		set_filter_type(1);	}	else if (ui->BandPass->isChecked()) {		set_filter_type(2);	}	else if (ui->BandStop->isChecked()) {		set_filter_type(3);	}	updatePlot();}
开发者ID:GeneKong,项目名称:spuce,代码行数:12,


示例24: findNearestControlPoint

void QgsCurveEditorWidget::plotMousePress( QPointF point ){  mCurrentPlotMarkerIndex = findNearestControlPoint( point );  if ( mCurrentPlotMarkerIndex < 0 )  {    // add a new point    mCurve.addControlPoint( point.x(), point.y() );    mCurrentPlotMarkerIndex = findNearestControlPoint( point );    emit changed();  }  updatePlot();}
开发者ID:ndavid,项目名称:QGIS,代码行数:12,


示例25: connect

void Plot3DDialog::initConnections(){    // scales page connections    connect(boxFrom, SIGNAL(valueChanged(double)), this, SLOT(updatePlot()));    connect(boxTo, SIGNAL(valueChanged(double)), this, SLOT(updatePlot()));    connect(boxMajors, SIGNAL(valueChanged(int)), this, SLOT(updatePlot()));    connect(boxMinors, SIGNAL(valueChanged(int)), this, SLOT(updatePlot()));    connect(boxPrecision, SIGNAL(valueChanged(int)), this, SLOT(updatePlot()));    connect(boxTickLabelsFormat, SIGNAL(activated(int)), this, SLOT(updatePlot()));    connect(axesList, SIGNAL(currentRowChanged(int)), this, SLOT(viewScaleLimits(int)));    // axes page connections    connect(boxMajorLength, SIGNAL(valueChanged(double)), this, SLOT(updatePlot()));    connect(boxMinorLength, SIGNAL(valueChanged(double)), this, SLOT(updatePlot()));    connect(axesList2, SIGNAL(currentRowChanged(int)), this, SLOT(viewAxisOptions(int)));    //grid page connections    connect(boxMajorGrids, SIGNAL(toggled(bool)), this, SLOT(enableMajorGrids(bool)));    connect(boxMajorGrids, SIGNAL(toggled(bool)), this, SLOT(updatePlot()));    connect(boxMinorGrids, SIGNAL(toggled(bool)), this, SLOT(enableMinorGrids(bool)));    connect(boxMinorGrids, SIGNAL(toggled(bool)), this, SLOT(updatePlot()));    connect(boxMajorGridStyle, SIGNAL(activated(int)), this, SLOT(updatePlot()));    connect(boxMinorGridStyle, SIGNAL(activated(int)), this, SLOT(updatePlot()));    connect(boxMajorGridWidth, SIGNAL(valueChanged(double)), this, SLOT(updatePlot()));    connect(boxMinorGridWidth, SIGNAL(valueChanged(double)), this, SLOT(updatePlot()));    connect(btnGrid, SIGNAL(colorChanged()), this, SLOT(updatePlot()));    connect(btnGridMinor, SIGNAL(colorChanged()), this, SLOT(updatePlot()));    //color page connections    connect(btnAxes, SIGNAL(colorChanged()), this, SLOT(updatePlot()));    connect(btnLabels, SIGNAL(colorChanged()), this, SLOT(updatePlot()));    connect(btnNumbers, SIGNAL(colorChanged()), this, SLOT(updatePlot()));    connect(btnMesh, SIGNAL(colorChanged()), this, SLOT(updatePlot()));    connect(btnBackground, SIGNAL(colorChanged()), this, SLOT(updatePlot()));    connect(d_color_map_editor, SIGNAL(scalingChanged()), this, SLOT(updatePlot()));    connect(boxMeshLineWidth, SIGNAL(valueChanged(double)), d_plot, SLOT(setMeshLineWidth(double)));    connect(boxOrthogonal, SIGNAL(toggled(bool)), d_plot, SLOT(setOrthogonal(bool)));    connect(boxLegend, SIGNAL(toggled(bool)), d_plot, SLOT(showColorLegend(bool)));    connect(boxResolution, SIGNAL(valueChanged(int)), d_plot, SLOT(setResolution(int)));    connect(boxDistance, SIGNAL(valueChanged(int)), d_plot, SLOT(setLabelsDistance(int)));    //title page connections    connect(btnTitleColor, SIGNAL(colorChanged()), this, SLOT(updatePlot()));}
开发者ID:kuzavas,项目名称:qtiplot,代码行数:45,


示例26: KiBitmap

void SIM_PLOT_FRAME::onSimFinished( wxCommandEvent& aEvent ){    m_toolBar->SetToolNormalBitmap( ID_SIM_RUN, KiBitmap( sim_run_xpm ) );    SetCursor( wxCURSOR_ARROW );    SIM_TYPE simType = m_exporter->GetSimType();    if( simType == ST_UNKNOWN )        return;    SIM_PLOT_PANEL* plotPanel = CurrentPlot();    if( !plotPanel || plotPanel->GetType() != simType )        plotPanel = NewPlotPanel( simType );    if( IsSimulationRunning() )        return;    // If there are any signals plotted, update them    if( SIM_PLOT_PANEL::IsPlottable( simType ) )    {        TRACE_MAP& traceMap = m_plots[plotPanel].m_traces;        for( auto it = traceMap.begin(); it != traceMap.end(); /* iteration occurs in the loop */)        {            if( !updatePlot( it->second, plotPanel ) )            {                removePlot( it->first, false );                it = traceMap.erase( it );       // remove a plot that does not exist anymore            }            else            {                ++it;            }        }        updateSignalList();        plotPanel->UpdateAll();        plotPanel->ResetScales();    }    else    {        /// @todo do not make it hardcoded for ngspice        for( const auto& net : m_exporter->GetNetIndexMap() )        {            int node = net.second;            if( node > 0 )                m_simulator->Command( wxString::Format( "print v(%d)", node ).ToStdString() );        }    }}
开发者ID:miloh,项目名称:kicad-source-mirror,代码行数:52,


示例27: CurrentPlot

void SIM_PLOT_FRAME::addPlot( const wxString& aName, SIM_PLOT_TYPE aType, const wxString& aParam ){    SIM_TYPE simType = m_exporter->GetSimType();    if( !SIM_PLOT_PANEL::IsPlottable( simType ) )        return; // TODO else write out in console?    // Create a new plot if the current one displays a different type    SIM_PLOT_PANEL* plotPanel = CurrentPlot();    if( !plotPanel || plotPanel->GetType() != simType )        plotPanel = NewPlotPanel( simType );    TRACE_DESC descriptor( *m_exporter, aName, aType, aParam );    bool updated = false;    SIM_PLOT_TYPE xAxisType = GetXAxisType( simType );    if( xAxisType == SPT_LIN_FREQUENCY || xAxisType == SPT_LOG_FREQUENCY )    {        int baseType = descriptor.GetType() & ~( SPT_AC_MAG | SPT_AC_PHASE );        // Add two plots: magnitude & phase        TRACE_DESC mag_desc( *m_exporter, descriptor, (SIM_PLOT_TYPE)( baseType | SPT_AC_MAG ) );        TRACE_DESC phase_desc( *m_exporter, descriptor, (SIM_PLOT_TYPE)( baseType | SPT_AC_PHASE ) );        updated |= updatePlot( mag_desc, plotPanel );        updated |= updatePlot( phase_desc, plotPanel );    }    else    {        updated = updatePlot( descriptor, plotPanel );    }    if( updated )    {        updateSignalList();    }}
开发者ID:miloh,项目名称:kicad-source-mirror,代码行数:39,



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


C++ updatePos函数代码示例
C++ updatePlaceholderVisibility函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。