Ejemplo n.º 1
0
Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
    Potencial *potencial = new Potencial();
    connect(potencial, SIGNAL(signalNumberOfSample(int,QVector<double>)),
            &samples, SIGNAL(signalRecognizedIndex(int,QVector<double>)));
    connect(&samples, SIGNAL(signalSamples(QVector<QVector<QLabel*> >)),
            potencial,SLOT(slotSetSamples(QVector<QVector<QLabel*> >)));

    connect(&plot, SIGNAL(pattern(QImage)), potencial, SLOT(slotSetPattern(QImage)));
    connect(&plot, SIGNAL(recogrize()), potencial, SLOT(recognize()));

    QHBoxLayout *hl = new QHBoxLayout;
    hl->addStretch();
    hl->addWidget(&plot);
    hl->addStretch();

    QVBoxLayout *l = new QVBoxLayout;
    l->addLayout(hl);
    l->addWidget(&charset);
    l->addWidget(&samples);
    setLayout(l);

    connect(&charset, SIGNAL(updateCharset(QString)), &samples, SLOT(slotUpdateSamples(QString)));

    setMinimumSize(800,600);

    charset.setText("iDKfA");
}
Ejemplo n.º 2
0
CharsetWidget::CharsetWidget(QWidget *parent) :
    QWidget(parent)
{
    QHBoxLayout *l = new QHBoxLayout();
    l->addWidget(new QLabel(trUtf8("Chars to recognition: ")));
    l->addWidget(&charset);
    setLayout(l);

    connect(&charset, SIGNAL(textChanged(QString)), this, SIGNAL(updateCharset(QString)));
}
Ejemplo n.º 3
0
void XlinkPreview::install()
{
    updateScreen(":/c64-screen.bin");
    updateCharset();
    updateColorProperties();
}