• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setupModel函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setRobotDescription

    virtual void setRobotDescription(robot_desc::URDF *file)
    {
	planning_node_util::NodeCollisionModel::setRobotDescription(file);	
	
	printf("=======================================\n");	
	m_kmodel->printModelInfo();
	printf("=======================================\n");

	/* set the data for the model */
	myModel *model = new myModel();
	model->collisionSpaceID = 0;
	model->collisionSpace = m_collisionSpace;
        model->kmodel = m_kmodel;
	model->groupName = m_kmodel->name;
	setupModel(model);

	/* remember the model by the robot's name */
	m_models[model->groupName] = model;
	
	/* create a model for each group */
	std::vector<std::string> groups;
	m_kmodel->getGroups(groups);

	for (unsigned int i = 0 ; i < groups.size() ; ++i)
	{
	    myModel *model = new myModel();
	    model->collisionSpaceID = 0;
	    model->collisionSpace = m_collisionSpace;
	    model->kmodel = m_kmodel;
	    model->groupID = m_kmodel->getGroupID(groups[i]);
	    model->groupName = groups[i];
	    setupModel(model);
	    m_models[model->groupName] = model;
	}
    }
开发者ID:goretkin,项目名称:kwc-ros-pkg,代码行数:35,代码来源:motion_validator.cpp


示例2: QStandardItemModel

void savesWidget::RefreshSaveTable(int index)
{
	if(index==0) //selection is none clear table
	{
	     model = new QStandardItemModel(0, 4, ui.savesTable);
		 model->setHeaderData(0, Qt::Horizontal, tr("Icon"));
		 model->setHeaderData(1, Qt::Horizontal, tr("Directory"));
		 model->setHeaderData(2, Qt::Horizontal, tr("Game Title"));
		 model->setHeaderData(3, Qt::Horizontal, tr("SaveData Title"));

		 ui.savesTable->setModel(model);
		 model->removeRows(0, model->rowCount(QModelIndex()), QModelIndex());//clear data
	}
	else if(index==1) //psp device
	{
		if(scanPSPdir())
		 setupModel(m_savePSPList);
		else
			emit ui.sourceselectCombo->setCurrentIndex(0);//set index to NONE
	}
	else if(index==2) //Local folder
	{
		if(scanLocalDir())
		 setupModel(m_savePSPLocal);
		else
			emit ui.sourceselectCombo->setCurrentIndex(0);//set index to NONE
	}
	else if(index==3) //jpcsp selection
	{
		if(scanJPCSPdir())
		 setupModel(m_saveJPCSPList);
		else
			emit ui.sourceselectCombo->setCurrentIndex(0);//set index to NONE
	}
	else if(index==4) //pcsp selection
	{
		if(scanPCSPdir())
		 setupModel(m_savePCSPList);
		else
			emit ui.sourceselectCombo->setCurrentIndex(0);//set index to NONE
	}
	else if(index==5) //pcsp selection
	{
		if(scanPSPEdir())
		 setupModel(m_savePSPEList);
		else
			emit ui.sourceselectCombo->setCurrentIndex(0);//set index to NONE
	}
	ui.savedatalabel->setText("");//clear text
}
开发者ID:georgemoralis,项目名称:pspudb,代码行数:50,代码来源:saveswidget.cpp


示例3: setupModel

void ProvidersEditor::setDb(QSqlDatabase database)
{
    db = database;
    if (!db.isOpen()) db.open();

    setupModel();
}
开发者ID:pasqal,项目名称:lemonpos,代码行数:7,代码来源:providerseditor.cpp


示例4: QDialog

MainWindow::MainWindow( QWidget* parent )
    : QDialog( parent )
    , m_chart( 0 )
    , m_diagram( 0 )
    , m_ternaryPlane( 0 )
{
    setupUi( this );
    // make a chart
    m_chart = new KDChart::Chart;
    // replace the default (cartesian) coordinate plane with a ternary one
    m_ternaryPlane = new KDChart::TernaryCoordinatePlane;
    m_chart->replaceCoordinatePlane( m_ternaryPlane );
    // make a ternary line diagram
    m_diagram = new KDChart::TernaryPointDiagram;
    // and replace the default diagram with it
    m_ternaryPlane->replaceDiagram( m_diagram );

    // add the three ternary axes, see the positions
    KDChart::TernaryAxis* axisA = new KDChart::TernaryAxis( m_diagram );
    axisA->setPosition( KDChartEnums::PositionSouth );
    KDChart::TernaryAxis* axisB = new KDChart::TernaryAxis( m_diagram );
    axisB->setPosition( KDChartEnums::PositionWest );
    KDChart::TernaryAxis* axisC = new KDChart::TernaryAxis( m_diagram );
    axisC->setPosition( KDChartEnums::PositionEast );

    QHBoxLayout* chartLayout = new QHBoxLayout( frame );
    chartLayout->addWidget( m_chart );

    setupModel();
    m_diagram->setModel( &m_model );
    connect( m_diagram, SIGNAL( clicked( QModelIndex ) ),
             SLOT( indexClicked( QModelIndex ) ) );
}
开发者ID:Wushaowei001,项目名称:mksPlanner,代码行数:33,代码来源:mainwindow.cpp


示例5: setupModel

void GradientModel::addStop(qreal position, const QColor &color)
{
    if (m_lock)
        return;

    if (!m_itemNode.isValid() || gradientPropertyName().isEmpty())
        return;

    if (m_itemNode.modelNode().hasNodeProperty(gradientPropertyName().toUtf8())) {
        //QmlDesigner::RewriterTransaction transaction = m_itemNode.modelNode().view()->beginRewriterTransaction();
        //### TODO does not work

        QmlDesigner::ModelNode gradientNode =  m_itemNode.modelNode().nodeProperty(gradientPropertyName().toUtf8()).modelNode();

        QmlDesigner::ModelNode gradientStopNode =
                m_itemNode.modelNode().view()->createModelNode("QtQuick.GradientStop",
                                                               m_itemNode.modelNode().view()->majorQtQuickVersion(), 0);
        gradientStopNode.variantProperty("position").setValue(position);
        gradientStopNode.variantProperty("color").setValue(color);
        gradientNode.nodeListProperty("stops").reparentHere(gradientStopNode);

        const QList<QmlDesigner::ModelNode> stopNodes = gradientNode.nodeListProperty("stops").toModelNodeList();

        int properPos = 0;
        for (int i = 0; i < stopNodes.count(); i++) {
            if (QmlDesigner::QmlObjectNode(stopNodes.at(i)).modelValue("position").toReal() < position)
                properPos = i + 1;
        }
        gradientNode.nodeListProperty("stops").slide(stopNodes.count() - 1, properPos);

        setupModel();
    }
}
开发者ID:edwardZhang,项目名称:qt-creator,代码行数:33,代码来源:gradientmodel.cpp


示例6:

bool
ossimOutlierRejection::execute()
{
   if(!setupModel(theModelDefinitionString))
   {
      return false;
   }
   ossim_float64 variance_pix2;
   if(removeOutliers(&variance_pix2, NULL)) //TBD : use target variance
   {
      //display RMS with unit
      cout<<"RMS="<<std::sqrt(variance_pix2)<<" pixels"<<endl;

      //export results
      if(theGeomOutputFilename!="")
      {
         if(!exportModel(theGeomOutputFilename)) return false;
      }
      if(theInlierOutputFilename!="")
      {
         if(!saveGMLTieSet(theInlierOutputFilename)) return false;
      }
   }
   else
   {
      return false;
   }

   return true;
}
开发者ID:ICODE-MDA,项目名称:AutomatedSARShipDetection,代码行数:30,代码来源:ossimOutlierRejection.cpp


示例7: QMenu

MainWindow::MainWindow()
{
    QMenu *fileMenu = new QMenu(tr("&File"), this);
    QAction *openAction = fileMenu->addAction(tr("&Open..."));
    openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
    QAction *saveAction = fileMenu->addAction(tr("&Save As..."));
    saveAction->setShortcut(QKeySequence(tr("Ctrl+S")));
    QAction *quitAction = fileMenu->addAction(tr("E&xit"));
    quitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));

    setupModel();
    setupViews();

    connect(openAction, SIGNAL(triggered()), this, SLOT(openFile()));
    connect(saveAction, SIGNAL(triggered()), this, SLOT(saveFile()));
    connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));

    menuBar()->addMenu(fileMenu);
    statusBar();

    openFile(":/Charts/qtdata.cht");

    setWindowTitle(tr("Chart"));
    resize(870, 550);
}
开发者ID:eagafonov,项目名称:qtmoko,代码行数:25,代码来源:mainwindow.cpp


示例8: QAbstractItemModel

NBMediaInfoModel::NBMediaInfoModel( QString fileName ) : QAbstractItemModel() {

	mFileName = QString( fileName );
	rootNode = new NBMediaInfoNode();

	setupModel();
};
开发者ID:marcusbritanicus,项目名称:NewBreeze,代码行数:7,代码来源:NBMediaInfo.cpp


示例9: QStandardItemModel

void fileBrowserWidget::RefreshFilesTable(int index)
{
	ui.JPCSPbutton->setEnabled(true);
	ui.CPSPEMUbutton->setEnabled(true);
	ui.PSPEbutton->setEnabled(true);

	if(index==0) //selection is none clear table
	{
		 model = new QStandardItemModel(0, 5, ui.fileTable);
		 model->setHeaderData(0, Qt::Horizontal, tr("Icon"));
		 model->setHeaderData(1, Qt::Horizontal, tr("Demo Name"));
		 model->setHeaderData(2, Qt::Horizontal, tr("Title"));
		 model->setHeaderData(3, Qt::Horizontal, tr("Disc ID"));
		 model->setHeaderData(4, Qt::Horizontal, tr("FW"));

		 ui.fileTable->setModel(model);
		 model->removeRows(0, model->rowCount(QModelIndex()), QModelIndex());//clear data 
		 
	}
	else if(index==1) //local folder
	{
		if(scanLocaldir())
		 setupModel(appLocalList);
		else
			emit ui.sourceselectCombo->setCurrentIndex(0);//set index to NONE
		
	}
}
开发者ID:georgemoralis,项目名称:pspudb,代码行数:28,代码来源:filebrowserwidget.cpp


示例10: setupModel

void FileResourcesModel::setFilter(const QString &filter)
{
    if (m_filter != filter) {
        m_filter = filter;
        setupModel();
    }
}
开发者ID:C-sjia,项目名称:qt-creator,代码行数:7,代码来源:fileresourcesmodel.cpp


示例11: FilterBase

FilterTid::FilterTid (QWidget * parent)
	: FilterBase(parent)
	, m_ui(new Ui_FilterTid)
  , m_model(0)
{
	initUI();
	setupModel();
}
开发者ID:BackupTheBerlios,项目名称:flogging,代码行数:8,代码来源:filter_tid.cpp


示例12: Q_ASSERT_X

// method for setting new model for this controller + view
void MWidgetController::setModel(MWidgetModel *model)
{
    Q_ASSERT_X(model, "MWidgetController", "MWidgetController::setModel() parameter model has to be valid!");
    Q_D(MWidgetController);
    d->setModel(model);
    //Call setupModel immediately since this is not called from the constructor
    setupModel();
}
开发者ID:arcean,项目名称:libmeegotouch-framework,代码行数:9,代码来源:mwidgetcontroller.cpp


示例13: VyborgMainDialog

MainDialog::MainDialog(QWidget *parent)
    : VyborgMainDialog(parent)
{
    setupModel();
    setupView();
    setupMapperDialog();
    setupFilterDialog();
    setupSortDialog();
}
开发者ID:Wushaowei001,项目名称:vyborg_src,代码行数:9,代码来源:maindialog.cpp


示例14: QWidget

EventViewer::EventViewer(QWidget *parent) :
    QWidget(parent)
{
    EVLayout = new QVBoxLayout(this);
    m_data = 0;
    setMinimumHeight(500);

    titleLabel = new QLabel;
    setTitleLabel("DEMO");
    EVLayout->addWidget(titleLabel);


    evt_plot = new Plot(this);
    rasterData = (SpectrogramData*)  evt_plot->getSpectrogram()->data();
    rasterData->resetData();
    evt_plot->setMaximumSize(640,160);
    evt_plot->setMinimumSize(640,160);
    evt_plot->showContour(false);
    evt_plot->updateScale();

    EVLayout->addWidget(evt_plot);

    btnLayout = new QHBoxLayout();

    evtN_lab = new QLabel("Event N:",this);
    evtN_lcd = new QLCDNumber(6,this);
    integrate_chbx = new QCheckBox("Integrate",this);
    integrate_chbx->setProperty("isPixel",false);

    nextEvent_pbtn = new QPushButton(QIcon(":/images/next.png"),"Next",this);
    prevEvent_pbtn= new QPushButton(QIcon(":/images/prev.png"),"Prev",this);;
    rwd_pbtn = new QPushButton(QIcon(":/images/rew.png"),"RWD",this);
    fwd_pbtn = new QPushButton(QIcon(":/images/fwd.png"),"FWD",this);

    connect(nextEvent_pbtn, SIGNAL(clicked()), this, SLOT(nextEvent()));
    connect(prevEvent_pbtn, SIGNAL(clicked()), this, SLOT(prevEvent()));
    connect(rwd_pbtn, SIGNAL(clicked()), this, SLOT(rewindEvent()));
    connect(fwd_pbtn, SIGNAL(clicked()), this, SLOT(forwardEvent()));


    btnLayout->addWidget(evtN_lab);
    btnLayout->addWidget(evtN_lcd);
    btnLayout->addWidget(integrate_chbx);
    btnLayout->addWidget(prevEvent_pbtn);
    btnLayout->addWidget(nextEvent_pbtn);
    btnLayout->addWidget(rwd_pbtn);
    btnLayout->addWidget(fwd_pbtn);
    EVLayout->addLayout(btnLayout);

    evtView = new QTreeView(this);
    setupModel();
    evtView->setColumnWidth(0 , 180);
    EVLayout->addWidget(evtView);



}
开发者ID:f-giorgi,项目名称:MTG,代码行数:57,代码来源:eventviewer.cpp


示例15: QMainWindow

MainWindow::MainWindow(QWidget *parent)
	: QMainWindow(parent)
{    
    setWindowTitle(tr("Custom Model"));
   
    createMenu(); 

    setupModel();
    setupView(); 
}
开发者ID:guolilong2012,项目名称:exercise_aka,代码行数:10,代码来源:mainwindow.cpp


示例16: QTreeView

FListView::FListView(QWidget* parent /* = 0 */) : QTreeView(parent),
	listmodel(new QDirModel(this)),
	curr_path(QDir::homePath())
{
	setupModel();
	setupGui();

	setRootIndex(listmodel->index(curr_path));
	setCurrentIndex(listmodel->index(0,0, rootIndex()));
}
开发者ID:rduga,项目名称:fmgrqtapp,代码行数:10,代码来源:FListView.cpp


示例17: QMainWindow

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    setupGui();
    setupAction();
    setupModel();
    setupConnection();
}
开发者ID:ypvk,项目名称:WebSearch,代码行数:10,代码来源:mainwindow.cpp


示例18: qDebug

void MainWindow::grp2()
{
    num1 = 2;
    qDebug() <<  "grp2" ;
    setupModel("./Closer/out.ro","./NumberSystem/out.ro");
    setupChart();
    setWindowTitle("Плотность заполнения основной области");
    ui->textBrowser->setText("Метод преобразования системы счисления : Плотность заполнения основной области");
    ui->textBrowser_2->setText("Метод складывания : Плотность заполнения основной области");
}
开发者ID:TelpeNight,项目名称:DataBase,代码行数:10,代码来源:mainwindow.cpp


示例19: setModelNode

void TabViewIndexModel::setModelNodeBackend(const QVariant &modelNodeBackend)
{
    QObject* modelNodeBackendObject = modelNodeBackend.value<QObject*>();

    if (modelNodeBackendObject)
        setModelNode(modelNodeBackendObject->property("modelNode").value<QmlDesigner::ModelNode>());

    setupModel();
    emit modelNodeBackendChanged();
}
开发者ID:C-sjia,项目名称:qt-creator,代码行数:10,代码来源:tabviewindexmodel.cpp


示例20: FilterBase

ColorizerRow::ColorizerRow (QWidget * parent)
	: FilterBase(parent)
	, m_ui(new Ui_ColorizerRow)
	, m_data()
	, m_model(0)
	, m_src_model(0)
{
	initUI();
	setupModel();
}
开发者ID:BackupTheBerlios,项目名称:flogging,代码行数:10,代码来源:colorizer_row.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setupResources函数代码示例发布时间:2022-05-30
下一篇:
C++ setupLayout函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap