void ScreenShoter::createConnects() { //主窗口信号槽***************************************************************** connect(ui->pbtnShot, SIGNAL(clicked()), this, SLOT(grapWindowScreen())); connect(ui->pbtnShotAndMin, SIGNAL(clicked()), this, SLOT(miniWindows())); connect(ui->pbtnMin, SIGNAL(clicked()), this, SLOT(miniWindows())); connect(savePixmap, SIGNAL(triggered()), this, SLOT(saveShotPixmap())); //主窗口信号槽***************************************************************** //托盘信号槽******************************************************************* connect(restore, SIGNAL(triggered()), this, SLOT(restoreWindows())); connect(mini, SIGNAL(triggered()), this, SLOT(miniWindows())); connect(quit, SIGNAL(triggered()), this, SLOT(quitApplication())); //托盘信号槽******************************************************************* }
DebuggerMainWindow::DebuggerMainWindow(MainWindow *pMainWindow) { setWindowIcon(QIcon(":/Resources/icons/debugger.svg")); setWindowTitle(QString(Helper::applicationName).append(" - ").append(Helper::algorithmicDebugger)); mpMainWindow = pMainWindow; // create the GDB adapter instance mpGDBAdapter = new GDBAdapter(this); // create stack frames widget mpStackFramesWidget = new StackFramesWidget(this); // Create stack frames dock widget mpStackFramesDockWidget = new QDockWidget(tr("Stack Frames Browser"), this); mpStackFramesDockWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); mpStackFramesDockWidget->setObjectName("StackFrames"); mpStackFramesDockWidget->setWidget(mpStackFramesWidget); addDockWidget(Qt::TopDockWidgetArea, mpStackFramesDockWidget); // create breakpoints widget mpBreakpointsWidget = new BreakpointsWidget(this); // Create breakpoints dock widget mpBreakpointsDockWidget = new QDockWidget(tr("BreakPoints Browser"), this); mpBreakpointsDockWidget->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); mpBreakpointsDockWidget->setObjectName("BreakPoints"); mpBreakpointsDockWidget->setWidget(mpBreakpointsWidget); addDockWidget(Qt::TopDockWidgetArea, mpBreakpointsDockWidget); // create locals widget mpLocalsWidget = new LocalsWidget(this); // Create locals dock widget mpLocalsDockWidget = new QDockWidget(tr("Locals Browser"), this); mpLocalsDockWidget->setObjectName("Locals"); mpLocalsDockWidget->setWidget(mpLocalsWidget); addDockWidget(Qt::RightDockWidgetArea, mpLocalsDockWidget); setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea); setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea); // Create GDB console widget mpGDBLoggerWidget = new GDBLoggerWidget(this); // Create GDB console dock widget mpGDBLoggerDockWidget = new QDockWidget(tr("Debugger CLI"), this); mpGDBLoggerDockWidget->setObjectName("DebuggerLog"); mpGDBLoggerDockWidget->setWidget(mpGDBLoggerWidget); addDockWidget(Qt::BottomDockWidgetArea, mpGDBLoggerDockWidget); mpGDBLoggerDockWidget->hide(); // Create target output widget mpTargetOutputWidget = new TargetOutputWidget(this); // Create GDB console dock widget mpTargetOutputDockWidget = new QDockWidget(tr("Output Browser"), this); mpTargetOutputDockWidget->setObjectName("OutputBrowser"); mpTargetOutputDockWidget->setWidget(mpTargetOutputWidget); addDockWidget(Qt::BottomDockWidgetArea, mpTargetOutputDockWidget); /* Debugger source code widget */ mpDebuggerSourceEditorFileLabel = new Label; mpDebuggerSourceEditorFileLabel->setObjectName("LabelWithBorder"); mpDebuggerSourceEditorFileLabel->setElideMode(Qt::ElideMiddle); mpDebuggerSourceEditorInfoBar = new InfoBar(this); mpDebuggerSourceEditorInfoBar->hide(); mpDebuggerSourceEditor = new DebuggerSourceEditor(this); ModelicaTextHighlighter *pModelicaTextHighlighter; pModelicaTextHighlighter = new ModelicaTextHighlighter(mpMainWindow->getOptionsDialog()->getModelicaTextEditorPage(), mpDebuggerSourceEditor->getPlainTextEdit()); connect(mpMainWindow->getOptionsDialog(), SIGNAL(modelicaTextSettingsChanged()), pModelicaTextHighlighter, SLOT(settingsChanged())); connect(mpGDBAdapter, SIGNAL(GDBProcessFinished()), SLOT(handleGDBProcessFinished())); QWidget *pCentralWidget = new QWidget; QVBoxLayout *pCentralWidgetVerticalLayout = new QVBoxLayout; pCentralWidgetVerticalLayout->setContentsMargins(0, 0, 0, 0); pCentralWidgetVerticalLayout->setSpacing(0); pCentralWidgetVerticalLayout->addWidget(mpDebuggerSourceEditorFileLabel); pCentralWidgetVerticalLayout->addWidget(mpDebuggerSourceEditorInfoBar); pCentralWidgetVerticalLayout->addWidget(mpDebuggerSourceEditor); pCentralWidget->setLayout(pCentralWidgetVerticalLayout); setCentralWidget(pCentralWidget); /* Create Actions and Menus */ createActions(); createMenus(); /* restore geometry and state. */ restoreWindows(); }