Merge pull request #260 from mjbudd77/master
Added menu and button icons to Qt GUI.
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 403 B |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 464 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 235 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 739 B |
|
@ -2,5 +2,16 @@
|
||||||
<qresource>
|
<qresource>
|
||||||
<file>fceux.png</file>
|
<file>fceux.png</file>
|
||||||
<file>fceux1.png</file>
|
<file>fceux1.png</file>
|
||||||
|
<file>icons/power.png</file>
|
||||||
|
<file>icons/media-record.png</file>
|
||||||
|
<file>icons/application-exit.png</file>
|
||||||
|
<file>icons/graphics-palette.png</file>
|
||||||
|
<file>icons/view-fullscreen.png</file>
|
||||||
|
<file>icons/input-keyboard.png</file>
|
||||||
|
<file>icons/input-gaming.png</file>
|
||||||
|
<file>icons/input-gaming-symbolic.png</file>
|
||||||
|
<file>icons/timer.png</file>
|
||||||
|
<file>icons/movie.png</file>
|
||||||
|
<file>icons/camera.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -19,6 +19,9 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
QHBoxLayout *hbox1;
|
QHBoxLayout *hbox1;
|
||||||
QLabel *lbl;
|
QLabel *lbl;
|
||||||
QPushButton *button;
|
QPushButton *button;
|
||||||
|
QStyle *style;
|
||||||
|
|
||||||
|
style = this->style();
|
||||||
|
|
||||||
setWindowTitle( tr("Video Config") );
|
setWindowTitle( tr("Video Config") );
|
||||||
|
|
||||||
|
@ -205,9 +208,11 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
|
||||||
button = new QPushButton( tr("Apply") );
|
button = new QPushButton( tr("Apply") );
|
||||||
hbox1->addWidget( button );
|
hbox1->addWidget( button );
|
||||||
connect(button, SIGNAL(clicked()), this, SLOT(applyChanges(void)) );
|
connect(button, SIGNAL(clicked()), this, SLOT(applyChanges(void)) );
|
||||||
|
button->setIcon( style->standardIcon( QStyle::SP_DialogApplyButton ) );
|
||||||
|
|
||||||
button = new QPushButton( tr("Close") );
|
button = new QPushButton( tr("Close") );
|
||||||
hbox1->addWidget( button );
|
hbox1->addWidget( button );
|
||||||
|
button->setIcon( style->standardIcon( QStyle::SP_DialogCloseButton ) );
|
||||||
connect(button, SIGNAL(clicked()), this, SLOT(closeWindow(void)) );
|
connect(button, SIGNAL(clicked()), this, SLOT(closeWindow(void)) );
|
||||||
|
|
||||||
main_vbox->addLayout( hbox1 );
|
main_vbox->addLayout( hbox1 );
|
||||||
|
|
|
@ -243,6 +243,9 @@ void consoleWin_t::createMainMenu(void)
|
||||||
QMenu *subMenu;
|
QMenu *subMenu;
|
||||||
QActionGroup *group;
|
QActionGroup *group;
|
||||||
int useNativeMenuBar;
|
int useNativeMenuBar;
|
||||||
|
QStyle *style;
|
||||||
|
|
||||||
|
style = this->style();
|
||||||
|
|
||||||
// This is needed for menu bar to show up on MacOS
|
// This is needed for menu bar to show up on MacOS
|
||||||
g_config->getOption( "SDL.UseNativeMenuBar", &useNativeMenuBar );
|
g_config->getOption( "SDL.UseNativeMenuBar", &useNativeMenuBar );
|
||||||
|
@ -257,6 +260,9 @@ void consoleWin_t::createMainMenu(void)
|
||||||
openROM = new QAction(tr("Open ROM"), this);
|
openROM = new QAction(tr("Open ROM"), this);
|
||||||
openROM->setShortcuts(QKeySequence::Open);
|
openROM->setShortcuts(QKeySequence::Open);
|
||||||
openROM->setStatusTip(tr("Open ROM File"));
|
openROM->setStatusTip(tr("Open ROM File"));
|
||||||
|
//openROM->setIcon( QIcon(":icons/rom.png") );
|
||||||
|
//openROM->setIcon( style->standardIcon( QStyle::SP_FileIcon ) );
|
||||||
|
openROM->setIcon( style->standardIcon( QStyle::SP_FileDialogStart ) );
|
||||||
connect(openROM, SIGNAL(triggered()), this, SLOT(openROMFile(void)) );
|
connect(openROM, SIGNAL(triggered()), this, SLOT(openROMFile(void)) );
|
||||||
|
|
||||||
fileMenu->addAction(openROM);
|
fileMenu->addAction(openROM);
|
||||||
|
@ -265,6 +271,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
closeROM = new QAction(tr("Close ROM"), this);
|
closeROM = new QAction(tr("Close ROM"), this);
|
||||||
closeROM->setShortcut( QKeySequence(tr("Ctrl+C")));
|
closeROM->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
closeROM->setStatusTip(tr("Close Loaded ROM"));
|
closeROM->setStatusTip(tr("Close Loaded ROM"));
|
||||||
|
closeROM->setIcon( style->standardIcon( QStyle::SP_BrowserStop ) );
|
||||||
connect(closeROM, SIGNAL(triggered()), this, SLOT(closeROMCB(void)) );
|
connect(closeROM, SIGNAL(triggered()), this, SLOT(closeROMCB(void)) );
|
||||||
|
|
||||||
fileMenu->addAction(closeROM);
|
fileMenu->addAction(closeROM);
|
||||||
|
@ -285,6 +292,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
loadStateAct = new QAction(tr("Load State From"), this);
|
loadStateAct = new QAction(tr("Load State From"), this);
|
||||||
//loadStateAct->setShortcut( QKeySequence(tr("Ctrl+N")));
|
//loadStateAct->setShortcut( QKeySequence(tr("Ctrl+N")));
|
||||||
loadStateAct->setStatusTip(tr("Load State From"));
|
loadStateAct->setStatusTip(tr("Load State From"));
|
||||||
|
loadStateAct->setIcon( style->standardIcon( QStyle::SP_FileDialogStart ) );
|
||||||
connect(loadStateAct, SIGNAL(triggered()), this, SLOT(loadStateFrom(void)) );
|
connect(loadStateAct, SIGNAL(triggered()), this, SLOT(loadStateFrom(void)) );
|
||||||
|
|
||||||
fileMenu->addAction(loadStateAct);
|
fileMenu->addAction(loadStateAct);
|
||||||
|
@ -293,6 +301,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
saveStateAct = new QAction(tr("Save State As"), this);
|
saveStateAct = new QAction(tr("Save State As"), this);
|
||||||
//loadStateAct->setShortcut( QKeySequence(tr("Ctrl+N")));
|
//loadStateAct->setShortcut( QKeySequence(tr("Ctrl+N")));
|
||||||
saveStateAct->setStatusTip(tr("Save State As"));
|
saveStateAct->setStatusTip(tr("Save State As"));
|
||||||
|
saveStateAct->setIcon( style->standardIcon( QStyle::SP_DialogSaveButton ) );
|
||||||
connect(saveStateAct, SIGNAL(triggered()), this, SLOT(saveStateAs(void)) );
|
connect(saveStateAct, SIGNAL(triggered()), this, SLOT(saveStateAs(void)) );
|
||||||
|
|
||||||
fileMenu->addAction(saveStateAct);
|
fileMenu->addAction(saveStateAct);
|
||||||
|
@ -351,6 +360,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
loadLuaAct = new QAction(tr("Load Lua Script"), this);
|
loadLuaAct = new QAction(tr("Load Lua Script"), this);
|
||||||
//loadLuaAct->setShortcut( QKeySequence(tr("F5")));
|
//loadLuaAct->setShortcut( QKeySequence(tr("F5")));
|
||||||
loadLuaAct->setStatusTip(tr("Load Lua Script"));
|
loadLuaAct->setStatusTip(tr("Load Lua Script"));
|
||||||
|
//loadLuaAct->setIcon( QIcon(":icons/lua-logo.png") );
|
||||||
connect(loadLuaAct, SIGNAL(triggered()), this, SLOT(loadLua(void)) );
|
connect(loadLuaAct, SIGNAL(triggered()), this, SLOT(loadLua(void)) );
|
||||||
|
|
||||||
fileMenu->addAction(loadLuaAct);
|
fileMenu->addAction(loadLuaAct);
|
||||||
|
@ -364,6 +374,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
scrShotAct = new QAction(tr("Screenshot"), this);
|
scrShotAct = new QAction(tr("Screenshot"), this);
|
||||||
scrShotAct->setShortcut( QKeySequence(tr("F12")));
|
scrShotAct->setShortcut( QKeySequence(tr("F12")));
|
||||||
scrShotAct->setStatusTip(tr("Screenshot"));
|
scrShotAct->setStatusTip(tr("Screenshot"));
|
||||||
|
scrShotAct->setIcon( QIcon(":icons/camera.png") );
|
||||||
connect(scrShotAct, SIGNAL(triggered()), this, SLOT(takeScreenShot()));
|
connect(scrShotAct, SIGNAL(triggered()), this, SLOT(takeScreenShot()));
|
||||||
|
|
||||||
fileMenu->addAction(scrShotAct);
|
fileMenu->addAction(scrShotAct);
|
||||||
|
@ -372,6 +383,8 @@ void consoleWin_t::createMainMenu(void)
|
||||||
quitAct = new QAction(tr("Quit"), this);
|
quitAct = new QAction(tr("Quit"), this);
|
||||||
quitAct->setShortcut( QKeySequence(tr("Ctrl+Q")));
|
quitAct->setShortcut( QKeySequence(tr("Ctrl+Q")));
|
||||||
quitAct->setStatusTip(tr("Quit the Application"));
|
quitAct->setStatusTip(tr("Quit the Application"));
|
||||||
|
//quitAct->setIcon( style->standardIcon( QStyle::SP_DialogCloseButton ) );
|
||||||
|
quitAct->setIcon( QIcon(":icons/application-exit.png") );
|
||||||
connect(quitAct, SIGNAL(triggered()), this, SLOT(closeApp()));
|
connect(quitAct, SIGNAL(triggered()), this, SLOT(closeApp()));
|
||||||
|
|
||||||
fileMenu->addAction(quitAct);
|
fileMenu->addAction(quitAct);
|
||||||
|
@ -381,17 +394,19 @@ void consoleWin_t::createMainMenu(void)
|
||||||
optMenu = menuBar()->addMenu(tr("Options"));
|
optMenu = menuBar()->addMenu(tr("Options"));
|
||||||
|
|
||||||
// Options -> Input Config
|
// Options -> Input Config
|
||||||
gamePadConfig = new QAction(tr("Input Config"), this);
|
inputConfig = new QAction(tr("Input Config"), this);
|
||||||
//gamePadConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//inputConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
gamePadConfig->setStatusTip(tr("Input Configure"));
|
inputConfig->setStatusTip(tr("Input Configure"));
|
||||||
connect(gamePadConfig, SIGNAL(triggered()), this, SLOT(openInputConfWin(void)) );
|
inputConfig->setIcon( QIcon(":icons/input-gaming.png") );
|
||||||
|
connect(inputConfig, SIGNAL(triggered()), this, SLOT(openInputConfWin(void)) );
|
||||||
|
|
||||||
optMenu->addAction(gamePadConfig);
|
optMenu->addAction(inputConfig);
|
||||||
|
|
||||||
// Options -> GamePad Config
|
// Options -> GamePad Config
|
||||||
gamePadConfig = new QAction(tr("GamePad Config"), this);
|
gamePadConfig = new QAction(tr("GamePad Config"), this);
|
||||||
//gamePadConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//gamePadConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
gamePadConfig->setStatusTip(tr("GamePad Configure"));
|
gamePadConfig->setStatusTip(tr("GamePad Configure"));
|
||||||
|
gamePadConfig->setIcon( QIcon(":icons/input-gaming-symbolic.png") );
|
||||||
connect(gamePadConfig, SIGNAL(triggered()), this, SLOT(openGamePadConfWin(void)) );
|
connect(gamePadConfig, SIGNAL(triggered()), this, SLOT(openGamePadConfWin(void)) );
|
||||||
|
|
||||||
optMenu->addAction(gamePadConfig);
|
optMenu->addAction(gamePadConfig);
|
||||||
|
@ -400,6 +415,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
gameSoundConfig = new QAction(tr("Sound Config"), this);
|
gameSoundConfig = new QAction(tr("Sound Config"), this);
|
||||||
//gameSoundConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//gameSoundConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
gameSoundConfig->setStatusTip(tr("Sound Configure"));
|
gameSoundConfig->setStatusTip(tr("Sound Configure"));
|
||||||
|
gameSoundConfig->setIcon( style->standardIcon( QStyle::SP_MediaVolume ) );
|
||||||
connect(gameSoundConfig, SIGNAL(triggered()), this, SLOT(openGameSndConfWin(void)) );
|
connect(gameSoundConfig, SIGNAL(triggered()), this, SLOT(openGameSndConfWin(void)) );
|
||||||
|
|
||||||
optMenu->addAction(gameSoundConfig);
|
optMenu->addAction(gameSoundConfig);
|
||||||
|
@ -408,6 +424,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
gameVideoConfig = new QAction(tr("Video Config"), this);
|
gameVideoConfig = new QAction(tr("Video Config"), this);
|
||||||
//gameVideoConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//gameVideoConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
gameVideoConfig->setStatusTip(tr("Video Preferences"));
|
gameVideoConfig->setStatusTip(tr("Video Preferences"));
|
||||||
|
gameVideoConfig->setIcon( style->standardIcon( QStyle::SP_ComputerIcon ) );
|
||||||
connect(gameVideoConfig, SIGNAL(triggered()), this, SLOT(openGameVideoConfWin(void)) );
|
connect(gameVideoConfig, SIGNAL(triggered()), this, SLOT(openGameVideoConfWin(void)) );
|
||||||
|
|
||||||
optMenu->addAction(gameVideoConfig);
|
optMenu->addAction(gameVideoConfig);
|
||||||
|
@ -416,6 +433,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
hotkeyConfig = new QAction(tr("Hotkey Config"), this);
|
hotkeyConfig = new QAction(tr("Hotkey Config"), this);
|
||||||
//hotkeyConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//hotkeyConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
hotkeyConfig->setStatusTip(tr("Hotkey Configure"));
|
hotkeyConfig->setStatusTip(tr("Hotkey Configure"));
|
||||||
|
hotkeyConfig->setIcon( QIcon(":icons/input-keyboard.png") );
|
||||||
connect(hotkeyConfig, SIGNAL(triggered()), this, SLOT(openHotkeyConfWin(void)) );
|
connect(hotkeyConfig, SIGNAL(triggered()), this, SLOT(openHotkeyConfWin(void)) );
|
||||||
|
|
||||||
optMenu->addAction(hotkeyConfig);
|
optMenu->addAction(hotkeyConfig);
|
||||||
|
@ -424,6 +442,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
paletteConfig = new QAction(tr("Palette Config"), this);
|
paletteConfig = new QAction(tr("Palette Config"), this);
|
||||||
//paletteConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//paletteConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
paletteConfig->setStatusTip(tr("Palette Configure"));
|
paletteConfig->setStatusTip(tr("Palette Configure"));
|
||||||
|
paletteConfig->setIcon( QIcon(":icons/graphics-palette.png") );
|
||||||
connect(paletteConfig, SIGNAL(triggered()), this, SLOT(openPaletteConfWin(void)) );
|
connect(paletteConfig, SIGNAL(triggered()), this, SLOT(openPaletteConfWin(void)) );
|
||||||
|
|
||||||
optMenu->addAction(paletteConfig);
|
optMenu->addAction(paletteConfig);
|
||||||
|
@ -432,6 +451,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
guiConfig = new QAction(tr("GUI Config"), this);
|
guiConfig = new QAction(tr("GUI Config"), this);
|
||||||
//guiConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//guiConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
guiConfig->setStatusTip(tr("GUI Configure"));
|
guiConfig->setStatusTip(tr("GUI Configure"));
|
||||||
|
guiConfig->setIcon( style->standardIcon( QStyle::SP_TitleBarNormalButton ) );
|
||||||
connect(guiConfig, SIGNAL(triggered()), this, SLOT(openGuiConfWin(void)) );
|
connect(guiConfig, SIGNAL(triggered()), this, SLOT(openGuiConfWin(void)) );
|
||||||
|
|
||||||
optMenu->addAction(guiConfig);
|
optMenu->addAction(guiConfig);
|
||||||
|
@ -440,6 +460,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
timingConfig = new QAction(tr("Timing Config"), this);
|
timingConfig = new QAction(tr("Timing Config"), this);
|
||||||
//timingConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//timingConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
timingConfig->setStatusTip(tr("Timing Configure"));
|
timingConfig->setStatusTip(tr("Timing Configure"));
|
||||||
|
timingConfig->setIcon( QIcon(":icons/timer.png") );
|
||||||
connect(timingConfig, SIGNAL(triggered()), this, SLOT(openTimingConfWin(void)) );
|
connect(timingConfig, SIGNAL(triggered()), this, SLOT(openTimingConfWin(void)) );
|
||||||
|
|
||||||
optMenu->addAction(timingConfig);
|
optMenu->addAction(timingConfig);
|
||||||
|
@ -448,6 +469,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
movieConfig = new QAction(tr("Movie Options"), this);
|
movieConfig = new QAction(tr("Movie Options"), this);
|
||||||
//movieConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//movieConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
movieConfig->setStatusTip(tr("Movie Options"));
|
movieConfig->setStatusTip(tr("Movie Options"));
|
||||||
|
movieConfig->setIcon( QIcon(":icons/movie.png") );
|
||||||
connect(movieConfig, SIGNAL(triggered()), this, SLOT(openMovieOptWin(void)) );
|
connect(movieConfig, SIGNAL(triggered()), this, SLOT(openMovieOptWin(void)) );
|
||||||
|
|
||||||
optMenu->addAction(movieConfig);
|
optMenu->addAction(movieConfig);
|
||||||
|
@ -466,8 +488,9 @@ void consoleWin_t::createMainMenu(void)
|
||||||
// Options -> Full Screen
|
// Options -> Full Screen
|
||||||
fullscreen = new QAction(tr("Fullscreen"), this);
|
fullscreen = new QAction(tr("Fullscreen"), this);
|
||||||
fullscreen->setShortcut( QKeySequence(tr("Alt+Return")));
|
fullscreen->setShortcut( QKeySequence(tr("Alt+Return")));
|
||||||
//fullscreen->setCheckable(true);
|
|
||||||
fullscreen->setStatusTip(tr("Fullscreen"));
|
fullscreen->setStatusTip(tr("Fullscreen"));
|
||||||
|
//fullscreen->setIcon( style->standardIcon( QStyle::SP_TitleBarMaxButton ) );
|
||||||
|
fullscreen->setIcon( QIcon(":icons/view-fullscreen.png") );
|
||||||
connect(fullscreen, SIGNAL(triggered()), this, SLOT(toggleFullscreen(void)) );
|
connect(fullscreen, SIGNAL(triggered()), this, SLOT(toggleFullscreen(void)) );
|
||||||
|
|
||||||
optMenu->addAction(fullscreen);
|
optMenu->addAction(fullscreen);
|
||||||
|
@ -480,6 +503,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
powerAct = new QAction(tr("Power"), this);
|
powerAct = new QAction(tr("Power"), this);
|
||||||
//powerAct->setShortcut( QKeySequence(tr("Ctrl+P")));
|
//powerAct->setShortcut( QKeySequence(tr("Ctrl+P")));
|
||||||
powerAct->setStatusTip(tr("Power On Console"));
|
powerAct->setStatusTip(tr("Power On Console"));
|
||||||
|
powerAct->setIcon( QIcon(":icons/power.png") );
|
||||||
connect(powerAct, SIGNAL(triggered()), this, SLOT(powerConsoleCB(void)) );
|
connect(powerAct, SIGNAL(triggered()), this, SLOT(powerConsoleCB(void)) );
|
||||||
|
|
||||||
emuMenu->addAction(powerAct);
|
emuMenu->addAction(powerAct);
|
||||||
|
@ -488,6 +512,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
resetAct = new QAction(tr("Reset"), this);
|
resetAct = new QAction(tr("Reset"), this);
|
||||||
//resetAct->setShortcut( QKeySequence(tr("Ctrl+R")));
|
//resetAct->setShortcut( QKeySequence(tr("Ctrl+R")));
|
||||||
resetAct->setStatusTip(tr("Reset Console"));
|
resetAct->setStatusTip(tr("Reset Console"));
|
||||||
|
resetAct->setIcon( style->standardIcon( QStyle::SP_DialogResetButton ) );
|
||||||
connect(resetAct, SIGNAL(triggered()), this, SLOT(consoleHardReset(void)) );
|
connect(resetAct, SIGNAL(triggered()), this, SLOT(consoleHardReset(void)) );
|
||||||
|
|
||||||
emuMenu->addAction(resetAct);
|
emuMenu->addAction(resetAct);
|
||||||
|
@ -496,6 +521,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
sresetAct = new QAction(tr("Soft Reset"), this);
|
sresetAct = new QAction(tr("Soft Reset"), this);
|
||||||
//sresetAct->setShortcut( QKeySequence(tr("Ctrl+R")));
|
//sresetAct->setShortcut( QKeySequence(tr("Ctrl+R")));
|
||||||
sresetAct->setStatusTip(tr("Soft Reset of Console"));
|
sresetAct->setStatusTip(tr("Soft Reset of Console"));
|
||||||
|
sresetAct->setIcon( style->standardIcon( QStyle::SP_BrowserReload ) );
|
||||||
connect(sresetAct, SIGNAL(triggered()), this, SLOT(consoleSoftReset(void)) );
|
connect(sresetAct, SIGNAL(triggered()), this, SLOT(consoleSoftReset(void)) );
|
||||||
|
|
||||||
emuMenu->addAction(sresetAct);
|
emuMenu->addAction(sresetAct);
|
||||||
|
@ -504,6 +530,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
pauseAct = new QAction(tr("Pause"), this);
|
pauseAct = new QAction(tr("Pause"), this);
|
||||||
pauseAct->setShortcut( QKeySequence(tr("Pause")));
|
pauseAct->setShortcut( QKeySequence(tr("Pause")));
|
||||||
pauseAct->setStatusTip(tr("Pause Console"));
|
pauseAct->setStatusTip(tr("Pause Console"));
|
||||||
|
pauseAct->setIcon( style->standardIcon( QStyle::SP_MediaPause ) );
|
||||||
connect(pauseAct, SIGNAL(triggered()), this, SLOT(consolePause(void)) );
|
connect(pauseAct, SIGNAL(triggered()), this, SLOT(consolePause(void)) );
|
||||||
|
|
||||||
emuMenu->addAction(pauseAct);
|
emuMenu->addAction(pauseAct);
|
||||||
|
@ -577,6 +604,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
act = new QAction(tr("Speed Up"), this);
|
act = new QAction(tr("Speed Up"), this);
|
||||||
act->setShortcut( QKeySequence(tr("=")));
|
act->setShortcut( QKeySequence(tr("=")));
|
||||||
act->setStatusTip(tr("Speed Up"));
|
act->setStatusTip(tr("Speed Up"));
|
||||||
|
act->setIcon( style->standardIcon( QStyle::SP_MediaSeekForward ) );
|
||||||
connect(act, SIGNAL(triggered()), this, SLOT(emuSpeedUp(void)) );
|
connect(act, SIGNAL(triggered()), this, SLOT(emuSpeedUp(void)) );
|
||||||
|
|
||||||
subMenu->addAction(act);
|
subMenu->addAction(act);
|
||||||
|
@ -585,6 +613,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
act = new QAction(tr("Slow Down"), this);
|
act = new QAction(tr("Slow Down"), this);
|
||||||
act->setShortcut( QKeySequence(tr("-")));
|
act->setShortcut( QKeySequence(tr("-")));
|
||||||
act->setStatusTip(tr("Slow Down"));
|
act->setStatusTip(tr("Slow Down"));
|
||||||
|
act->setIcon( style->standardIcon( QStyle::SP_MediaSeekBackward ) );
|
||||||
connect(act, SIGNAL(triggered()), this, SLOT(emuSlowDown(void)) );
|
connect(act, SIGNAL(triggered()), this, SLOT(emuSlowDown(void)) );
|
||||||
|
|
||||||
subMenu->addAction(act);
|
subMenu->addAction(act);
|
||||||
|
@ -595,6 +624,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
act = new QAction(tr("Slowest"), this);
|
act = new QAction(tr("Slowest"), this);
|
||||||
//act->setShortcut( QKeySequence(tr("-")));
|
//act->setShortcut( QKeySequence(tr("-")));
|
||||||
act->setStatusTip(tr("Slowest"));
|
act->setStatusTip(tr("Slowest"));
|
||||||
|
act->setIcon( style->standardIcon( QStyle::SP_MediaSkipBackward ) );
|
||||||
connect(act, SIGNAL(triggered()), this, SLOT(emuSlowestSpd(void)) );
|
connect(act, SIGNAL(triggered()), this, SLOT(emuSlowestSpd(void)) );
|
||||||
|
|
||||||
subMenu->addAction(act);
|
subMenu->addAction(act);
|
||||||
|
@ -603,6 +633,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
act = new QAction(tr("Normal"), this);
|
act = new QAction(tr("Normal"), this);
|
||||||
//act->setShortcut( QKeySequence(tr("-")));
|
//act->setShortcut( QKeySequence(tr("-")));
|
||||||
act->setStatusTip(tr("Normal"));
|
act->setStatusTip(tr("Normal"));
|
||||||
|
act->setIcon( style->standardIcon( QStyle::SP_MediaPlay ) );
|
||||||
connect(act, SIGNAL(triggered()), this, SLOT(emuNormalSpd(void)) );
|
connect(act, SIGNAL(triggered()), this, SLOT(emuNormalSpd(void)) );
|
||||||
|
|
||||||
subMenu->addAction(act);
|
subMenu->addAction(act);
|
||||||
|
@ -611,6 +642,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
act = new QAction(tr("Turbo"), this);
|
act = new QAction(tr("Turbo"), this);
|
||||||
//act->setShortcut( QKeySequence(tr("-")));
|
//act->setShortcut( QKeySequence(tr("-")));
|
||||||
act->setStatusTip(tr("Turbo (Fastest)"));
|
act->setStatusTip(tr("Turbo (Fastest)"));
|
||||||
|
act->setIcon( style->standardIcon( QStyle::SP_MediaSkipForward ) );
|
||||||
connect(act, SIGNAL(triggered()), this, SLOT(emuFastestSpd(void)) );
|
connect(act, SIGNAL(triggered()), this, SLOT(emuFastestSpd(void)) );
|
||||||
|
|
||||||
subMenu->addAction(act);
|
subMenu->addAction(act);
|
||||||
|
@ -745,6 +777,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
openMovAct = new QAction(tr("Play"), this);
|
openMovAct = new QAction(tr("Play"), this);
|
||||||
openMovAct->setShortcut( QKeySequence(tr("Shift+F7")));
|
openMovAct->setShortcut( QKeySequence(tr("Shift+F7")));
|
||||||
openMovAct->setStatusTip(tr("Play Movie File"));
|
openMovAct->setStatusTip(tr("Play Movie File"));
|
||||||
|
openMovAct->setIcon( style->standardIcon( QStyle::SP_MediaPlay ) );
|
||||||
connect(openMovAct, SIGNAL(triggered()), this, SLOT(openMovie(void)) );
|
connect(openMovAct, SIGNAL(triggered()), this, SLOT(openMovie(void)) );
|
||||||
|
|
||||||
movieMenu->addAction(openMovAct);
|
movieMenu->addAction(openMovAct);
|
||||||
|
@ -753,6 +786,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
stopMovAct = new QAction(tr("Stop"), this);
|
stopMovAct = new QAction(tr("Stop"), this);
|
||||||
//stopMovAct->setShortcut( QKeySequence(tr("Shift+F7")));
|
//stopMovAct->setShortcut( QKeySequence(tr("Shift+F7")));
|
||||||
stopMovAct->setStatusTip(tr("Stop Movie Recording"));
|
stopMovAct->setStatusTip(tr("Stop Movie Recording"));
|
||||||
|
stopMovAct->setIcon( style->standardIcon( QStyle::SP_MediaStop ) );
|
||||||
connect(stopMovAct, SIGNAL(triggered()), this, SLOT(stopMovie(void)) );
|
connect(stopMovAct, SIGNAL(triggered()), this, SLOT(stopMovie(void)) );
|
||||||
|
|
||||||
movieMenu->addAction(stopMovAct);
|
movieMenu->addAction(stopMovAct);
|
||||||
|
@ -763,6 +797,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
recMovAct = new QAction(tr("Record"), this);
|
recMovAct = new QAction(tr("Record"), this);
|
||||||
recMovAct->setShortcut( QKeySequence(tr("Shift+F5")));
|
recMovAct->setShortcut( QKeySequence(tr("Shift+F5")));
|
||||||
recMovAct->setStatusTip(tr("Record Movie"));
|
recMovAct->setStatusTip(tr("Record Movie"));
|
||||||
|
recMovAct->setIcon( QIcon(":icons/media-record.png") );
|
||||||
connect(recMovAct, SIGNAL(triggered()), this, SLOT(recordMovie(void)) );
|
connect(recMovAct, SIGNAL(triggered()), this, SLOT(recordMovie(void)) );
|
||||||
|
|
||||||
movieMenu->addAction(recMovAct);
|
movieMenu->addAction(recMovAct);
|
||||||
|
@ -782,6 +817,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
// Help -> About FCEUX
|
// Help -> About FCEUX
|
||||||
aboutAct = new QAction(tr("About FCEUX"), this);
|
aboutAct = new QAction(tr("About FCEUX"), this);
|
||||||
aboutAct->setStatusTip(tr("About FCEUX"));
|
aboutAct->setStatusTip(tr("About FCEUX"));
|
||||||
|
aboutAct->setIcon( style->standardIcon( QStyle::SP_MessageBoxInformation ) );
|
||||||
connect(aboutAct, SIGNAL(triggered()), this, SLOT(aboutFCEUX(void)) );
|
connect(aboutAct, SIGNAL(triggered()), this, SLOT(aboutFCEUX(void)) );
|
||||||
|
|
||||||
helpMenu->addAction(aboutAct);
|
helpMenu->addAction(aboutAct);
|
||||||
|
@ -789,6 +825,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
// Help -> About Qt
|
// Help -> About Qt
|
||||||
aboutActQt = new QAction(tr("About Qt"), this);
|
aboutActQt = new QAction(tr("About Qt"), this);
|
||||||
aboutActQt->setStatusTip(tr("About Qt"));
|
aboutActQt->setStatusTip(tr("About Qt"));
|
||||||
|
aboutActQt->setIcon( style->standardIcon( QStyle::SP_TitleBarMenuButton ) );
|
||||||
connect(aboutActQt, SIGNAL(triggered()), this, SLOT(aboutQt(void)) );
|
connect(aboutActQt, SIGNAL(triggered()), this, SLOT(aboutQt(void)) );
|
||||||
|
|
||||||
helpMenu->addAction(aboutActQt);
|
helpMenu->addAction(aboutActQt);
|
||||||
|
@ -796,6 +833,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
// Help -> Message Log
|
// Help -> Message Log
|
||||||
msgLogAct = new QAction(tr("Message Log"), this);
|
msgLogAct = new QAction(tr("Message Log"), this);
|
||||||
msgLogAct->setStatusTip(tr("Message Log"));
|
msgLogAct->setStatusTip(tr("Message Log"));
|
||||||
|
msgLogAct->setIcon( style->standardIcon( QStyle::SP_MessageBoxWarning ) );
|
||||||
connect(msgLogAct, SIGNAL(triggered()), this, SLOT(openMsgLogWin(void)) );
|
connect(msgLogAct, SIGNAL(triggered()), this, SLOT(openMsgLogWin(void)) );
|
||||||
|
|
||||||
helpMenu->addAction(msgLogAct);
|
helpMenu->addAction(msgLogAct);
|
||||||
|
|
|
@ -107,6 +107,7 @@ class consoleWin_t : public QMainWindow
|
||||||
QAction *loadLuaAct;
|
QAction *loadLuaAct;
|
||||||
QAction *scrShotAct;
|
QAction *scrShotAct;
|
||||||
QAction *quitAct;
|
QAction *quitAct;
|
||||||
|
QAction *inputConfig;
|
||||||
QAction *gamePadConfig;
|
QAction *gamePadConfig;
|
||||||
QAction *gameSoundConfig;
|
QAction *gameSoundConfig;
|
||||||
QAction *gameVideoConfig;
|
QAction *gameVideoConfig;
|
||||||
|
|
|
@ -81,9 +81,12 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
|
||||||
QPushButton *closebutton;
|
QPushButton *closebutton;
|
||||||
QPushButton *clearButton[GAMEPAD_NUM_BUTTONS];
|
QPushButton *clearButton[GAMEPAD_NUM_BUTTONS];
|
||||||
QScrollArea *scroll;
|
QScrollArea *scroll;
|
||||||
|
QStyle *style;
|
||||||
std::string prefix;
|
std::string prefix;
|
||||||
char stmp[256];
|
char stmp[256];
|
||||||
|
|
||||||
|
style = this->style();
|
||||||
|
|
||||||
gamePadConfWin = this;
|
gamePadConfWin = this;
|
||||||
|
|
||||||
// Ensure that joysticks are enabled, no harm calling init again.
|
// Ensure that joysticks are enabled, no harm calling init again.
|
||||||
|
@ -174,10 +177,12 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
|
||||||
|
|
||||||
applyProfileButton = new QPushButton( tr("Load") );
|
applyProfileButton = new QPushButton( tr("Load") );
|
||||||
applyProfileButton->setWhatsThis(tr("Sets Current Active Map to the Selected Profile"));
|
applyProfileButton->setWhatsThis(tr("Sets Current Active Map to the Selected Profile"));
|
||||||
|
applyProfileButton->setIcon( style->standardIcon( QStyle::SP_DialogApplyButton ) );
|
||||||
hbox->addWidget( applyProfileButton );
|
hbox->addWidget( applyProfileButton );
|
||||||
|
|
||||||
saveProfileButton = new QPushButton( tr("Save") );
|
saveProfileButton = new QPushButton( tr("Save") );
|
||||||
saveProfileButton->setWhatsThis(tr("Stores Current Active Map to the Selected Profile"));
|
saveProfileButton->setWhatsThis(tr("Stores Current Active Map to the Selected Profile"));
|
||||||
|
saveProfileButton->setIcon( style->standardIcon( QStyle::SP_DialogSaveButton ) );
|
||||||
hbox->addWidget( saveProfileButton );
|
hbox->addWidget( saveProfileButton );
|
||||||
|
|
||||||
hbox = new QHBoxLayout();
|
hbox = new QHBoxLayout();
|
||||||
|
@ -185,10 +190,12 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
|
||||||
|
|
||||||
newProfileButton = new QPushButton( tr("New") );
|
newProfileButton = new QPushButton( tr("New") );
|
||||||
newProfileButton->setWhatsThis(tr("Create a New Map Profile"));
|
newProfileButton->setWhatsThis(tr("Create a New Map Profile"));
|
||||||
|
newProfileButton->setIcon( style->standardIcon( QStyle::SP_FileIcon ) );
|
||||||
hbox->addWidget( newProfileButton );
|
hbox->addWidget( newProfileButton );
|
||||||
|
|
||||||
removeProfileButton = new QPushButton( tr("Delete") );
|
removeProfileButton = new QPushButton( tr("Delete") );
|
||||||
removeProfileButton->setWhatsThis(tr("Deletes the Selected Map Profile"));
|
removeProfileButton->setWhatsThis(tr("Deletes the Selected Map Profile"));
|
||||||
|
removeProfileButton->setIcon( style->standardIcon( QStyle::SP_TrashIcon ) );
|
||||||
hbox->addWidget( removeProfileButton );
|
hbox->addWidget( removeProfileButton );
|
||||||
|
|
||||||
mapMsg = new QLabel();
|
mapMsg = new QLabel();
|
||||||
|
@ -242,6 +249,9 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
|
||||||
clearAllButton = new QPushButton(tr("Clear All"));
|
clearAllButton = new QPushButton(tr("Clear All"));
|
||||||
closebutton = new QPushButton(tr("Close"));
|
closebutton = new QPushButton(tr("Close"));
|
||||||
|
|
||||||
|
clearAllButton->setIcon( style->standardIcon( QStyle::SP_LineEditClearButton ) );
|
||||||
|
closebutton->setIcon( style->standardIcon( QStyle::SP_DialogCloseButton ) );
|
||||||
|
|
||||||
hbox4->addWidget( clearAllButton );
|
hbox4->addWidget( clearAllButton );
|
||||||
hbox4->addWidget( closebutton );
|
hbox4->addWidget( closebutton );
|
||||||
|
|
||||||
|
|
|
@ -32,10 +32,13 @@ PaletteConfDialog_t::PaletteConfDialog_t(QWidget *parent)
|
||||||
//QPushButton *closebutton;
|
//QPushButton *closebutton;
|
||||||
QPushButton *button;
|
QPushButton *button;
|
||||||
QTextEdit *comments;
|
QTextEdit *comments;
|
||||||
|
QStyle *style;
|
||||||
int hue, tint;
|
int hue, tint;
|
||||||
char stmp[64];
|
char stmp[64];
|
||||||
std::string paletteFile;
|
std::string paletteFile;
|
||||||
|
|
||||||
|
style = this->style();
|
||||||
|
|
||||||
resize( 512, 600 );
|
resize( 512, 600 );
|
||||||
|
|
||||||
// sync with config
|
// sync with config
|
||||||
|
@ -63,6 +66,7 @@ PaletteConfDialog_t::PaletteConfDialog_t(QWidget *parent)
|
||||||
connect(deemphSwap, SIGNAL(stateChanged(int)), this, SLOT(deemphswap_Changed(int)) );
|
connect(deemphSwap, SIGNAL(stateChanged(int)), this, SLOT(deemphswap_Changed(int)) );
|
||||||
|
|
||||||
button = new QPushButton( tr("Open Palette") );
|
button = new QPushButton( tr("Open Palette") );
|
||||||
|
button->setIcon( style->standardIcon( QStyle::SP_FileDialogStart ) );
|
||||||
hbox1->addWidget( button );
|
hbox1->addWidget( button );
|
||||||
|
|
||||||
connect( button, SIGNAL(clicked(void)), this, SLOT(openPaletteFile(void)) );
|
connect( button, SIGNAL(clicked(void)), this, SLOT(openPaletteFile(void)) );
|
||||||
|
@ -81,6 +85,7 @@ PaletteConfDialog_t::PaletteConfDialog_t(QWidget *parent)
|
||||||
|
|
||||||
|
|
||||||
button = new QPushButton( tr("Clear") );
|
button = new QPushButton( tr("Clear") );
|
||||||
|
button->setIcon( style->standardIcon( QStyle::SP_LineEditClearButton ) );
|
||||||
hbox1->addWidget( button );
|
hbox1->addWidget( button );
|
||||||
|
|
||||||
connect( button, SIGNAL(clicked(void)), this, SLOT(clearPalette(void)) );
|
connect( button, SIGNAL(clicked(void)), this, SLOT(clearPalette(void)) );
|
||||||
|
|