MdiContainerWidgetTaskMenu::MdiContainerWidgetTaskMenu(QWorkspace *m, QObject *parent) : ContainerWidgetTaskMenu(m, MdiContainer, parent) { initializeActions(); connect(m_nextAction, SIGNAL(triggered()), m, SLOT(activateNextWindow())); connect(m_previousAction, SIGNAL(triggered()), m, SLOT(activatePreviousWindow())); connect(m_tileAction, SIGNAL(triggered()),m , SLOT(tile())); connect(m_cascadeAction, SIGNAL(triggered()), m, SLOT(cascade())); }
bool QWorkspace::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: cascade(); break; case 1: tile(); break; case 2: closeActiveWindow(); break; case 3: closeAllWindows(); break; case 4: activateNextWindow(); break; case 5: activatePrevWindow(); break; case 6: normalizeActiveWindow(); break; case 7: minimizeActiveWindow(); break; case 8: showOperationMenu(); break; case 9: popupOperationMenu((const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+1))); break; case 10: operationMenuActivated((int)static_QUType_int.get(_o+1)); break; case 11: operationMenuAboutToShow(); break; case 12: toolMenuAboutToShow(); break; case 13: activatePreviousWindow(); break; case 14: dockWindowsShow(); break; case 15: scrollBarChanged(); break; default: return QWidget::qt_invoke( _id, _o ); } return TRUE; }
void MainWindow::createActions() { openAction = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this); openAction->setShortcut(tr("Ctrl+O")); openAction->setStatusTip(tr("Open an existing file")); connect(openAction, SIGNAL(triggered()), this, SLOT(open())); saveAction = new QAction(QIcon(":/images/save.png"), tr("&Save"), this); saveAction->setShortcut(tr("Ctrl+S")); saveAction->setStatusTip(tr("Save the file to disk")); connect(saveAction, SIGNAL(triggered()), this, SLOT(save())); saveAsAction = new QAction(tr("Save &As..."), this); saveAsAction->setStatusTip(tr("Save the file under a new name")); connect(saveAsAction, SIGNAL(triggered()), this, SLOT(saveAs())); exitAction = new QAction(tr("E&xit"), this); exitAction->setShortcut(tr("Ctrl+Q")); exitAction->setStatusTip(tr("Exit the application")); connect(exitAction, SIGNAL(triggered()), this, SLOT(close())); closeAction = new QAction(tr("Cl&ose"), this); closeAction->setShortcut(tr("Ctrl+F4")); closeAction->setStatusTip(tr("Close the active window")); connect(closeAction, SIGNAL(triggered()), workspace, SLOT(closeActiveWindow())); closeAllAction = new QAction(tr("Close &All"), this); closeAllAction->setStatusTip(tr("Close all windows")); connect(closeAllAction, SIGNAL(triggered()), workspace, SLOT(closeAllWindows())); tileAction = new QAction(tr("&Tile"), this); tileAction->setStatusTip(tr("Tile the windows")); connect(tileAction, SIGNAL(triggered()), workspace, SLOT(tile())); cascadeAction = new QAction(tr("&Cascade"), this); cascadeAction->setStatusTip(tr("Cascade the windows")); connect(cascadeAction, SIGNAL(triggered()), workspace, SLOT(cascade())); nextAction = new QAction(tr("Ne&xt"), this); nextAction->setShortcut(tr("Ctrl+F6")); nextAction->setStatusTip(tr("Move the focus to the next window")); connect(nextAction, SIGNAL(triggered()), workspace, SLOT(activateNextWindow())); previousAction = new QAction(tr("Pre&vious"), this); previousAction->setShortcut(tr("Ctrl+Shift+F6")); previousAction->setStatusTip(tr("Move the focus to the previous " "window")); connect(previousAction, SIGNAL(triggered()), workspace, SLOT(activatePreviousWindow())); separatorAction = new QAction(this); separatorAction->setSeparator(true); aboutAction = new QAction(tr("&About"), this); aboutAction->setStatusTip(tr("Show the application's About box")); connect(aboutAction, SIGNAL(triggered()), this, SLOT(about())); powerSpectrumFFTAction = new QAction(tr("Power spectrum with &FFT"), this); powerSpectrumFFTAction->setIcon(QIcon(":/images/fft.png")); powerSpectrumFFTAction->setShortcut(tr("Ctrl+F")); powerSpectrumFFTAction->setStatusTip(tr("Get power spectrum using FFT")); connect(powerSpectrumFFTAction, SIGNAL(triggered()), this, SLOT(getPowerSpectrumUsingFFT())); powerSpectrumDCTAction = new QAction(tr("Power spectrum with &DCT"), this); powerSpectrumDCTAction->setIcon(QIcon(":/images/dct.png")); powerSpectrumDCTAction->setShortcut(tr("Ctrl+D")); powerSpectrumDCTAction->setStatusTip(tr("Get power spectrum using DCT")); connect(powerSpectrumDCTAction, SIGNAL(triggered()), this, SLOT(getPowerSpectrumUsingDCT())); linearConvolutionFFTAction = new QAction(tr("Convolution using FFT"), this); linearConvolutionFFTAction->setIcon(QIcon(":/images/cfft.png")); linearConvolutionFFTAction->setShortcut(tr("Ctrl+L")); linearConvolutionFFTAction->setStatusTip(tr("Convolution using FFT")); connect(linearConvolutionFFTAction, SIGNAL(triggered()), this, SLOT(convolutionFFTDialog())); linearConvolutionDCTAction = new QAction(tr("Convolution using DCT"), this); linearConvolutionDCTAction->setIcon(QIcon(":/images/cdct.png")); linearConvolutionDCTAction->setShortcut(tr("Ctrl+K")); linearConvolutionDCTAction->setStatusTip(tr("Convolution using DCT")); connect(linearConvolutionDCTAction, SIGNAL(triggered()), this, SLOT(convolutionDCTDialog())); windowActionGroup = new QActionGroup(this); }