Ejemplo n.º 1
0
void FontSelectFrame::setConfig(FontConfig* config, bool isFirst = false) {
    m_config = 0;
    if (config) {
        bool b = config->blockSignals(true);
        if (!config->path().isEmpty() && isFirst)
            setFontsDirectory(config->path());
        else if(!m_database.isEmpty()) {
            ui->comboBoxFamily->setCurrentIndex(0);
        }
        if (!config->filename().isEmpty())
            selectFile(config->filename(),config->faceIndex());
        else if (!m_database.isEmpty()) {
            const FontDef& def = m_database.constBegin()->front();
            selectFile(def.file,def.face);
            config->setFilename(def.file);
        }
        if (config->size()==0)
            config->setSize(ui->comboBoxSize->itemText(0).toInt());
        if (config->size())
            selectSize(config->size());

        config->setFamily(ui->comboBoxFamily->itemText(ui->comboBoxFamily->currentIndex()));
        config->setStyle(ui->comboBoxStyle->itemText(ui->comboBoxStyle->currentIndex()));

        config->blockSignals(b);
        m_config = config;
    }

}
Ejemplo n.º 2
0
void loop() {


// clears the screen and select font size and style
  char instr1[] = {
    clearScreen(),
    defaultSize(),
    selectSize(), // tall
    selectSize(), // wide
    selectSize(), // big
    textStyle(),
    NULL
  };
  const char message[] = "Hi GLO!";
  Serial1.print(instr1);
  // print message according to prior instructions
  Serial1.print(message);
}
Ejemplo n.º 3
0
void menu5()
{
    system("cls");
    printf("\n Choisisez le parametre d'affichage selectif:\n");
    printf("\n 1. ID\n");
    printf("\n 2. Nom de l'application\n");
    printf("\n 3. Nom de developpeur\n");
    printf("\n 4. Rating\n");
    printf("\n 5. Taille\n");
    printf("\n\n ");
    loadData();
    int k,mini,maxi;
    float minf,maxf;
    char choice[20];
    scanf("%d",&k);
    printf("\n");
    switch (k)
    {
    case 1:
        printf("\n Donnez le minimum et le maximum de l'ID:\n");
        scanf("%d%d",&mini,&maxi);
        selectID(mini,maxi);
        break;
    case 2:
        printf("\n Donnez le nom de l'application:\n");
        scanf("%s",choice);
        selectNom(choice);
        break;
    case 3:
        printf("\n Donnez le nom de developeur:\n");
        scanf("%s",choice);
        selectDev(choice);
        break;
    case 4:
        printf("\n Donnez le minimum et le maximum de rating:\n");
        scanf("%f%f",&minf,&maxf);
        selectRat(minf,maxf);
        break;
    case 5:
        printf("\n Donnez le minimum et le maximum de taille:\n");
        scanf("%f%f",&minf,&maxf);
        selectSize(minf,maxf);
        break;
       default: printf("Erreur. Revenez au menu principal.");
    }
    getch();
    menu();
}
Ejemplo n.º 4
0
bool
canCaseBeSkipped(const TestParams *params, bool isComplex)
{
    size_t s;
    size_t m, n, k, lda, ldb, ldc;
    int bigCnt = 0;
    unsigned int vecLen;

    // skip cases with conjugated transposition for real data
    if (isRealConjugation(params, isComplex)) {
        return true;
    }

    // set of cases for extended versions is really tiny, so enable them all
    if (params->offA || params->offBX || params->offCY) {
        return false;
    }

    s = nonZeroSize(params->M, params->N, params->K);
    m = selectSize(params->M, s);
    n = selectSize(params->N, s);
    k = selectSize(params->K, s);

    // enable BigLDA cases when problem dimensions all are equal to each other
    s = nonZeroSize(params->lda, params->ldb, params->ldc);
    lda = selectSize(params->lda, s);
    ldb = selectSize(params->ldb, s);
    ldc = selectSize(params->ldc, s);
    bigCnt += static_cast<int>(!isEquToAny(lda, m, n, k));
    bigCnt += static_cast<int>(!isEquToAny(ldb, m, n, k));
    bigCnt += static_cast<int>(!isEquToAny(ldc, m, n, k));
    if (bigCnt) {
        if (sizeEquCount(m, n, k) < 3) {
            return true;
        }
        else {
            return false;
        }
    }

    // enable only cases at which buffers will have the same vectorization
    vecLen = prognozedVecLen(lda);
    if ((prognozedVecLen(ldb) != vecLen) ||
        (prognozedVecLen(ldc) != vecLen)) {

        return true;
    }

    return false;
}
Ejemplo n.º 5
0
bool
canCaseBeSkipped(const TestParams *params, bool isComplex)
{
    size_t s;
    size_t m, n, k, lda, ldb, ldc;

    // skip cases with conjugated transposition for real data
    if (isRealConjugation(params, isComplex)) {
        return true;
    }

    /*
     * Enable only cases at which all the problem dimensions are equal
     * to each other
     */
    s = nonZeroSize(params->M, params->N, params->K);
    m = selectSize(params->M, s);
    n = selectSize(params->N, s);
    k = selectSize(params->K, s);
    if (sizeEquCount(m, n, k) < 3) {
        return true;
    }

    /*
     * filter BigLDA cases
     */
    s = nonZeroSize(params->lda, params->ldb, params->ldc);
    lda = selectSize(params->lda, s);
    ldb = selectSize(params->ldb, s);
    ldc = selectSize(params->ldc, s);
    if (sizeEquCount(lda, ldb, ldc) < 3) {
        return true;
    }
    if (!isEquToAny(lda, m, n, k)) {
        return true;
    }

    return false;
}