bool AboutDialog::eventFilter(QObject *obj, QEvent *event) { if (event->type() == QEvent::MouseButtonPress ) { if( obj == ui.version ) { if( !b_advanced ) { ui.version->setText(qfu( VLC_CompileBy() )+ "@" + qfu( VLC_CompileHost() ) + " " + __DATE__ + " " + __TIME__); b_advanced = true; } else { ui.version->setText(qfu( " " VERSION_MESSAGE ) ); b_advanced = false; } return true; } else if( obj == ui.licenseButton ) showLicense(); else if( obj == ui.authorsButton ) showAuthors(); else if( obj == ui.creditsButton ) showCredit(); return false; } return QVLCDialog::eventFilter( obj, event); }
AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent) { mUi.setupUi(this); // Format version QString version = QString("%1.%2.%3%4").arg(VENDACE_MAJOR).arg(VENDACE_MINOR).arg(VENDACE_PATCH).arg(VENDACE_SUFFIX); mUi.versionLabel->setText(mUi.versionLabel->text().arg(version)); connect(mUi.closeButton, SIGNAL(pressed()), this, SLOT(close())); connect(mUi.licenseLabel, SIGNAL(linkActivated(QString)), this, SLOT(showLicense(QString))); }
ResourceManager::ResourceManager(QWidget* parent) { setupUi(this); downloadButton->setEnabled(false); downloadProgressBar->setValue(0); downloadProgressBar->setVisible(false); dataReceivedLabel->setVisible(false); languageChange(); connect(categoryComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(categoryChanged())); connect(updateAvailableButton, SIGNAL(clicked()), this, SLOT(updateDownloadLists())); connect(showLicenseButton, SIGNAL(clicked()), this, SLOT(showLicense())); connect(downloadButton, SIGNAL(clicked()), this, SLOT(startDownload())); }
Clattr::Clattr(QWidget *parent) : QMainWindow(parent), ui(new Ui::Clattr) { ui->setupUi(this); latexWorker = new LatexWorker; latexThread = new QThread; latexWorker->moveToThread(latexThread); latexThread->start(); Letter letter; setUiData(letter); connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout())); connect(ui->actionAboutQt, SIGNAL(triggered()), this, SLOT(showAboutQt())); connect(ui->actionExportAsTex, SIGNAL(triggered()), this, SLOT(exportAsTex())); connect(ui->actionLicense, SIGNAL(triggered()), this, SLOT(showLicense())); connect(ui->actionNew, SIGNAL(triggered()), this, SLOT(newFile())); connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(openLetter())); connect(ui->actionSaveAs, SIGNAL(triggered()), this, SLOT(saveLetterAs())); connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(showSettings())); }
MainWindow::MainWindow() : QbWindow(config.geometry.mainWindow) { setObjectName("main-window"); setWindowTitle(utf8() << bsnesTitle << " v" << bsnesVersion); //menu bar #if defined(PLATFORM_OSX) menuBar = new QMenuBar(0); #else menuBar = new QMenuBar; #endif system = menuBar->addMenu("System"); system_load = system->addAction("Load Cartridge ..."); system_load->setIcon(QIcon(":/16x16/document-open.png")); system_loadSpecial = system->addMenu("Load Special"); system_loadSpecial->setIcon(QIcon(":/16x16/document-open.png")); system_loadSpecial_bsxSlotted = system_loadSpecial->addAction("Load BS-X Slotted Cartridge ..."); system_loadSpecial_bsxSlotted->setIcon(QIcon(":/16x16/document-open.png")); system_loadSpecial_bsx = system_loadSpecial->addAction("Load BS-X Cartridge ..."); system_loadSpecial_bsx->setIcon(QIcon(":/16x16/document-open.png")); system_loadSpecial_sufamiTurbo = system_loadSpecial->addAction("Load Sufami Turbo Cartridge ..."); system_loadSpecial_sufamiTurbo->setIcon(QIcon(":/16x16/document-open.png")); system_loadSpecial_superGameBoy = system_loadSpecial->addAction("Load Super Game Boy Cartridge ..."); system_loadSpecial_superGameBoy->setIcon(QIcon(":/16x16/document-open.png")); system->addSeparator(); system->addAction(system_power = new QbCheckAction("Power", 0)); system_reset = system->addAction("Reset"); system_reset->setIcon(QIcon(":/16x16/view-refresh.png")); system->addSeparator(); system_port1 = system->addMenu("Controller Port 1"); system_port1->setIcon(QIcon(":/16x16/input-gaming.png")); system_port1->addAction(system_port1_none = new QbRadioAction("None", 0)); system_port1->addAction(system_port1_joypad = new QbRadioAction("Joypad", 0)); system_port1->addAction(system_port1_multitap = new QbRadioAction("Multitap", 0)); system_port1->addAction(system_port1_mouse = new QbRadioAction("Mouse", 0)); system_port2 = system->addMenu("Controller Port 2"); system_port2->setIcon(QIcon(":/16x16/input-gaming.png")); system_port2->addAction(system_port2_none = new QbRadioAction("None", 0)); system_port2->addAction(system_port2_joypad = new QbRadioAction("Joypad", 0)); system_port2->addAction(system_port2_multitap = new QbRadioAction("Multitap", 0)); system_port2->addAction(system_port2_mouse = new QbRadioAction("Mouse", 0)); system_port2->addAction(system_port2_superscope = new QbRadioAction("Super Scope", 0)); system_port2->addAction(system_port2_justifier = new QbRadioAction("Justifier", 0)); system_port2->addAction(system_port2_justifiers = new QbRadioAction("Two Justifiers", 0)); #if !defined(PLATFORM_OSX) system->addSeparator(); #endif system_exit = system->addAction("Exit"); system_exit->setIcon(QIcon(":/16x16/process-stop.png")); system_exit->setMenuRole(QAction::QuitRole); settings = menuBar->addMenu("Settings"); settings_videoMode = settings->addMenu("Video Mode"); settings_videoMode->setIcon(QIcon(":/16x16/video-display.png")); settings_videoMode->addAction(settings_videoMode_1x = new QbRadioAction("Scale 1x", 0)); settings_videoMode->addAction(settings_videoMode_2x = new QbRadioAction("Scale 2x", 0)); settings_videoMode->addAction(settings_videoMode_3x = new QbRadioAction("Scale 3x", 0)); settings_videoMode->addAction(settings_videoMode_4x = new QbRadioAction("Scale 4x", 0)); settings_videoMode->addAction(settings_videoMode_max = new QbRadioAction("Scale Max", 0)); settings_videoMode->addSeparator(); settings_videoMode->addAction(settings_videoMode_correctAspectRatio = new QbCheckAction("Correct Aspect Ratio", 0)); settings_videoMode->addAction(settings_videoMode_fullscreen = new QbCheckAction("Fullscreen", 0)); settings_videoMode->addSeparator(); settings_videoMode->addAction(settings_videoMode_ntsc = new QbRadioAction("NTSC", 0)); settings_videoMode->addAction(settings_videoMode_pal = new QbRadioAction("PAL", 0)); if(filter.opened()) { settings_videoFilter = settings->addMenu("Video Filter"); settings_videoFilter->setIcon(QIcon(":/16x16/image-x-generic.png")); settings_videoFilter_configure = settings_videoFilter->addAction("Configure Active Filter ..."); settings_videoFilter_configure->setIcon(QIcon(":/16x16/preferences-desktop.png")); settings_videoFilter->addSeparator(); settings_videoFilter->addAction(settings_videoFilter_none = new QbRadioAction("None", 0)); settings_videoFilter_list.add(settings_videoFilter_none); lstring filterlist; filterlist.split(";", filter.dl_supported()); for(unsigned i = 0; i < filterlist.size(); i++) { QbRadioAction *action = new QbRadioAction(utf8() << filterlist[i], 0); settings_videoFilter->addAction(action); settings_videoFilter_list.add(action); } } settings->addAction(settings_smoothVideo = new QbCheckAction("Smooth Video Output", 0)); settings->addSeparator(); settings->addAction(settings_muteAudio = new QbCheckAction("Mute Audio Output", 0)); settings->addSeparator(); settings_emulationSpeed = settings->addMenu("Emulation Speed"); settings_emulationSpeed->setIcon(QIcon(":/16x16/appointment-new.png")); settings_emulationSpeed->addAction(settings_emulationSpeed_slowest = new QbRadioAction("50%", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_slow = new QbRadioAction("75%", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_normal = new QbRadioAction("100%", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_fast = new QbRadioAction("150%", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_fastest = new QbRadioAction("200%", 0)); settings_emulationSpeed->addSeparator(); settings_emulationSpeed->addAction(settings_emulationSpeed_syncVideo = new QbCheckAction("Sync Video", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_syncAudio = new QbCheckAction("Sync Audio", 0)); settings_configuration = settings->addAction("Configuration ..."); settings_configuration->setIcon(QIcon(":/16x16/preferences-desktop.png")); settings_configuration->setMenuRole(QAction::PreferencesRole); tools = menuBar->addMenu("Tools"); tools_cheatEditor = tools->addAction("Cheat Editor ..."); tools_cheatEditor->setIcon(QIcon(":/16x16/accessories-text-editor.png")); tools_cheatFinder = tools->addAction("Cheat Finder ..."); tools_cheatFinder->setIcon(QIcon(":/16x16/system-search.png")); tools_stateManager = tools->addAction("State Manager ..."); tools_stateManager->setIcon(QIcon(":/16x16/system-file-manager.png")); tools->addSeparator(); tools_captureScreenshot = tools->addAction("Capture Screenshot"); tools_captureScreenshot->setIcon(QIcon(":/16x16/image-x-generic.png")); tools_debugger = tools->addAction("Debugger ..."); tools_debugger->setIcon(QIcon(":/16x16/utilities-terminal.png")); #if !defined(DEBUGGER) tools_debugger->setVisible(false); #endif help = menuBar->addMenu("Help"); help_documentation = help->addAction("Documentation ..."); help_documentation->setIcon(QIcon(":/16x16/text-x-generic.png")); help_license = help->addAction("License ..."); help_license->setIcon(QIcon(":/16x16/text-x-generic.png")); #if !defined(PLATFORM_OSX) help->addSeparator(); #endif help_about = help->addAction("About ..."); help_about->setIcon(QIcon(":/16x16/help-browser.png")); help_about->setMenuRole(QAction::AboutRole); //canvas canvasContainer = new CanvasObject; canvasContainer->setAcceptDrops(true); { canvasContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); canvasContainer->setObjectName("backdrop"); canvasLayout = new QVBoxLayout; { canvasLayout->setMargin(0); canvasLayout->setAlignment(Qt::AlignCenter); canvas = new CanvasWidget; canvas->setAcceptDrops(true); canvas->setFocusPolicy(Qt::StrongFocus); canvas->setAttribute(Qt::WA_PaintOnScreen, true); //disable Qt painting on focus / resize QPalette palette; palette.setColor(QPalette::Window, QColor(0, 0, 0)); canvas->setPalette(palette); canvas->setAutoFillBackground(true); } canvasLayout->addWidget(canvas); } canvasContainer->setLayout(canvasLayout); //status bar statusBar = new QStatusBar; statusBar->showMessage(""); systemState = new QLabel; statusBar->addPermanentWidget(systemState); //layout layout = new QVBoxLayout; layout->setMargin(0); layout->setSpacing(0); #if !defined(PLATFORM_OSX) layout->addWidget(menuBar); #endif layout->addWidget(canvasContainer); layout->addWidget(statusBar); setLayout(layout); //slots connect(system_load, SIGNAL(triggered()), this, SLOT(loadCartridge())); connect(system_loadSpecial_bsxSlotted, SIGNAL(triggered()), this, SLOT(loadBsxSlottedCartridge())); connect(system_loadSpecial_bsx, SIGNAL(triggered()), this, SLOT(loadBsxCartridge())); connect(system_loadSpecial_sufamiTurbo, SIGNAL(triggered()), this, SLOT(loadSufamiTurboCartridge())); connect(system_loadSpecial_superGameBoy, SIGNAL(triggered()), this, SLOT(loadSuperGameBoyCartridge())); connect(system_power, SIGNAL(triggered()), this, SLOT(power())); connect(system_reset, SIGNAL(triggered()), this, SLOT(reset())); connect(system_port1_none, SIGNAL(triggered()), this, SLOT(setPort1None())); connect(system_port1_joypad, SIGNAL(triggered()), this, SLOT(setPort1Joypad())); connect(system_port1_multitap, SIGNAL(triggered()), this, SLOT(setPort1Multitap())); connect(system_port1_mouse, SIGNAL(triggered()), this, SLOT(setPort1Mouse())); connect(system_port2_none, SIGNAL(triggered()), this, SLOT(setPort2None())); connect(system_port2_joypad, SIGNAL(triggered()), this, SLOT(setPort2Joypad())); connect(system_port2_multitap, SIGNAL(triggered()), this, SLOT(setPort2Multitap())); connect(system_port2_mouse, SIGNAL(triggered()), this, SLOT(setPort2Mouse())); connect(system_port2_superscope, SIGNAL(triggered()), this, SLOT(setPort2SuperScope())); connect(system_port2_justifier, SIGNAL(triggered()), this, SLOT(setPort2Justifier())); connect(system_port2_justifiers, SIGNAL(triggered()), this, SLOT(setPort2Justifiers())); connect(system_exit, SIGNAL(triggered()), this, SLOT(quit())); connect(settings_videoMode_1x, SIGNAL(triggered()), this, SLOT(setVideoMode1x())); connect(settings_videoMode_2x, SIGNAL(triggered()), this, SLOT(setVideoMode2x())); connect(settings_videoMode_3x, SIGNAL(triggered()), this, SLOT(setVideoMode3x())); connect(settings_videoMode_4x, SIGNAL(triggered()), this, SLOT(setVideoMode4x())); connect(settings_videoMode_max, SIGNAL(triggered()), this, SLOT(setVideoModeMax())); connect(settings_videoMode_correctAspectRatio, SIGNAL(triggered()), this, SLOT(toggleAspectCorrection())); connect(settings_videoMode_fullscreen, SIGNAL(triggered()), this, SLOT(toggleFullscreen())); connect(settings_videoMode_ntsc, SIGNAL(triggered()), this, SLOT(setVideoNtsc())); connect(settings_videoMode_pal, SIGNAL(triggered()), this, SLOT(setVideoPal())); if(filter.opened()) { connect(settings_videoFilter_configure, SIGNAL(triggered()), this, SLOT(configureFilter())); for(unsigned i = 0; i < settings_videoFilter_list.size(); i++) { connect(settings_videoFilter_list[i], SIGNAL(triggered()), this, SLOT(setFilter())); } } connect(settings_smoothVideo, SIGNAL(triggered()), this, SLOT(toggleSmoothVideo())); connect(settings_muteAudio, SIGNAL(triggered()), this, SLOT(muteAudio())); connect(settings_emulationSpeed_slowest, SIGNAL(triggered()), this, SLOT(setSpeedSlowest())); connect(settings_emulationSpeed_slow, SIGNAL(triggered()), this, SLOT(setSpeedSlow())); connect(settings_emulationSpeed_normal, SIGNAL(triggered()), this, SLOT(setSpeedNormal())); connect(settings_emulationSpeed_fast, SIGNAL(triggered()), this, SLOT(setSpeedFast())); connect(settings_emulationSpeed_fastest, SIGNAL(triggered()), this, SLOT(setSpeedFastest())); connect(settings_emulationSpeed_syncVideo, SIGNAL(triggered()), this, SLOT(syncVideo())); connect(settings_emulationSpeed_syncAudio, SIGNAL(triggered()), this, SLOT(syncAudio())); connect(settings_configuration, SIGNAL(triggered()), this, SLOT(showConfigWindow())); connect(tools_cheatEditor, SIGNAL(triggered()), this, SLOT(showCheatEditor())); connect(tools_cheatFinder, SIGNAL(triggered()), this, SLOT(showCheatFinder())); connect(tools_stateManager, SIGNAL(triggered()), this, SLOT(showStateManager())); connect(tools_captureScreenshot, SIGNAL(triggered()), this, SLOT(saveScreenshot())); connect(tools_debugger, SIGNAL(triggered()), this, SLOT(showDebugger())); connect(help_documentation, SIGNAL(triggered()), this, SLOT(showDocumentation())); connect(help_license, SIGNAL(triggered()), this, SLOT(showLicense())); connect(help_about, SIGNAL(triggered()), this, SLOT(showAbout())); syncUi(); }
MainWindow::MainWindow() { setObjectName("main-window"); setWindowTitle(string() << SNES::Info::Name << " v" << SNES::Info::Version); setCloseOnEscape(false); setGeometryString(&config().geometry.mainWindow); application.windowList.append(this); //menu bar #if defined(PLATFORM_OSX) menuBar = new QMenuBar(0); #else menuBar = new QMenuBar; #endif system = menuBar->addMenu("&System"); system_load = system->addAction("Load &Cartridge ..."); system_loadSpecial = system->addMenu("Load &Special"); system_loadSpecial_bsx = system_loadSpecial->addAction("Load &BS-X Cartridge ..."); system_loadSpecial_bsxSlotted = system_loadSpecial->addAction("Load BS-X &Slotted Cartridge ..."); system_loadSpecial_sufamiTurbo = system_loadSpecial->addAction("Load Sufami &Turbo Cartridge ..."); system_loadSpecial_superGameBoy = system_loadSpecial->addAction("Load Super &Game Boy Cartridge ..."); system_saveMemoryPack = system->addAction("Save Memory Pack ..."); system_saveMemoryPack->setVisible(false); system_reload = system->addAction("Re&load"); system->addSeparator(); system->addAction(system_power = new CheckAction("&Power", 0)); system_reset = system->addAction("&Reset"); system->addSeparator(); system_port1 = system->addMenu("Controller Port &1"); system_port1->addAction(system_port1_none = new RadioAction("&None", 0)); system_port1->addAction(system_port1_gamepad = new RadioAction("&Gamepad", 0)); system_port1->addAction(system_port1_asciipad = new RadioAction("&asciiPad", 0)); system_port1->addAction(system_port1_multitap = new RadioAction("&Multitap", 0)); system_port1->addAction(system_port1_mouse = new RadioAction("&Mouse", 0)); system_port1->addAction(system_port1_nttdatakeypad = new RadioAction("NTT Data &Keypad", 0)); system_port2 = system->addMenu("Controller Port &2"); system_port2->addAction(system_port2_none = new RadioAction("&None", 0)); system_port2->addAction(system_port2_gamepad = new RadioAction("&Gamepad", 0)); system_port2->addAction(system_port2_asciipad = new RadioAction("&asciiPad", 0)); system_port2->addAction(system_port2_multitap = new RadioAction("&Multitap", 0)); system_port2->addAction(system_port2_mouse = new RadioAction("&Mouse", 0)); system_port2->addAction(system_port2_superscope = new RadioAction("&Super Scope", 0)); system_port2->addAction(system_port2_justifier = new RadioAction("&Justifier", 0)); system_port2->addAction(system_port2_justifiers = new RadioAction("Two &Justifiers", 0)); #if !defined(PLATFORM_OSX) system->addSeparator(); #endif system_exit = system->addAction("E&xit"); system_exit->setMenuRole(QAction::QuitRole); settings = menuBar->addMenu("S&ettings"); settings_videoMode = settings->addMenu("Video &Mode"); settings_videoMode->addAction(settings_videoMode_1x = new RadioAction("Scale &1x", 0)); settings_videoMode->addAction(settings_videoMode_2x = new RadioAction("Scale &2x", 0)); settings_videoMode->addAction(settings_videoMode_3x = new RadioAction("Scale &3x", 0)); settings_videoMode->addAction(settings_videoMode_4x = new RadioAction("Scale &4x", 0)); settings_videoMode->addAction(settings_videoMode_5x = new RadioAction("Scale &5x", 0)); settings_videoMode->addAction(settings_videoMode_max_normal = new RadioAction("Scale Max - &Normal", 0)); settings_videoMode->addAction(settings_videoMode_max_wide = new RadioAction("Scale Max - &Wide", 0)); settings_videoMode->addAction(settings_videoMode_max_wideZoom = new RadioAction("Scale Max - Wide &Zoom", 0)); settings_videoMode->addSeparator(); settings_videoMode->addAction(settings_videoMode_correctAspectRatio = new CheckAction("Correct &Aspect Ratio", 0)); settings_videoMode->addSeparator(); settings_videoMode->addAction(settings_videoMode_ntsc = new RadioAction("&NTSC", 0)); settings_videoMode->addAction(settings_videoMode_pal = new RadioAction("&PAL", 0)); if(filter.opened()) { settings_videoFilter = settings->addMenu("Video &Filter"); settings_videoFilter_configure = settings_videoFilter->addAction("&Configure Active Filter ..."); settings_videoFilter->addSeparator(); settings_videoFilter->addAction(settings_videoFilter_none = new RadioAction("&None", 0)); settings_videoFilter_list.append(settings_videoFilter_none); lstring filterlist; filterlist.split(";", filter.dl_supported()); for(unsigned i = 0; i < filterlist.size(); i++) { RadioAction *action = new RadioAction(filterlist[i], 0); settings_videoFilter->addAction(action); settings_videoFilter_list.append(action); } } settings->addAction(settings_smoothVideo = new CheckAction("&Smooth Video Output", 0)); settings->addSeparator(); settings->addAction(settings_muteAudio = new CheckAction("&Mute Audio Output", 0)); settings->addSeparator(); settings_emulationSpeed = settings->addMenu("Emulation &Speed"); settings_emulationSpeed->addAction(settings_emulationSpeed_slowest = new RadioAction("Slowest", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_slow = new RadioAction("Slow", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_normal = new RadioAction("Normal", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_fast = new RadioAction("Fast", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_fastest = new RadioAction("Fastest", 0)); settings_emulationSpeed->addSeparator(); settings_emulationSpeed->addAction(settings_emulationSpeed_syncVideo = new CheckAction("Sync &Video", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_syncAudio = new CheckAction("Sync &Audio", 0)); settings_configuration = settings->addAction("&Configuration ..."); settings_configuration->setMenuRole(QAction::PreferencesRole); tools = menuBar->addMenu("&Tools"); tools_movies = tools->addMenu("&Movies"); tools_movies_play = tools_movies->addAction("Play Movie ..."); tools_movies_stop = tools_movies->addAction("Stop"); tools_movies_recordFromPowerOn = tools_movies->addAction("Record Movie (and restart system)"); tools_movies_recordFromHere = tools_movies->addAction("Record Movie (starting from here)"); tools_captureScreenshot = tools->addAction("&Capture Screenshot"); tools_captureSPC = tools->addAction("Capture &SPC Dump"); tools->addSeparator(); tools_loadState = tools->addMenu("&Load Quick State"); for(unsigned i = 0; i < 10; i++) { QAction *loadAction = new QAction(string("Slot ", i + 1), 0); loadAction->setData(i); connect(loadAction, SIGNAL(triggered()), this, SLOT(loadState())); tools_loadState->addAction(loadAction); } tools_saveState = tools->addMenu("&Save Quick State"); for(unsigned i = 0; i < 10; i++) { QAction *saveAction = new QAction(string("Slot ", i + 1), 0); saveAction->setData(i); connect(saveAction, SIGNAL(triggered()), this, SLOT(saveState())); tools_saveState->addAction(saveAction); } tools->addSeparator(); tools_cheatEditor = tools->addAction("Cheat &Editor ..."); tools_cheatFinder = tools->addAction("Cheat &Finder ..."); tools_stateManager = tools->addAction("&State Manager ..."); tools_effectToggle = tools->addAction("Effect &Toggle ..."); if(!SNES::PPU::SupportsLayerEnable && !SNES::DSP::SupportsChannelEnable) tools_effectToggle->setVisible(false); tools_manifestViewer = tools->addAction("&Manifest Viewer ..."); tools_soundViewer = tools->addAction("Sound &Viewer ..."); tools_debugger = tools->addAction("&Debugger ..."); #if !defined(DEBUGGER) tools_debugger->setVisible(false); #endif help = menuBar->addMenu("&Help"); help_documentation = help->addAction("&Documentation ..."); help_license = help->addAction("&License ..."); #if !defined(PLATFORM_OSX) help->addSeparator(); #endif help_about = help->addAction("&About ..."); help_about->setMenuRole(QAction::AboutRole); //canvas canvasContainer = new CanvasObject; canvasContainer->setAcceptDrops(true); { canvasContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); canvasContainer->setObjectName("backdrop"); canvasLayout = new QVBoxLayout; { canvasLayout->setMargin(0); canvasLayout->setAlignment(Qt::AlignCenter); canvas = new CanvasWidget; canvas->setAcceptDrops(true); canvas->setFocusPolicy(Qt::StrongFocus); canvas->setAttribute(Qt::WA_PaintOnScreen, true); //disable Qt painting on focus / resize canvas->setAttribute(Qt::WA_NoSystemBackground, true); } canvasLayout->addWidget(canvas); } canvasContainer->setLayout(canvasLayout); //status bar statusBar = new QStatusBar; statusBar->setSizeGripEnabled(false); statusBar->showMessage(""); systemState = new QLabel; statusBar->addPermanentWidget(systemState); //layout layout = new QVBoxLayout; layout->setMargin(0); layout->setSpacing(0); #if !defined(PLATFORM_OSX) layout->addWidget(menuBar); #endif layout->addWidget(canvasContainer); layout->addWidget(statusBar); setLayout(layout); //cursor hide timer cursorTimer = new QTimer(this); cursorTimer->setSingleShot(true); cursorTimer->setInterval(5*1000); //slots connect(system_load, SIGNAL(triggered()), this, SLOT(loadCartridge())); connect(system_reload, SIGNAL(triggered()), this, SLOT(reloadCartridge())); connect(system_loadSpecial_bsxSlotted, SIGNAL(triggered()), this, SLOT(loadBsxSlottedCartridge())); connect(system_loadSpecial_bsx, SIGNAL(triggered()), this, SLOT(loadBsxCartridge())); connect(system_loadSpecial_sufamiTurbo, SIGNAL(triggered()), this, SLOT(loadSufamiTurboCartridge())); connect(system_loadSpecial_superGameBoy, SIGNAL(triggered()), this, SLOT(loadSuperGameBoyCartridge())); connect(system_saveMemoryPack, SIGNAL(triggered()), this, SLOT(saveMemoryPack())); connect(system_power, SIGNAL(triggered()), this, SLOT(power())); connect(system_reset, SIGNAL(triggered()), this, SLOT(reset())); connect(system_port1_none, SIGNAL(triggered()), this, SLOT(setPort1None())); connect(system_port1_gamepad, SIGNAL(triggered()), this, SLOT(setPort1Gamepad())); connect(system_port1_asciipad, SIGNAL(triggered()), this, SLOT(setPort1Asciipad())); connect(system_port1_multitap, SIGNAL(triggered()), this, SLOT(setPort1Multitap())); connect(system_port1_mouse, SIGNAL(triggered()), this, SLOT(setPort1Mouse())); connect(system_port1_nttdatakeypad, SIGNAL(triggered()), this, SLOT(setPort1NTTDataKeypad())); connect(system_port2_none, SIGNAL(triggered()), this, SLOT(setPort2None())); connect(system_port2_gamepad, SIGNAL(triggered()), this, SLOT(setPort2Gamepad())); connect(system_port2_asciipad, SIGNAL(triggered()), this, SLOT(setPort2Asciipad())); connect(system_port2_multitap, SIGNAL(triggered()), this, SLOT(setPort2Multitap())); connect(system_port2_mouse, SIGNAL(triggered()), this, SLOT(setPort2Mouse())); connect(system_port2_superscope, SIGNAL(triggered()), this, SLOT(setPort2SuperScope())); connect(system_port2_justifier, SIGNAL(triggered()), this, SLOT(setPort2Justifier())); connect(system_port2_justifiers, SIGNAL(triggered()), this, SLOT(setPort2Justifiers())); connect(system_exit, SIGNAL(triggered()), this, SLOT(quit())); connect(settings_videoMode_1x, SIGNAL(triggered()), this, SLOT(setVideoMode1x())); connect(settings_videoMode_2x, SIGNAL(triggered()), this, SLOT(setVideoMode2x())); connect(settings_videoMode_3x, SIGNAL(triggered()), this, SLOT(setVideoMode3x())); connect(settings_videoMode_4x, SIGNAL(triggered()), this, SLOT(setVideoMode4x())); connect(settings_videoMode_5x, SIGNAL(triggered()), this, SLOT(setVideoMode5x())); connect(settings_videoMode_max_normal, SIGNAL(triggered()), this, SLOT(setVideoModeMaxNormal())); connect(settings_videoMode_max_wide, SIGNAL(triggered()), this, SLOT(setVideoModeMaxWide())); connect(settings_videoMode_max_wideZoom, SIGNAL(triggered()), this, SLOT(setVideoModeMaxWideZoom())); connect(settings_videoMode_correctAspectRatio, SIGNAL(triggered()), this, SLOT(toggleAspectCorrection())); connect(settings_videoMode_ntsc, SIGNAL(triggered()), this, SLOT(setVideoNtsc())); connect(settings_videoMode_pal, SIGNAL(triggered()), this, SLOT(setVideoPal())); if(filter.opened()) { connect(settings_videoFilter_configure, SIGNAL(triggered()), this, SLOT(configureFilter())); for(unsigned i = 0; i < settings_videoFilter_list.size(); i++) { connect(settings_videoFilter_list[i], SIGNAL(triggered()), this, SLOT(setFilter())); } } connect(settings_smoothVideo, SIGNAL(triggered()), this, SLOT(toggleSmoothVideo())); connect(settings_muteAudio, SIGNAL(triggered()), this, SLOT(muteAudio())); connect(settings_emulationSpeed_slowest, SIGNAL(triggered()), this, SLOT(setSpeedSlowest())); connect(settings_emulationSpeed_slow, SIGNAL(triggered()), this, SLOT(setSpeedSlow())); connect(settings_emulationSpeed_normal, SIGNAL(triggered()), this, SLOT(setSpeedNormal())); connect(settings_emulationSpeed_fast, SIGNAL(triggered()), this, SLOT(setSpeedFast())); connect(settings_emulationSpeed_fastest, SIGNAL(triggered()), this, SLOT(setSpeedFastest())); connect(settings_emulationSpeed_syncVideo, SIGNAL(triggered()), this, SLOT(syncVideo())); connect(settings_emulationSpeed_syncAudio, SIGNAL(triggered()), this, SLOT(syncAudio())); connect(settings_configuration, SIGNAL(triggered()), this, SLOT(showConfigWindow())); connect(tools_movies_play, SIGNAL(triggered()), this, SLOT(playMovie())); connect(tools_movies_stop, SIGNAL(triggered()), this, SLOT(stopMovie())); connect(tools_movies_recordFromPowerOn, SIGNAL(triggered()), this, SLOT(recordMovieFromPowerOn())); connect(tools_movies_recordFromHere, SIGNAL(triggered()), this, SLOT(recordMovieFromHere())); connect(tools_captureScreenshot, SIGNAL(triggered()), this, SLOT(saveScreenshot())); connect(tools_captureSPC, SIGNAL(triggered()), this, SLOT(saveSPC())); connect(tools_cheatEditor, SIGNAL(triggered()), this, SLOT(showCheatEditor())); connect(tools_cheatFinder, SIGNAL(triggered()), this, SLOT(showCheatFinder())); connect(tools_stateManager, SIGNAL(triggered()), this, SLOT(showStateManager())); connect(tools_effectToggle, SIGNAL(triggered()), this, SLOT(showEffectToggle())); connect(tools_manifestViewer, SIGNAL(triggered()), this, SLOT(showManifestViewer())); connect(tools_soundViewer, SIGNAL(triggered()), this, SLOT(showSoundViewer())); connect(tools_debugger, SIGNAL(triggered()), this, SLOT(showDebugger())); connect(help_documentation, SIGNAL(triggered()), this, SLOT(showDocumentation())); connect(help_license, SIGNAL(triggered()), this, SLOT(showLicense())); connect(help_about, SIGNAL(triggered()), this, SLOT(showAbout())); syncUi(); }
} QListWidgetItem* item = new QListWidgetItem(ui->listWidget); item->setText(themeInfo.name + "\n" + themeInfo.shortDescription); item->setIcon(themeInfo.icon); item->setData(Qt::UserRole, name); if (m_activeTheme == name) { ui->listWidget->setCurrentItem(item); } ui->listWidget->addItem(item); } connect(ui->listWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(currentChanged())); connect(ui->license, SIGNAL(clicked(QPoint)), this, SLOT(showLicense())); currentChanged(); } void ThemeManager::showLicense() { QListWidgetItem* currentItem = ui->listWidget->currentItem(); if (!currentItem) { return; } Theme currentTheme = m_themeHash[currentItem->data(Qt::UserRole).toString()]; QTextBrowser* b = new QTextBrowser(); b->setAttribute(Qt::WA_DeleteOnClose);
About::About(QWidget *parent, QString language) : QDialog(parent) { _language = language; // Setup UI: setupUi(this); #ifdef SMALL_RESOLUTION // https://bugreports.qt.io/browse/QTBUG-16034 // Workaround for window not showing always fullscreen setWindowFlags( Qt::Window ); #endif // Display title/program version: progversion_label->setText(progversion_label->text() + " " + QApplication::applicationVersion()); // Load licence text and changelog: QFile changelog_file; if (language == "de") changelog_file.setFileName(":/changelog_de.txt"); else changelog_file.setFileName(":/changelog_en.txt"); changelog_file.open(QIODevice::ReadOnly | QIODevice::Text); QString changelog_content = static_cast<QString>(changelog_file.readAll()); changelog_textBrowser->setText(changelog_content); changelog_file.close(); // *** Definitions: SSMprotocol2_def_en ssmp_defs; // Display number of supported DTCs: int nrofDTCs_SUB = ssmp_defs.SUBDTCrawDefs().size(); int nrofDTCs_OBD = ssmp_defs.OBDDTCrawDefs().size(); int nrofDTCs_CC = ssmp_defs.CCCCrawDefs().size(); QString dtcstr = QString::number( nrofDTCs_SUB ) + " / " + QString::number( nrofDTCs_OBD ) + " / " + QString::number( nrofDTCs_CC ); nrofsupportedDTCs_label->setText( dtcstr ); // Display number of supported measuring blocks / switches: int nrofMBs = ssmp_defs.MBrawDefs().size(); int nrofSWs = ssmp_defs.SWrawDefs().size(); QString mbswstr = QString::number( nrofMBs ) + " / " + QString::number( nrofSWs ); nrofsupportedMBsSWs_label->setText( mbswstr ); // Display number of supported Adjustment values: int ecu_adjustments = 0; int tcu_adjustments = 0; QStringList adjustmentdefs = ssmp_defs.AdjustmentRawDefs(); for (int k=0; k< adjustmentdefs.size(); k++) { if (adjustmentdefs.at(k).section(';', 1, 1).toInt() == 0) { ecu_adjustments++; } else if (adjustmentdefs.at(k).section(';', 1, 1).toInt() == 1) { tcu_adjustments++; } } QString adjustmentsstr = QString::number( ecu_adjustments ) + " / " + QString::number( tcu_adjustments ); nrofadjustmentvalues_label->setText( adjustmentsstr ); // Display number of supported system tests: int nrofSysTests = ssmp_defs.ActuatorRawDefs().size(); QString systestsstr = QString::number( nrofSysTests ) + " / 1"; nrofActuatortests_label->setText(systestsstr); // Display supported program languages: QString langstr; for (int k=0; k<__supportedLocales.size(); k++) { QLocale locale = __supportedLocales.at(k); QString langname = QLocale::languageToString( locale.language() ); QString langname_tr = QCoreApplication::translate( "Language", langname.toUtf8() ); if (k > 0) langstr.append(", "); langstr.append(langname_tr); } languages_label->setText( langstr ); // Connect buttons: connect( showlicense_pushButton, SIGNAL( released() ), this, SLOT( showLicense() ) ); connect( close_pushButton, SIGNAL( released() ), this, SLOT( close() ) ); }
MainWindow::MainWindow() : QbWindow(config().geometry.mainWindow) { setObjectName("main-window"); setWindowTitle(string() << bsnesTitle << " v" << bsnesVersion); setCloseOnEscape(false); //menu bar #if defined(PLATFORM_OSX) menuBar = new QMenuBar(0); #else menuBar = new QMenuBar; #endif system = menuBar->addMenu("&System"); system_load = system->addAction("Load &Cartridge ..."); system_load->setIcon(QIcon(":/16x16/document-open.png")); system_loadSpecial = system->addMenu("Load &Special"); system_loadSpecial->setIcon(QIcon(":/16x16/document-open.png")); system_loadSpecial_bsxSlotted = system_loadSpecial->addAction("Load BS-X &Slotted Cartridge ..."); system_loadSpecial_bsxSlotted->setIcon(QIcon(":/16x16/document-open.png")); system_loadSpecial_bsx = system_loadSpecial->addAction("Load &BS-X Cartridge ..."); system_loadSpecial_bsx->setIcon(QIcon(":/16x16/document-open.png")); system_loadSpecial_sufamiTurbo = system_loadSpecial->addAction("Load Sufami &Turbo Cartridge ..."); system_loadSpecial_sufamiTurbo->setIcon(QIcon(":/16x16/document-open.png")); system_loadSpecial_superGameBoy = system_loadSpecial->addAction("Load Super &Game Boy Cartridge ..."); system_loadSpecial_superGameBoy->setIcon(QIcon(":/16x16/document-open.png")); system->addSeparator(); system->addAction(system_power = new QbCheckAction("&Power", 0)); system_reset = system->addAction("&Reset"); system_reset->setIcon(QIcon(":/16x16/view-refresh.png")); system->addSeparator(); system_port1 = system->addMenu("Controller Port &1"); system_port1->setIcon(QIcon(":/16x16/input-gaming.png")); system_port1->addAction(system_port1_none = new QbRadioAction("&None", 0)); system_port1->addAction(system_port1_gamepad = new QbRadioAction("&Gamepad", 0)); system_port1->addAction(system_port1_asciipad = new QbRadioAction("&asciiPad", 0)); system_port1->addAction(system_port1_multitap = new QbRadioAction("&Multitap", 0)); system_port1->addAction(system_port1_mouse = new QbRadioAction("&Mouse", 0)); system_port2 = system->addMenu("Controller Port &2"); system_port2->setIcon(QIcon(":/16x16/input-gaming.png")); system_port2->addAction(system_port2_none = new QbRadioAction("&None", 0)); system_port2->addAction(system_port2_gamepad = new QbRadioAction("&Gamepad", 0)); system_port2->addAction(system_port2_asciipad = new QbRadioAction("&asciiPad", 0)); system_port2->addAction(system_port2_multitap = new QbRadioAction("&Multitap", 0)); system_port2->addAction(system_port2_mouse = new QbRadioAction("&Mouse", 0)); system_port2->addAction(system_port2_superscope = new QbRadioAction("&Super Scope", 0)); system_port2->addAction(system_port2_justifier = new QbRadioAction("&Justifier", 0)); system_port2->addAction(system_port2_justifiers = new QbRadioAction("Two &Justifiers", 0)); #if !defined(PLATFORM_OSX) system->addSeparator(); #endif system_exit = system->addAction("E&xit"); system_exit->setIcon(QIcon(":/16x16/process-stop.png")); system_exit->setMenuRole(QAction::QuitRole); settings = menuBar->addMenu("S&ettings"); settings_videoMode = settings->addMenu("Video &Mode"); settings_videoMode->setIcon(QIcon(":/16x16/video-display.png")); settings_videoMode->addAction(settings_videoMode_1x = new QbRadioAction("Scale &1x", 0)); settings_videoMode->addAction(settings_videoMode_2x = new QbRadioAction("Scale &2x", 0)); settings_videoMode->addAction(settings_videoMode_3x = new QbRadioAction("Scale &3x", 0)); settings_videoMode->addAction(settings_videoMode_4x = new QbRadioAction("Scale &4x", 0)); settings_videoMode->addAction(settings_videoMode_5x = new QbRadioAction("Scale &5x", 0)); settings_videoMode->addSeparator(); settings_videoMode->addAction(settings_videoMode_correctAspectRatio = new QbCheckAction("Correct &Aspect Ratio", 0)); settings_videoMode->addSeparator(); settings_videoMode->addAction(settings_videoMode_ntsc = new QbRadioAction("&NTSC", 0)); settings_videoMode->addAction(settings_videoMode_pal = new QbRadioAction("&PAL", 0)); if(filter.opened()) { settings_videoFilter = settings->addMenu("Video &Filter"); settings_videoFilter->setIcon(QIcon(":/16x16/image-x-generic.png")); settings_videoFilter_configure = settings_videoFilter->addAction("&Configure Active Filter ..."); settings_videoFilter_configure->setIcon(QIcon(":/16x16/preferences-desktop.png")); settings_videoFilter->addSeparator(); settings_videoFilter->addAction(settings_videoFilter_none = new QbRadioAction("&None", 0)); settings_videoFilter_list.add(settings_videoFilter_none); lstring filterlist; filterlist.split(";", filter.dl_supported()); for(unsigned i = 0; i < filterlist.size(); i++) { QbRadioAction *action = new QbRadioAction(filterlist[i], 0); settings_videoFilter->addAction(action); settings_videoFilter_list.add(action); } } settings->addAction(settings_smoothVideo = new QbCheckAction("&Smooth Video Output", 0)); settings->addSeparator(); settings->addAction(settings_muteAudio = new QbCheckAction("&Mute Audio Output", 0)); settings->addSeparator(); settings_emulationSpeed = settings->addMenu("Emulation &Speed"); settings_emulationSpeed->setIcon(QIcon(":/16x16/appointment-new.png")); settings_emulationSpeed->addAction(settings_emulationSpeed_slowest = new QbRadioAction("Slowest", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_slow = new QbRadioAction("Slow", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_normal = new QbRadioAction("Normal", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_fast = new QbRadioAction("Fast", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_fastest = new QbRadioAction("Fastest", 0)); settings_emulationSpeed->addSeparator(); settings_emulationSpeed->addAction(settings_emulationSpeed_syncVideo = new QbCheckAction("Sync &Video", 0)); settings_emulationSpeed->addAction(settings_emulationSpeed_syncAudio = new QbCheckAction("Sync &Audio", 0)); settings_configuration = settings->addAction("&Configuration ..."); settings_configuration->setIcon(QIcon(":/16x16/preferences-desktop.png")); settings_configuration->setMenuRole(QAction::PreferencesRole); tools = menuBar->addMenu("&Tools"); tools_movies = tools->addMenu("&Movies"); tools_movies->setIcon(QIcon(":/16x16/applications-multimedia.png")); tools_movies_play = tools_movies->addAction("Play Movie ..."); tools_movies_play->setIcon(QIcon(":/16x16/media-playback-start.png")); tools_movies_stop = tools_movies->addAction("Stop"); tools_movies_stop->setIcon(QIcon(":/16x16/media-playback-stop.png")); tools_movies_recordFromPowerOn = tools_movies->addAction("Record Movie (and restart system)"); tools_movies_recordFromPowerOn->setIcon(QIcon(":/16x16/media-record.png")); tools_movies_recordFromHere = tools_movies->addAction("Record Movie (starting from here)"); tools_movies_recordFromHere->setIcon(QIcon(":/16x16/media-record.png")); tools_captureScreenshot = tools->addAction("&Capture Screenshot"); tools_captureScreenshot->setIcon(QIcon(":/16x16/image-x-generic.png")); tools->addSeparator(); tools_dialog = tools->addAction("&Tools Dialog ..."); tools_dialog->setIcon(QIcon(":/16x16/preferences-desktop.png")); tools_debugger = tools->addAction("&Debugger ..."); tools_debugger->setIcon(QIcon(":/16x16/utilities-terminal.png")); #if !defined(DEBUGGER) tools_debugger->setVisible(false); #endif help = menuBar->addMenu("&Help"); help_documentation = help->addAction("&Documentation ..."); help_documentation->setIcon(QIcon(":/16x16/text-x-generic.png")); help_license = help->addAction("&License ..."); help_license->setIcon(QIcon(":/16x16/text-x-generic.png")); #if !defined(PLATFORM_OSX) help->addSeparator(); #endif help_about = help->addAction("&About ..."); help_about->setIcon(QIcon(":/16x16/help-browser.png")); help_about->setMenuRole(QAction::AboutRole); //canvas canvasContainer = new CanvasObject; canvasContainer->setAcceptDrops(true); { canvasContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); canvasContainer->setObjectName("backdrop"); canvasLayout = new QVBoxLayout; { canvasLayout->setMargin(0); canvasLayout->setAlignment(Qt::AlignCenter); canvas = new CanvasWidget; canvas->setAcceptDrops(true); canvas->setFocusPolicy(Qt::StrongFocus); canvas->setAttribute(Qt::WA_PaintOnScreen, true); //disable Qt painting on focus / resize QPalette palette; palette.setColor(QPalette::Window, QColor(0, 0, 0)); canvas->setPalette(palette); canvas->setAutoFillBackground(true); } canvasLayout->addWidget(canvas); } canvasContainer->setLayout(canvasLayout); //status bar statusBar = new QStatusBar; statusBar->showMessage(""); systemState = new QLabel; statusBar->addPermanentWidget(systemState); //layout layout = new QVBoxLayout; layout->setMargin(0); layout->setSpacing(0); #if !defined(PLATFORM_OSX) layout->addWidget(menuBar); #endif layout->addWidget(canvasContainer); layout->addWidget(statusBar); setLayout(layout); //slots connect(system_load, SIGNAL(triggered()), this, SLOT(loadCartridge())); connect(system_loadSpecial_bsxSlotted, SIGNAL(triggered()), this, SLOT(loadBsxSlottedCartridge())); connect(system_loadSpecial_bsx, SIGNAL(triggered()), this, SLOT(loadBsxCartridge())); connect(system_loadSpecial_sufamiTurbo, SIGNAL(triggered()), this, SLOT(loadSufamiTurboCartridge())); connect(system_loadSpecial_superGameBoy, SIGNAL(triggered()), this, SLOT(loadSuperGameBoyCartridge())); connect(system_power, SIGNAL(triggered()), this, SLOT(power())); connect(system_reset, SIGNAL(triggered()), this, SLOT(reset())); connect(system_port1_none, SIGNAL(triggered()), this, SLOT(setPort1None())); connect(system_port1_gamepad, SIGNAL(triggered()), this, SLOT(setPort1Gamepad())); connect(system_port1_asciipad, SIGNAL(triggered()), this, SLOT(setPort1Asciipad())); connect(system_port1_multitap, SIGNAL(triggered()), this, SLOT(setPort1Multitap())); connect(system_port1_mouse, SIGNAL(triggered()), this, SLOT(setPort1Mouse())); connect(system_port2_none, SIGNAL(triggered()), this, SLOT(setPort2None())); connect(system_port2_gamepad, SIGNAL(triggered()), this, SLOT(setPort2Gamepad())); connect(system_port2_asciipad, SIGNAL(triggered()), this, SLOT(setPort2Asciipad())); connect(system_port2_multitap, SIGNAL(triggered()), this, SLOT(setPort2Multitap())); connect(system_port2_mouse, SIGNAL(triggered()), this, SLOT(setPort2Mouse())); connect(system_port2_superscope, SIGNAL(triggered()), this, SLOT(setPort2SuperScope())); connect(system_port2_justifier, SIGNAL(triggered()), this, SLOT(setPort2Justifier())); connect(system_port2_justifiers, SIGNAL(triggered()), this, SLOT(setPort2Justifiers())); connect(system_exit, SIGNAL(triggered()), this, SLOT(quit())); connect(settings_videoMode_1x, SIGNAL(triggered()), this, SLOT(setVideoMode1x())); connect(settings_videoMode_2x, SIGNAL(triggered()), this, SLOT(setVideoMode2x())); connect(settings_videoMode_3x, SIGNAL(triggered()), this, SLOT(setVideoMode3x())); connect(settings_videoMode_4x, SIGNAL(triggered()), this, SLOT(setVideoMode4x())); connect(settings_videoMode_5x, SIGNAL(triggered()), this, SLOT(setVideoMode5x())); connect(settings_videoMode_correctAspectRatio, SIGNAL(triggered()), this, SLOT(toggleAspectCorrection())); connect(settings_videoMode_ntsc, SIGNAL(triggered()), this, SLOT(setVideoNtsc())); connect(settings_videoMode_pal, SIGNAL(triggered()), this, SLOT(setVideoPal())); if(filter.opened()) { connect(settings_videoFilter_configure, SIGNAL(triggered()), this, SLOT(configureFilter())); for(unsigned i = 0; i < settings_videoFilter_list.size(); i++) { connect(settings_videoFilter_list[i], SIGNAL(triggered()), this, SLOT(setFilter())); } } connect(settings_smoothVideo, SIGNAL(triggered()), this, SLOT(toggleSmoothVideo())); connect(settings_muteAudio, SIGNAL(triggered()), this, SLOT(muteAudio())); connect(settings_emulationSpeed_slowest, SIGNAL(triggered()), this, SLOT(setSpeedSlowest())); connect(settings_emulationSpeed_slow, SIGNAL(triggered()), this, SLOT(setSpeedSlow())); connect(settings_emulationSpeed_normal, SIGNAL(triggered()), this, SLOT(setSpeedNormal())); connect(settings_emulationSpeed_fast, SIGNAL(triggered()), this, SLOT(setSpeedFast())); connect(settings_emulationSpeed_fastest, SIGNAL(triggered()), this, SLOT(setSpeedFastest())); connect(settings_emulationSpeed_syncVideo, SIGNAL(triggered()), this, SLOT(syncVideo())); connect(settings_emulationSpeed_syncAudio, SIGNAL(triggered()), this, SLOT(syncAudio())); connect(settings_configuration, SIGNAL(triggered()), this, SLOT(showConfigWindow())); connect(tools_movies_play, SIGNAL(triggered()), this, SLOT(playMovie())); connect(tools_movies_stop, SIGNAL(triggered()), this, SLOT(stopMovie())); connect(tools_movies_recordFromPowerOn, SIGNAL(triggered()), this, SLOT(recordMovieFromPowerOn())); connect(tools_movies_recordFromHere, SIGNAL(triggered()), this, SLOT(recordMovieFromHere())); connect(tools_captureScreenshot, SIGNAL(triggered()), this, SLOT(saveScreenshot())); connect(tools_debugger, SIGNAL(triggered()), this, SLOT(showDebugger())); connect(tools_dialog, SIGNAL(triggered()), this, SLOT(showToolsDialog())); connect(help_documentation, SIGNAL(triggered()), this, SLOT(showDocumentation())); connect(help_license, SIGNAL(triggered()), this, SLOT(showLicense())); connect(help_about, SIGNAL(triggered()), this, SLOT(showAbout())); syncUi(); }