Example #1
0
TranscodeDialog::TranscodeDialog(const QString& message, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::TranscodeDialog),
    m_format(1),
    m_isChecked(false)
{
    ui->setupUi(this);
    setWindowTitle(tr("Convert to Edit-friendly..."));
    ui->messageLabel->setText(message);
    ui->checkBox->hide();
    on_horizontalSlider_valueChanged(1);
}
Example #2
0
int testSPI::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: on_pushButton_clicked(); break;
        case 1: on_SelectADC_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 2: on_testFileLoad_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 3: on_testFile_clicked(); break;
        case 4: on_horizontalSlider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 5: on_DCVolt_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 6: on_ReadAll_clicked(); break;
        case 7: on_Reset_clicked(); break;
        case 8: on_SelectApp_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 9: on_AppWrite_clicked(); break;
        case 10: on_AppRead_clicked(); break;
        case 11: on_SelectPart_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 12: on_SelectMode_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 13: on_Exit_clicked(); break;
        case 14: on_SelectSPI_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 15: on_SelectOperation_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 16: on_Execute_clicked(); break;
        case 17: receiveValue((*reinterpret_cast< uint(*)>(_a[1]))); break;
        case 18: receiveValue((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 19: receiveValue((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 20: callAddressEdit(); break;
        case 21: callDataEdit(); break;
        case 22: callAppAddressEdit(); break;
        case 23: callAppDataEdit(); break;
        case 24: callMaskDataEdit(); break;
        case 25: callSPIClockEdit(); break;
        case 26: callDMMAddrEdit(); break;
        case 27: callAvgEdit(); break;
        case 28: ADCRead(); break;
        default: ;
        }
        _id -= 29;
    }
    return _id;
}
Example #3
0
void WidgetStrainVideo::load(const QString &path, const QString &filename)
{
    currentIndex = 0;
    QString fullPath = path + QDir::separator() + filename;
    QString fullMetadataPath = fullPath + "_metadata";
    currentFilename = filename;

    QProgressDialog progDlg("Loading video", QString(), 0, 500, this);
    progDlg.setWindowModality(Qt::WindowModal);
    progDlg.setMinimumDuration(100);
    VideoDataClip *loadedClip = new VideoDataClip(fullPath, fullMetadataPath, &progDlg);
    setClip(loadedClip);

    QPixmap image = UIUtils::Mat8ToQPixmap(clip->frames[0]);
    ui->widgetResult->setImage(image);

    shapes.clear();
    deserializeShapes(path);
    qDebug() << "shapes loaded";
    ui->horizontalSlider->setValue(0);
    on_horizontalSlider_valueChanged(0);
}
Example #4
0
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
    finishing = false;

    thread = NULL;
    client = NULL;
    recorder = NULL;

    label1 = new QLabel(this);
    edit1 = new QLineEdit(this);
    edit1->setMinimumWidth(100);
    label1->setText("Host:");
    edit1->setText("localhost");

    label2 = new QLabel(this);
    edit2 = new QLineEdit(this);
    edit2->setMinimumWidth(100);
    label2->setText("Port:");
    edit2->setText("1024");

    label3 = new QLabel(this);
    edit3 = new QLineEdit(this);
    edit3->setMinimumWidth(100);
    label3->setText("Buffer time (ms):");
    edit3->setText("300");

    checkbox = new QCheckBox(this);
    checkbox->setText("Record");

    label4 = new QLabel(this);
    slider = new QSlider(Qt::Horizontal, this);
    slider->setRange(0, 100);
    slider->setValue(100);

    button = new QPushButton(this);
    button->setText("Connect");

    levelwidget = new LevelWidget(this);
    levelwidget->setFixedWidth(20);

    QWidget *widget = new QWidget(this);
    QGridLayout *layout = new QGridLayout(widget);

    connect(slider, &QSlider::valueChanged, this, &MainWindow::on_horizontalSlider_valueChanged);
    connect(checkbox, &QCheckBox::clicked, this, &MainWindow::on_checkBox_clicked);
    connect(button, &QPushButton::clicked, this, &MainWindow::on_pushButton_clicked);

    QGridLayout *layout1 = new QGridLayout();
    layout1->addWidget(label1, 0, 0);
    layout1->addWidget(edit1, 0, 1);
    layout1->addWidget(label2, 1, 0);
    layout1->addWidget(edit2, 1, 1);
    layout1->addWidget(label3, 2, 0);
    layout1->addWidget(edit3, 2, 1);
    layout->addLayout(layout1, 0, 0);
    layout->addWidget(checkbox, 2, 0);
    layout->addWidget(label4, 3, 0, 1, 2);
    layout->addWidget(slider, 4, 0, 1, 2);
    QSpacerItem *spacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
    QGridLayout *layout3 = new QGridLayout();
    layout3->addItem(spacer, 0, 0);
    layout3->addWidget(button, 0, 1);
    layout->addLayout(layout3, 5, 0, 1, 2);
    layout->addWidget(levelwidget, 0, 2, 6, 1);

    on_horizontalSlider_valueChanged(100);

    setCentralWidget(widget);

    setFixedSize(minimumSizeHint());

    QMetaObject::invokeMethod(this, "level", Qt::QueuedConnection, Q_ARG(float, 0));
}