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: setGL(); break;
        case 1: setPixelmap(); break;
        case 2: refresh(); break;
        case 3: grabFrameBuffer(); break;
        case 4: clearPixmap(); break;
        case 5: about(); break;
        case 6: open(); break;
        case 7: hideDim(); break;
        case 8: ctxMenu((*reinterpret_cast< const QPoint(*)>(_a[1]))); break;
        case 9: dimensionClick((*reinterpret_cast< const QPoint(*)>(_a[1]))); break;
        case 10: marginClick((*reinterpret_cast< const QPoint(*)>(_a[1]))); break;
        case 11: setLinear(); break;
        case 12: setLog(); break;
        case 13: insertDim(); break;
        case 14: brush(); break;
        case 15: reset(); break;
        case 16: finishedDrawing(); break;
        default: ;
        }
        _id -= 17;
    }
    return _id;
}
Ejemplo n.º 2
0
void SIM_PLOT_FRAME::onSignalRClick( wxListEvent& event )
{
    int idx = event.GetIndex();

    if( idx != wxNOT_FOUND )
        m_signals->Select( idx );

    idx = m_signals->GetFirstSelected();

    if( idx != wxNOT_FOUND )
    {
        const wxString& netName = m_signals->GetItemText( idx, 0 );
        SIGNAL_CONTEXT_MENU ctxMenu( netName, this );
        m_signals->PopupMenu( &ctxMenu );
    }
}
Ejemplo n.º 3
0
ImageViewer::ImageViewer(QWidget *parent) : QDialog(parent)
{
    imageLabel = new QLabel;
    imageLabel->setBackgroundRole(QPalette::Base);
    imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    imageLabel->setScaledContents(true);
    imageLabel->setContextMenuPolicy(Qt::CustomContextMenu);

    scrollArea = new QScrollArea;
    scrollArea->setBackgroundRole(QPalette::Dark);
    scrollArea->setWidget(imageLabel);

    QVBoxLayout * mainLayout = new QVBoxLayout;
    mainLayout->addWidget(scrollArea);
    setLayout(mainLayout);

    createActions();
    createMenus();

    connect(imageLabel, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(ctxMenu(QPoint)));
    setWindowTitle(tr("Image Viewer"));
    resize(500, 400);
    setModal(true);
}