예제 #1
0
파일: moc_mainwindow.cpp 프로젝트: Qmax/PT6
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_butZoom_clicked(); break;
        case 1: on_yAxisBox_valueChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 2: on_xAxisBox_valueChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 3: on_butExternal_2_clicked(); break;
        case 4: on_tblFrequency_clicked(); break;
        case 5: on_tblImpedance_clicked(); break;
        case 6: on_tblVoltage_clicked(); break;
        case 7: on_butVerify_clicked(); break;
        case 8: on_butLearn_clicked(); break;
        case 9: on_butAM_clicked(); break;
        case 10: on_butProbe2_clicked(); break;
        case 11: on_butProbe1_clicked(); break;
        case 12: shrinkSize((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 13: restoreSize((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 14: on_butR_clicked(); break;
        case 15: on_butM_clicked(); break;
        case 16: on_butL_clicked(); break;
        case 17: on_butDown_clicked(); break;
        case 18: on_butUP_clicked(); break;
        case 19: on_exit_clicked(); break;
        case 20: on_calibButton_clicked(); break;
        case 21: on_deleteButton_clicked(); break;
        case 22: on_storeButton_clicked(); break;
        case 23: on_butProbe_clicked(); break;
        case 24: on_butClip_clicked(); break;
        case 25: on_startButton_clicked(); break;
        case 26: on_butProClip_clicked(); break;
        case 27: on_tblVI_clicked(); break;
        case 28: on_tblVT_clicked(); break;
        case 29: on_butViewTrace_clicked(); break;
        default: ;
        }
        _id -= 30;
    }
    return _id;
}
예제 #2
0
    void OutputWidget::present(MongoShell *shell, const std::vector<MongoShellResult> &results)
    {
        if (_prevResultsCount > 0) {
            clearAllParts();
        }
        int const RESULTS_SIZE = _prevResultsCount = results.size();
        bool const multipleResults = (RESULTS_SIZE > 1);
        
        _outputItemContentWidgets.clear();

        for (int i = 0; i < RESULTS_SIZE; ++i) {
            MongoShellResult shellResult = results[i];

            double secs = shellResult.elapsedMs() / 1000.f;
            ViewMode viewMode = AppRegistry::instance().settingsManager()->viewMode();
            if (_prevViewModes.size()) {
                viewMode = _prevViewModes.back();
                _prevViewModes.pop_back();
            }

            bool const firstItem = (0 == i);
            bool const lastItem = (RESULTS_SIZE-1 == i);

            OutputItemContentWidget* item = nullptr;
            if (shellResult.documents().size() > 0) {
                item = new OutputItemContentWidget(viewMode, shell, QtUtils::toQString(shellResult.type()),
                                                   shellResult.documents(), shellResult.queryInfo(), secs, 
                                                   multipleResults, firstItem, lastItem, 
                                                   shellResult.aggrInfo(), this);
            } else {
                item = new OutputItemContentWidget(viewMode, shell, QtUtils::toQString(shellResult.response()), 
                                                   secs, multipleResults, firstItem, lastItem, 
                                                   shellResult.aggrInfo(), this);
            }
            VERIFY(connect(item, SIGNAL(maximizedPart()), this, SLOT(maximizePart())));
            VERIFY(connect(item, SIGNAL(restoredSize()), this, SLOT(restoreSize())));
            _splitter->addWidget(item);
            _outputItemContentWidgets.push_back(item);
        }
        
        tryToMakeAllPartsEqualInSize();
    }