void SpectralLibraryMatchResults::addResults(const SpectralLibraryMatch::MatchResults& theResults, Progress* pProgress)
{
   std::map<Signature*, ColorType> colorMap;
   std::vector<SpectralLibraryMatch::MatchResults> results;
   results.push_back(theResults);
   addResults(results, colorMap, pProgress);
}
Пример #2
0
Nepomuk::Utils::SearchWidget::SearchWidget(QWidget *parent)
    : QWidget(parent),
      d_ptr(new SearchWidgetPrivate())
{
    Q_D(SearchWidget);
    d->q = this;

    //query editor widget
    d->m_queryEdit = new SearchLineEdit(this);
    d->m_queryButton = new KPushButton(i18n("Search"), this);
    connect(d->m_queryEdit, SIGNAL(queryChanged(Nepomuk::Query::Query)), this, SLOT(_k_queryComponentChanged()));
    connect(d->m_queryButton, SIGNAL(clicked()), this, SLOT(_k_queryComponentChanged()));

    //item widget
    d->m_itemWidget = new QListView(this);
    d->m_resourceModel = new Utils::SimpleResourceModel(this);
    d->m_itemWidget->setModel(d->m_resourceModel);
    connect(d->m_itemWidget->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SIGNAL(selectionChanged()));
    connect(d->m_itemWidget->selectionModel(), SIGNAL(currentChanged( const QModelIndex &,const QModelIndex&)),
            this, SLOT(_k_forwardCurrentChanged(const QModelIndex &, const QModelIndex &)));

    //facets widget
    d->m_facetWidget = new Nepomuk::Utils::FacetWidget(this);
    d->setupFacetWidget();
    connect(d->m_facetWidget, SIGNAL(queryTermChanged(Nepomuk::Query::Term)), this, SLOT(_k_queryComponentChanged()));

    //layout and config
    QSplitter* facetSplitter = new QSplitter(this);
    facetSplitter->addWidget(d->m_itemWidget);
    facetSplitter->addWidget(d->m_facetWidget);

    QGridLayout* layout = new QGridLayout( this );
    layout->setMargin(0);
    layout->addWidget( d->m_queryEdit, 0, 0 );
    layout->addWidget( d->m_queryButton, 0, 1 );
    layout->addWidget( facetSplitter, 1, 0, 1, 2 );
    layout->setRowStretch(1,1);

    // query client setup
    connect( &d->m_queryClient, SIGNAL(newEntries(QList<Nepomuk::Query::Result>)),
            d->m_resourceModel, SLOT(addResults(QList<Nepomuk::Query::Result>)) );
    connect( &d->m_queryClient, SIGNAL(finishedListing()),
            this, SLOT(_k_listingFinished()));

    setSelectionMode(QListView::ExtendedSelection);
    setConfigFlags( DefaultConfigFlags );
}
Пример #3
0
void testNotSmallPageAligned64RW(result_t *result, char abort, char quiet){
	int fails = 0;
	int testNr = 0;
	for(testNr=0; testNr<(SMALL_PAGE_SIZE / 8); testNr++){
		write64(S_SANDBOXW + testNr * 8, testNr, 1);
		if(read8(S_SANDBOXR + testNr * 8, testNr, 0, 1)){
			fails++;
			write8(S_SANDBOXW + testNr * 8, testNr, quiet);
			read8(S_SANDBOXR + testNr * 8, testNr, abort, quiet);
		}
		if(fails >= 5){
			printString("Ending test prematurely due to too many failures\n", quiet);
			break;
		}
	}
	result_t localResult;
	localResult.nrFailed = fails;
	localResult.nrTests = testNr + 1;

	addResults(result, &localResult);
}
Пример #4
0
void testNotLargePageAligned2MRW(result_t *result, char abort, char quiet){
	int fails = 0;
	int testNr = 0;

	for(testNr=0; testNr<(LARGE_PAGE_SIZE / MEDIUM_PAGE_SIZE); testNr++){
//		write64(L_SANDBOXW + testNr * MEDIUM_PAGE_SIZE, testNr, 1);
//		if(read8(L_SANDBOXR + testNr * MEDIUM_PAGE_SIZE, testNr, 0, 1)){
//			fails++;
			write8(L_SANDBOXW + testNr * MEDIUM_PAGE_SIZE, testNr, quiet);
			read8(L_SANDBOXR + testNr * MEDIUM_PAGE_SIZE, testNr, abort, quiet);
//		}
		if(fails >= 5){
			printString("Ending test prematurely due to too many failures\n", quiet);
			break;
		}
	}
	result_t localResult;
	localResult.nrFailed = fails;
	localResult.nrTests = testNr + 1;

	addResults(result, &localResult);
}