int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: on_start_button_clicked(); break;
        case 1: update_GUI(); break;
        case 2: motion_capture_failed(); break;
        default: ;
        }
        _id -= 3;
    }
    return _id;
}
Пример #2
0
void MainWindowImpl::createActions()
{
    openAction = new QAction(tr("&Open..."), this);
    openAction->setIcon(QIcon(":/images/open.png"));
    openAction->setShortcut(tr("Ctrl+O"));
    openAction->setStatusTip(tr("Open an existing spreadsheet file"));

    startAction = new QAction(tr("&Start..."), this);
    startAction->setIcon(QIcon(":/images/start.png"));
    startAction->setShortcut(tr("Alt+S"));
    startAction->setStatusTip(tr("Start progress"));
    connect(startAction, SIGNAL(triggered()), this, SLOT(on_start_button_clicked()));

    clearAction = new QAction(tr("&Clear..."), this);
    clearAction->setIcon(QIcon(":/images/clear.png"));
    clearAction->setShortcut(tr("Alt+C"));
    clearAction->setStatusTip(tr("Clear state"));
    connect(clearAction, SIGNAL(triggered()), textBrowser, SLOT(clear()));

    exitAction = new QAction(tr("&Exit..."), this);
    exitAction->setIcon(QIcon(":/images/exit.png"));
    exitAction->setShortcut(tr("Ctrl+E"));
    exitAction->setStatusTip(tr("Exit"));
    connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));

    debug_infoAction = new QAction(tr("Show debug info"), this);
    debug_infoAction->setCheckable(true);
    debug_infoAction->setChecked(false);
    debug_infoAction->setStatusTip(tr("Show debug info during progress"));
    connect(debug_infoAction, SIGNAL(toggled(bool)), lab1_1_widget, SLOT(setDegugInfo(bool)));
    connect(debug_infoAction, SIGNAL(toggled(bool)), lab1_2_widget, SLOT(setDegugInfo(bool)));

    aboutAction = new QAction(tr("&About"), this);
    aboutAction->setStatusTip(tr("Show the application's About box"));
    connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));

    aboutQtAction = new QAction(tr("About &Qt"), this);
    aboutQtAction->setStatusTip(tr("Show the Qt library's About box"));
    connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
}