Exemplo n.º 1
0
FolderModel::FolderModel( QObject* parent ) : BaseModel( parent ),
    m_folderId( 0 ),
    m_viewId( 0 ),
    m_typeId( 0 ),
    m_forceColumns( false ),
    m_searchColumn( -1 )
{
    appendModel( new QSqlQueryModel( this ) );
}
Exemplo n.º 2
0
void ModelPanel::LoadDataFromScene()
{
	ModelManager* modelMgr = gEngine->GetModelManager();
	std::list<Model*> modelList = modelMgr->GetModelList();

	wxTreeItemId rootId = mTreeCtrl->AddRoot(L"root", 0, 0, New ModelTreeItemData(NULL));

	for(std::list<Model*>::iterator iter = modelList.begin(); iter != modelList.end(); ++iter)
	{
		Model* model = *iter;
		appendModel(rootId, model);
	}
}
Exemplo n.º 3
0
UsersModel::UsersModel( QObject* parent ) : BaseModel( parent ),
    m_filter( UsersModel::AllUsers )
{
    appendModel( new QSqlQueryModel( this ) );

    bool emailEnabled = dataManager->setting( "email_enabled" ).toInt();

    if ( emailEnabled )
        setColumnMapping( 0, QList<int>() << 1 << 2 << 3 << 4 );
    else
        setColumnMapping( 0, QList<int>() << 1 << 2 << 4 );

    setHeaderData( 0, Qt::Horizontal, tr( "Name" ) );
    setHeaderData( 1, Qt::Horizontal, tr( "Login" ) );
    if ( emailEnabled )
        setHeaderData( 2, Qt::Horizontal, tr( "Email" ) );
    setHeaderData( emailEnabled ? 3 : 2, Qt::Horizontal, tr( "Access" ) );

    setSort( 0, Qt::AscendingOrder );

    updateQueries();
}
bool PatternAnalysisWizard::validateCurrentPage()
{
	switch( this->currentId() )
	{
		//********************************************************************
		// Run the desired module upon exiting the wizard:
		case Page_Features:
			int id = optionGroup->checkedId();
			switch(id)
			{
			    case 0: 
					runSVM();
					break;
				case 1:
				    runKPLS();
			        break;
				case 2:
					saveModel();
					break;
				case 3:
					appendModel(mod_table, filename);
					break;
				case 4:
					extractTable(true);
					break;
				case 5:
					extractTableFromModel(mod_table);
					break;
				case 6:
					extractTable(true);
					break;

			}
			return true;
		break;
		//********************************************************************
	}
	return true;
}
Exemplo n.º 5
0
void CGraphFitting::generateCandidates()
{
	double thres=0.25;
	int numLines=getValidNum()-1;
	for(int i=0;i<numLines;++i)
	{
		MyLine3D& line=getLine(i);
		if(line.goodness<thres)	
		{
			printf("%d line kmeans start\n",i);
			line.kmeanLines(line.supportPoints,*pImg3D,true);
			for(int j=0;j<line.clusterLines.size();++j)
				appendModel(line.clusterLines[j]);
			printf("%d line kmeans End\n",i);
		}
	}
	for(int i=0;i<numLines;++i)
	{
		MyLine3D& line=getLine(i);
		if(line.goodness<thres)	
			removeModel(i);
	}
	adjustModels();
}