void Grabber::createActions() { renderIntoPixmapAct = new QAction(tr("&Render into Pixmap..."), this); renderIntoPixmapAct->setShortcut(tr("Ctrl+R")); connect(renderIntoPixmapAct, SIGNAL(triggered()), this, SLOT(renderIntoPixmap())); grabFrameBufferAct = new QAction(tr("&Grab Frame Buffer"), this); grabFrameBufferAct->setShortcut(tr("Ctrl+G")); connect(grabFrameBufferAct, SIGNAL(triggered()), this, SLOT(grabFrameBuffer())); clearPixmapAct = new QAction(tr("&Clear Pixmap"), this); clearPixmapAct->setShortcut(tr("Ctrl+L")); connect(clearPixmapAct, SIGNAL(triggered()), this, SLOT(clearPixmap())); exitAct = new QAction(tr("Close"), this); exitAct->setShortcuts(QKeySequence::Quit); connect(exitAct, SIGNAL(triggered()), this, SLOT(actionClose())); aboutAct = new QAction(tr("&About"), this); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); aboutQtAct = new QAction(tr("About &CopperSpice"), this); connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt())); }
Style_Edit::Style_Edit(QWidget *parent, QWidget *dwFrom) : QDialog(parent), ui(new Ui::Style_Edit) { ui->setupUi(this); m_dwFrom = dwFrom; QRegExp regExp(".(.*)\\+?Style"); QString defaultStyle = QApplication::style()->metaObject()->className(); if (regExp.exactMatch(defaultStyle)) { defaultStyle = regExp.cap(1); } // 1 ui->styleCombo->addItems(QStyleFactory::keys()); ui->styleCombo->setCurrentIndex(ui->styleCombo->findText(defaultStyle, Qt::MatchContains)); // 2 ui->styleSheetCombo->setCurrentIndex(ui->styleSheetCombo->findText(Style_Edit::qssName)); QString styleSheet = this->readStyleSheet(Style_Edit::qssName); ui->styleTextEdit->setPlainText(styleSheet); ui->applyPB->setEnabled(false); // signal connect(ui->closePB, SIGNAL(clicked()), this, SLOT(actionClose())); }
void Svg_View::setupGui() { m_textEdit = new QTextEdit; m_textEdit->setFontPointSize(12.0); m_textEdit->setText("Select image in Combo Box. . . "); // * m_fileNameLabel = new QLabel(tr("SVG File Name:")); QFont font = m_fileNameLabel->font(); font.setPointSize(10); m_fileNameLabel->setFont(font); m_fileNameCombo = new QComboBox; font = m_fileNameCombo->font(); font.setPointSize(10); m_fileNameCombo->setFont(font); m_fileNameCombo->insertItem(0, ":/resources/pineapple.svg"); m_fileNameCombo->insertItem(1, ":/resources/watermelon.svg"); m_fileNameCombo->insertItem(2, ":/resources/cake1.svg"); m_fileNameCombo->insertItem(3, ":/resources/cake2.svg"); m_fileNameCombo->insertItem(4, ":/resources/cup_cake.svg"); m_fileNameCombo->insertItem(5, ":/resources/ice_cream.svg"); // * m_insertSVG_PB = new QPushButton(tr("Insert Image")); m_insertSVG_PB->setFont(font); QPushButton *close_PB = new QPushButton(tr("Close")); close_PB->setFont(font); QHBoxLayout *bottomLayout1 = new QHBoxLayout; bottomLayout1->addWidget(m_fileNameLabel); bottomLayout1->addWidget(m_fileNameCombo); bottomLayout1->addStretch(); QHBoxLayout *bottomLayout2 = new QHBoxLayout; bottomLayout2->addStretch(); bottomLayout2->addWidget(m_insertSVG_PB); bottomLayout2->addSpacing(8); bottomLayout2->addWidget(close_PB); bottomLayout2->addStretch(); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(m_textEdit); mainLayout->addSpacing(5); mainLayout->addLayout(bottomLayout1); mainLayout->addSpacing(5); mainLayout->addLayout(bottomLayout2); mainLayout->setContentsMargins(14,14,14,9); setLayout(mainLayout); // signals connect(m_insertSVG_PB, SIGNAL(clicked()), this, SLOT(insertTextObject())); connect(close_PB, SIGNAL(clicked()), this, SLOT(actionClose())); }
void Html_Viewer::createActions() { // 1 QMenu *fileMenu = menuBar()->addMenu(tr("&File")); QAction *openAct = new QAction(tr("&Open..."), this); openAct->setShortcuts(QKeySequence::Open); openAct->setStatusTip(tr("Open an existing HTML file")); connect(openAct, SIGNAL(triggered()), this, SLOT(open())); fileMenu->addAction(openAct); QAction *openUrlAct = new QAction(tr("&Open URL..."), this); openUrlAct->setShortcut(tr("Ctrl+U")); openUrlAct->setStatusTip(tr("Open a URL")); connect(openUrlAct, SIGNAL(triggered()), this, SLOT(openUrl())); fileMenu->addAction(openUrlAct); QAction *saveAct = new QAction(tr("&Save"), this); saveAct->setShortcuts(QKeySequence::Save); saveAct->setStatusTip(tr("Save the HTML file to disk")); connect(saveAct, SIGNAL(triggered()), this, SLOT(save())); fileMenu->addAction(saveAct); fileMenu->addSeparator(); QAction *exitAct = new QAction(tr("E&xit"), this); exitAct->setStatusTip(tr("Exit Viewer")); exitAct->setShortcuts(QKeySequence::Quit); connect(exitAct, SIGNAL(triggered()), this, SLOT(actionClose())); fileMenu->addAction(exitAct); menuBar()->addSeparator(); // 2 QMenu *helpMenu = menuBar()->addMenu(tr("&Help")); QAction *aboutAct = new QAction(tr("&About"), this); aboutAct->setStatusTip(tr("Show the About box")); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); helpMenu->addAction(aboutAct); }
SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) : QMainWindow(parent) , fCentralSplitter(this) , fStatusBar(this) , fToolBar(this) , fActionOpen(this) , fActionBreakpoint(this) , fActionToggleIndexStyle(this) , fActionProfile(this) , fActionCancel(this) , fActionClearBreakpoints(this) , fActionClearDeletes(this) , fActionClose(this) , fActionCreateBreakpoint(this) , fActionDelete(this) , fActionDirectory(this) , fActionGoToLine(this) , fActionInspector(this) , fActionSettings(this) , fActionPlay(this) , fActionPause(this) , fActionRewind(this) , fActionSave(this) , fActionSaveAs(this) , fActionShowDeletes(this) , fActionStepBack(this) , fActionStepForward(this) , fActionZoomIn(this) , fActionZoomOut(this) , fMapper(this) , fListWidget(&fCentralSplitter) , fDirectoryWidget(&fCentralSplitter) , fCanvasWidget(this, &fDebugger) , fImageWidget(&fDebugger) , fMenuBar(this) , fMenuFile(this) , fMenuNavigate(this) , fMenuView(this) , fBreakpointsActivated(false) , fIndexStyleToggle(false) , fDeletesActivated(false) , fPause(false) , fLoading(false) { setupUi(this); fListWidget.setSelectionMode(QAbstractItemView::ExtendedSelection); connect(&fListWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(registerListClick(QListWidgetItem *))); connect(&fActionOpen, SIGNAL(triggered()), this, SLOT(openFile())); connect(&fActionDirectory, SIGNAL(triggered()), this, SLOT(toggleDirectory())); connect(&fDirectoryWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(loadFile(QListWidgetItem *))); connect(&fActionDelete, SIGNAL(triggered()), this, SLOT(actionDelete())); connect(&fListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(toggleBreakpoint())); connect(&fActionRewind, SIGNAL(triggered()), this, SLOT(actionRewind())); connect(&fActionPlay, SIGNAL(triggered()), this, SLOT(actionPlay())); connect(&fActionStepBack, SIGNAL(triggered()), this, SLOT(actionStepBack())); connect(&fActionStepForward, SIGNAL(triggered()), this, SLOT(actionStepForward())); connect(&fActionBreakpoint, SIGNAL(triggered()), this, SLOT(actionBreakpoints())); connect(&fActionToggleIndexStyle, SIGNAL(triggered()), this, SLOT(actionToggleIndexStyle())); connect(&fActionInspector, SIGNAL(triggered()), this, SLOT(actionInspector())); connect(&fActionSettings, SIGNAL(triggered()), this, SLOT(actionSettings())); connect(&fFilter, SIGNAL(activated(QString)), this, SLOT(toggleFilter(QString))); connect(&fActionProfile, SIGNAL(triggered()), this, SLOT(actionProfile())); connect(&fActionCancel, SIGNAL(triggered()), this, SLOT(actionCancel())); connect(&fActionClearBreakpoints, SIGNAL(triggered()), this, SLOT(actionClearBreakpoints())); connect(&fActionClearDeletes, SIGNAL(triggered()), this, SLOT(actionClearDeletes())); connect(&fActionClose, SIGNAL(triggered()), this, SLOT(actionClose())); connect(&fSettingsWidget, SIGNAL(visibilityFilterChanged()), this, SLOT(actionCommandFilter())); #if SK_SUPPORT_GPU connect(&fSettingsWidget, SIGNAL(glSettingsChanged()), this, SLOT(actionGLWidget())); #endif connect(&fSettingsWidget, SIGNAL(texFilterSettingsChanged()), this, SLOT(actionTextureFilter())); connect(fSettingsWidget.getRasterCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionRasterWidget(bool))); connect(fSettingsWidget.getOverdrawVizCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionOverdrawVizWidget(bool))); connect(fSettingsWidget.getMegaVizCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionMegaVizWidget(bool))); connect(fSettingsWidget.getPathOpsCheckBox(), SIGNAL(toggled(bool)), this, SLOT(actionPathOpsWidget(bool))); connect(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool))); connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBreakpoint())); connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes())); connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(selectCommand(int))); connect(&fCanvasWidget, SIGNAL(hitChanged(int)), &fSettingsWidget, SLOT(updateHit(int))); connect(&fCanvasWidget, SIGNAL(scaleFactorChanged(float)), this, SLOT(actionScale(float))); connect(&fCanvasWidget, SIGNAL(commandChanged(int)), &fSettingsWidget, SLOT(updateCommand(int))); connect(&fActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); connect(&fActionSave, SIGNAL(triggered()), this, SLOT(actionSave())); fMapper.setMapping(&fActionZoomIn, SkCanvasWidget::kIn_ZoomCommand); fMapper.setMapping(&fActionZoomOut, SkCanvasWidget::kOut_ZoomCommand); connect(&fActionZoomIn, SIGNAL(triggered()), &fMapper, SLOT(map())); connect(&fActionZoomOut, SIGNAL(triggered()), &fMapper, SLOT(map())); connect(&fMapper, SIGNAL(mapped(int)), &fCanvasWidget, SLOT(zoom(int))); fInspectorWidget.setDisabled(true); fMenuEdit.setDisabled(true); fMenuNavigate.setDisabled(true); fMenuView.setDisabled(true); SkGraphics::Init(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_ui(new Ui::MainWindow), m_materialDock(new MaterialDock(this)), m_transformDock(new TransformDock(this)), m_meshDock(new MeshDock(this)), m_textureDialog(new TextureDialog(this)), m_UVEditor(new UVEditor(this)), m_settings(new QSettings(this)), m_shaderSignalMapper(new QSignalMapper(this)), m_actionEnableUserShaders(nullptr), m_actionLocateUserShaders(nullptr), m_actionReloadUserShaders(nullptr) { m_ui->setupUi(this); m_pathImport = m_settings->value(WMIT_SETTINGS_IMPORTVAL, QDir::currentPath()).toString(); m_pathExport = m_settings->value(WMIT_SETTINGS_EXPORTVAL, QDir::currentPath()).toString(); m_materialDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); m_materialDock->hide(); m_transformDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); m_transformDock->hide(); m_meshDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); m_meshDock->hide(); m_UVEditor->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); m_UVEditor->hide(); addDockWidget(Qt::RightDockWidgetArea, m_materialDock, Qt::Horizontal); addDockWidget(Qt::RightDockWidgetArea, m_transformDock, Qt::Horizontal); addDockWidget(Qt::RightDockWidgetArea, m_meshDock, Qt::Horizontal); addDockWidget(Qt::LeftDockWidgetArea, m_UVEditor, Qt::Horizontal); // UI is ready and now we can load window previous state (will do nothing if state wasn't saved). // 3DView specifics are loaded later on viewerInitialized event resize(QSettings().value("Window/size", size()).toSize()); move(QSettings().value("Window/position", pos()).toPoint()); restoreState(QSettings().value("Window/state", QByteArray()).toByteArray()); m_ui->actionOpen->setIcon(QIcon::fromTheme("document-open", style()->standardIcon(QStyle::SP_DirOpenIcon))); m_ui->menuOpenRecent->setIcon(QIcon::fromTheme("document-open-recent")); m_ui->actionClearRecentFiles->setIcon(QIcon::fromTheme("edit-clear-list")); m_ui->actionSave->setIcon(QIcon::fromTheme("document-save", style()->standardIcon(QStyle::SP_DialogSaveButton))); m_ui->actionSaveAs->setIcon(QIcon::fromTheme("document-save-as")); m_ui->actionClose->setIcon(QIcon::fromTheme("window-close")); m_ui->actionExit->setIcon(QIcon::fromTheme("application-exit", style()->standardIcon(QStyle::SP_DialogCloseButton))); m_ui->actionAboutApplication->setIcon(QIcon::fromTheme("help-about")); connect(m_ui->centralWidget, SIGNAL(viewerInitialized()), this, SLOT(viewerInitialized())); connect(m_ui->menuFile, SIGNAL(aboutToShow()), this, SLOT(updateRecentFilesMenu())); connect(m_ui->actionOpen, SIGNAL(triggered()), this, SLOT(actionOpen())); connect(m_ui->menuOpenRecent, SIGNAL(triggered(QAction*)), this, SLOT(actionOpenRecent(QAction*))); connect(m_ui->actionClearRecentFiles, SIGNAL(triggered()), this, SLOT(actionClearRecentFiles())); connect(m_ui->actionClear_Missing_Files, SIGNAL(triggered()), this, SLOT(actionClearMissingFiles())); connect(m_ui->actionSave, SIGNAL(triggered()), this, SLOT(actionSave())); connect(m_ui->actionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); connect(m_ui->actionClose, SIGNAL(triggered()), this, SLOT(actionClose())); connect(m_ui->actionUVEditor, SIGNAL(toggled(bool)), m_UVEditor, SLOT(setVisible(bool))); connect(m_ui->actionSetupTextures, SIGNAL(triggered()), this, SLOT(actionSetupTextures())); connect(m_ui->actionAppendModel, SIGNAL(triggered()), this, SLOT(actionAppendModel())); connect(m_ui->actionImport_Animation, SIGNAL(triggered()), this, SLOT(actionImport_Animation())); connect(m_ui->actionImport_Connectors, SIGNAL(triggered()), this, SLOT(actionImport_Connectors())); connect(m_ui->actionShowAxes, SIGNAL(toggled(bool)), m_ui->centralWidget, SLOT(setAxisIsDrawn(bool))); connect(m_ui->actionShowGrid, SIGNAL(toggled(bool)), m_ui->centralWidget, SLOT(setGridIsDrawn(bool))); connect(m_ui->actionShowLightSource, SIGNAL(toggled(bool)), m_ui->centralWidget, SLOT(setDrawLightSource(bool))); connect(m_ui->actionLink_Light_Source_To_Camera, SIGNAL(toggled(bool)), m_ui->centralWidget, SLOT(setLinkLightToCamera(bool))); connect(m_ui->actionAnimate, SIGNAL(toggled(bool)), m_ui->centralWidget, SLOT(setAnimateState(bool))); connect(m_ui->actionAboutQt, SIGNAL(triggered()), QApplication::instance(), SLOT(aboutQt())); connect(m_ui->actionSetTeamColor, SIGNAL(triggered()), this, SLOT(actionSetTeamColor())); /// Material dock m_materialDock->toggleViewAction()->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M)); m_ui->menuModel->insertAction(m_ui->menuModel->actions().value(0) ,m_materialDock->toggleViewAction()); connect(m_materialDock, SIGNAL(materialChanged(WZMaterial)), this, SLOT(materialChangedFromUI(WZMaterial))); /// Transform dock m_transformDock->toggleViewAction()->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_T)); m_ui->menuModel->insertAction(m_ui->menuModel->actions().value(0) ,m_transformDock->toggleViewAction()); // transformations connect(m_transformDock, SIGNAL(scaleXYZChanged(double)), this, SLOT(scaleXYZChanged(double))); connect(m_transformDock, SIGNAL(scaleXChanged(double)), this, SLOT(scaleXChanged(double))); connect(m_transformDock, SIGNAL(scaleYChanged(double)), this, SLOT(scaleYChanged(double))); connect(m_transformDock, SIGNAL(scaleZChanged(double)), this, SLOT(scaleZChanged(double))); connect(m_transformDock, SIGNAL(reverseWindings()), this, SLOT(reverseWindings())); connect(m_transformDock, SIGNAL(flipNormals()), this, SLOT(flipNormals())); connect(m_transformDock, SIGNAL(applyTransformations()), &m_model, SLOT(applyTransformations())); connect(m_transformDock, SIGNAL(changeActiveMesh(int)), &m_model, SLOT(setActiveMesh(int))); connect(m_transformDock, SIGNAL(recalculateTB()), &m_model, SLOT(slotRecalculateTB())); connect(m_transformDock, SIGNAL(removeMesh()), this, SLOT(removeMesh())); connect(m_transformDock, SIGNAL(mirrorAxis(int)), this, SLOT(mirrorAxis(int))); connect(m_transformDock, SIGNAL(centerMesh(int)), this, SLOT(centerMesh(int))); connect(&m_model, SIGNAL(meshCountChanged(int,QStringList)), m_transformDock, SLOT(setMeshCount(int,QStringList))); /// Mesh dock m_meshDock->toggleViewAction()->setShortcut(QKeySequence(Qt::Key_M)); m_ui->menuModel->insertAction(m_ui->menuModel->actions().value(0), m_meshDock->toggleViewAction()); connect(m_meshDock, SIGNAL(connectorsWereUpdated()), this, SLOT(updateModelRender())); connect(&m_model, SIGNAL(meshCountChanged(int,QStringList)), m_meshDock, SLOT(setMeshCount(int,QStringList))); /// Reset state clear(); }
QEbuMainWindow::QEbuMainWindow(QWidget *parent) : QMainWindow(parent) { m_ebuCoreMain = 0; m_icon.addFile(":/images/qebu-icon_32.png"); m_icon.addFile(":/images/qebu-icon_64.png"); this->setWindowIcon(m_icon); qApp->setWindowIcon(m_icon); // Central Widget QWidget *cw = new QWidget; m_mainCentralLayout = new QVBoxLayout; m_labelNavigation = new QLabel; m_labelNavigation->setFrameStyle(QFrame::NoFrame); m_stackedWidget = new QStackedWidget; m_stackedWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding); //m_stackedWidget->setMinimumSize(640,400); m_mainCentralLayout->addWidget(m_labelNavigation); m_mainCentralLayout->addWidget(m_stackedWidget); // Bottom label -> currentDocument m_currentDocument = new QLabel; m_mainCentralLayout->addWidget(m_currentDocument); cw->setLayout(m_mainCentralLayout); this->setCentralWidget(cw); // Create top menu bar QMenuBar *topMenuBar = new QMenuBar(this); QMenu *fileMenu = new QMenu(tr("&File"), this); QAction *openAction = new QAction(tr("&Open..."), this); openAction->setShortcuts(QKeySequence::Open); QObject::connect(openAction, SIGNAL(triggered()), this, SLOT(actionOpen())); fileMenu->addAction(openAction); QAction *saveAction = new QAction(tr("&Save as..."), this); saveAction->setShortcut(QKeySequence::SaveAs); QObject::connect(saveAction, SIGNAL(triggered()), this, SLOT(actionSave())); fileMenu->addAction(saveAction); QAction *closeAction = new QAction(tr("&Close"), this); closeAction->setShortcut(QKeySequence::Close); QObject::connect(closeAction, SIGNAL(triggered()), this, SLOT(actionClose())); fileMenu->addAction(closeAction); fileMenu->addSeparator(); QAction *quitAction = new QAction(tr("&Quit"), this); quitAction->setShortcut(QKeySequence::Quit); quitAction->setMenuRole(QAction::QuitRole); QObject::connect(quitAction, SIGNAL(triggered()), this, SLOT(actionQuit())); fileMenu->addAction(quitAction); topMenuBar->addMenu(fileMenu); QMenu *helpMenu = new QMenu(tr("&Help"), this); QAction *wizardAction = new QAction(tr("&Getting started..."), this); QObject::connect(wizardAction, SIGNAL(triggered()), this, SLOT(actionWizard())); helpMenu->addAction(wizardAction); helpMenu->addSeparator(); QAction *aboutQtAction = new QAction(tr("About &Qt..."), this); aboutQtAction->setMenuRole(QAction::AboutQtRole); QObject::connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); helpMenu->addAction(aboutQtAction); QAction *aboutAction = new QAction(tr("&About QEbu..."), this); aboutQtAction->setMenuRole(QAction::AboutRole); QObject::connect(aboutAction, SIGNAL(triggered()), this, SLOT(actionAbout())); helpMenu->addAction(aboutAction); topMenuBar->addMenu(helpMenu); this->setMenuBar(topMenuBar); // Prepare main view resetView(); }
SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) : QMainWindow(parent) , fCentralSplitter(this) , fStatusBar(this) , fToolBar(this) , fActionOpen(this) , fActionBreakpoint(this) , fActionCancel(this) , fActionClearBreakpoints(this) , fActionClearDeletes(this) , fActionClose(this) , fActionCreateBreakpoint(this) , fActionDelete(this) , fActionDirectory(this) , fActionGoToLine(this) , fActionInspector(this) , fActionSettings(this) , fActionPlay(this) , fActionPause(this) , fActionRewind(this) , fActionSave(this) , fActionSaveAs(this) , fActionShowDeletes(this) , fActionStepBack(this) , fActionStepForward(this) , fActionZoomIn(this) , fActionZoomOut(this) , fMapper(this) , fListWidget(&fCentralSplitter) , fDirectoryWidget(&fCentralSplitter) , fCanvasWidget(this, &fDebugger) , fDrawCommandGeometryWidget(&fDebugger) , fMenuBar(this) , fMenuFile(this) , fMenuNavigate(this) , fMenuView(this) , fLoading(false) { setupUi(this); fListWidget.setSelectionMode(QAbstractItemView::ExtendedSelection); connect(&fListWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(updateDrawCommandInfo())); connect(&fActionOpen, SIGNAL(triggered()), this, SLOT(openFile())); connect(&fActionDirectory, SIGNAL(triggered()), this, SLOT(toggleDirectory())); connect(&fDirectoryWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(loadFile(QListWidgetItem *))); connect(&fDirectoryWatcher, SIGNAL(directoryChanged(QString)), this, SLOT(populateDirectoryWidget())); connect(&fActionDelete, SIGNAL(triggered()), this, SLOT(actionDelete())); connect(&fListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(toggleBreakpoint())); connect(&fActionRewind, SIGNAL(triggered()), this, SLOT(actionRewind())); connect(&fActionPlay, SIGNAL(triggered()), this, SLOT(actionPlay())); connect(&fActionStepBack, SIGNAL(triggered()), this, SLOT(actionStepBack())); connect(&fActionStepForward, SIGNAL(triggered()), this, SLOT(actionStepForward())); connect(&fActionBreakpoint, SIGNAL(triggered()), this, SLOT(actionBreakpoints())); connect(&fActionInspector, SIGNAL(triggered()), this, SLOT(actionInspector())); connect(&fActionSettings, SIGNAL(triggered()), this, SLOT(actionSettings())); connect(&fFilter, SIGNAL(activated(QString)), this, SLOT(toggleFilter(QString))); connect(&fActionCancel, SIGNAL(triggered()), this, SLOT(actionCancel())); connect(&fActionClearBreakpoints, SIGNAL(triggered()), this, SLOT(actionClearBreakpoints())); connect(&fActionClearDeletes, SIGNAL(triggered()), this, SLOT(actionClearDeletes())); connect(&fActionClose, SIGNAL(triggered()), this, SLOT(actionClose())); #if SK_SUPPORT_GPU connect(&fSettingsWidget, SIGNAL(glSettingsChanged()), this, SLOT(actionGLSettingsChanged())); #endif connect(&fSettingsWidget, SIGNAL(rasterSettingsChanged()), this, SLOT(actionRasterSettingsChanged())); connect(&fSettingsWidget, SIGNAL(visualizationsChanged()), this, SLOT(actionVisualizationsChanged())); connect(&fSettingsWidget, SIGNAL(texFilterSettingsChanged()), this, SLOT(actionTextureFilter())); connect(&fActionPause, SIGNAL(toggled(bool)), this, SLOT(pauseDrawing(bool))); connect(&fActionCreateBreakpoint, SIGNAL(activated()), this, SLOT(toggleBreakpoint())); connect(&fActionShowDeletes, SIGNAL(triggered()), this, SLOT(showDeletes())); connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(selectCommand(int))); connect(&fCanvasWidget, SIGNAL(hitChanged(int)), this, SLOT(updateHit(int))); connect(&fCanvasWidget, SIGNAL(scaleFactorChanged(float)), this, SLOT(actionScale(float))); connect(&fActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); connect(&fActionSave, SIGNAL(triggered()), this, SLOT(actionSave())); fMapper.setMapping(&fActionZoomIn, SkCanvasWidget::kIn_ZoomCommand); fMapper.setMapping(&fActionZoomOut, SkCanvasWidget::kOut_ZoomCommand); connect(&fActionZoomIn, SIGNAL(triggered()), &fMapper, SLOT(map())); connect(&fActionZoomOut, SIGNAL(triggered()), &fMapper, SLOT(map())); connect(&fMapper, SIGNAL(mapped(int)), &fCanvasWidget, SLOT(zoom(int))); fViewStateFrame.setDisabled(true); fInspectorWidget.setDisabled(true); fMenuEdit.setDisabled(true); fMenuNavigate.setDisabled(true); fMenuView.setDisabled(true); }