void WizScreenShotWidget::initSelectedMenu() { savePixmapAction = new QAction(tr("Save constituency"), this); cancelAction = new QAction(tr("Reselect"), this); quitAction = new QAction(tr("Quit"), this); contextMenu = new QMenu(this); connect(savePixmapAction, SIGNAL(triggered()), this, SLOT(savePixmap())); connect(cancelAction, SIGNAL(triggered()), this, SLOT(cancelSelectedRect())); connect(quitAction, SIGNAL(triggered()), this, SLOT(quit())); }
void ScreenshotsWidget::initSelectedMenu() { sendPixmapAction = new QAction(tr("发送截图"),this); savePixmapAction = new QAction(tr("保存截图"),this); cancelAction = new QAction(tr("重选"),this); quitAction = new QAction(tr("退出"),this); contextMenu = new QMenu(this); connect(sendPixmapAction,SIGNAL(triggered()),this,SLOT(sendPixmap())); connect(savePixmapAction,SIGNAL(triggered()),this,SLOT(savePixmap())); connect(cancelAction,SIGNAL(triggered()),this,SLOT(cancelSelectedRect())); connect(quitAction,SIGNAL(triggered()),this,SLOT(hide())); }