diff --git a/project/vc2008/vba-m.vcproj b/project/vc2008/vba-m.vcproj
index 57bd670e..ff85b26b 100644
--- a/project/vc2008/vba-m.vcproj
+++ b/project/vc2008/vba-m.vcproj
@@ -143,11 +143,11 @@
diff --git a/src/qt/MainWnd.cpp b/src/qt/MainWnd.cpp
index 3eccc3ca..7221ad0f 100644
--- a/src/qt/MainWnd.cpp
+++ b/src/qt/MainWnd.cpp
@@ -23,9 +23,8 @@
#include "sidewidget_cheats.h"
-MainWnd::MainWnd( QWidget *parent, QApplication *app, QTranslator **trans )
+MainWnd::MainWnd( QWidget *parent, QTranslator **trans )
: QMainWindow( parent ),
- theApp( app ),
translator( trans ),
fileMenu( 0 ),
settingsMenu( 0 ),
@@ -96,14 +95,14 @@ void MainWnd::createMenus()
// File menu
fileMenu = menuBar()->addMenu( tr( "&File" ) );
- fileMenu->addAction( tr( "Open ROM" ), this, SLOT( showOpenROM() ) );
- fileMenu->addAction( tr( "Exit" ), this, SLOT( close() ) );
+ fileMenu->addAction( QIcon( ":/resources/open.png" ), tr( "Open ROM" ), this, SLOT( showOpenROM() ) );
+ fileMenu->addAction( QIcon( ":/resources/exit.png" ), tr( "Exit" ), this, SLOT( close() ) );
// Settings menu
settingsMenu = menuBar()->addMenu( tr( "&Settings" ) );
- settingsMenu->addAction( tr( "Main options..." ), this, SLOT( showMainOptions() ) );
- settingsMenu->addAction( tr( "Select language..." ), this, SLOT( selectLanguage() ) );
+ settingsMenu->addAction( QIcon( ":/resources/settings.png" ), tr( "Main options..." ), this, SLOT( showMainOptions() ) );
+ settingsMenu->addAction( QIcon( ":/resources/locale.png" ), tr( "Select language..." ), this, SLOT( selectLanguage() ) );
settingsMenu->addAction( enableTranslationAct );
@@ -117,9 +116,9 @@ void MainWnd::createMenus()
// Help menu
helpMenu = menuBar()->addMenu( tr( "&Help" ) );
- helpMenu->addAction( tr( "About &VBA-M..." ), this, SLOT( showAbout() ) );
- helpMenu->addAction( tr( "About &OpenGL..." ), this, SLOT( showAboutOpenGL() ) );
- helpMenu->addAction( tr( "About &Qt..." ), this, SLOT( showAboutQt() ) );
+ helpMenu->addAction( QIcon( ":/resources/vba-m.png" ), tr( "About &VBA-M..." ), this, SLOT( showAbout() ) );
+ helpMenu->addAction( QIcon( ":/resources/gl.png" ), tr( "About &OpenGL..." ), this, SLOT( showAboutOpenGL() ) );
+ helpMenu->addAction( QIcon( ":/resources/qt_logo.png" ), tr( "About &Qt..." ), qApp, SLOT( aboutQt() ) );
}
@@ -199,14 +198,14 @@ bool MainWnd::enableTranslation( bool enable )
{
if( enable ) {
if( *translator != 0 ) {
- theApp->installTranslator( *translator );
+ qApp->installTranslator( *translator );
enableTranslationAct->setChecked( true );
} else {
return false;
}
} else {
if( *translator != 0 ) {
- theApp->removeTranslator( *translator );
+ qApp->removeTranslator( *translator );
} else {
return false;
}
@@ -233,11 +232,6 @@ void MainWnd::showAbout()
}
-void MainWnd::showAboutQt()
-{
- QMessageBox::aboutQt( this );
-}
-
void MainWnd::showOpenROM()
{
QString info;
@@ -246,6 +240,7 @@ void MainWnd::showOpenROM()
QMessageBox::about( this, tr( "Status" ), info );
}
+
void MainWnd::showMainOptions()
{
ConfigDialog dialog;
@@ -287,5 +282,6 @@ void MainWnd::showAboutOpenGL()
}
QMessageBox *test = new QMessageBox( QMessageBox::NoIcon, tr( "About OpenGL" ), info, QMessageBox::NoButton, this );
+ test->setWindowIcon( QIcon( ":/resources/gl.png" ) );
test->show();
}
diff --git a/src/qt/MainWnd.h b/src/qt/MainWnd.h
index ab8c3f48..70200b8a 100644
--- a/src/qt/MainWnd.h
+++ b/src/qt/MainWnd.h
@@ -26,7 +26,7 @@ class MainWnd : public QMainWindow
Q_OBJECT
public:
- MainWnd( QWidget *parent = 0, QApplication *app = 0, QTranslator **trans = 0 );
+ MainWnd( QWidget *parent = 0, QTranslator **trans = 0 );
~MainWnd();
public slots:
@@ -38,7 +38,6 @@ private:
void createDockWidgets();
bool createDisplay();
- QApplication *theApp;
QTranslator **translator;
QMenu *fileMenu;
QMenu *settingsMenu;
@@ -52,7 +51,6 @@ private slots:
bool enableTranslation( bool enable );
void showAbout();
void showAboutOpenGL();
- void showAboutQt();
void showOpenROM();
void showMainOptions();
};
diff --git a/src/qt/configdialog.cpp b/src/qt/configdialog.cpp
index e43bb351..d009b28f 100644
--- a/src/qt/configdialog.cpp
+++ b/src/qt/configdialog.cpp
@@ -60,6 +60,7 @@ ConfigDialog::ConfigDialog()
setWindowTitle(tr("Options"));
+ setWindowIcon( QIcon( ":/resources/settings.png" ) );
}
void ConfigDialog::createIcons()
diff --git a/src/qt/main.cpp b/src/qt/main.cpp
index c3f2d03f..ae150cf5 100644
--- a/src/qt/main.cpp
+++ b/src/qt/main.cpp
@@ -25,7 +25,7 @@ int main( int argc, char *argv[] )
QApplication theApp( argc, argv );
QTranslator *translator = 0;
- MainWnd *mainWnd = new MainWnd( 0, &theApp, &translator );
+ MainWnd *mainWnd = new MainWnd( 0, &translator );
mainWnd->show();
return theApp.exec();
diff --git a/src/qt/resources/exit.png b/src/qt/resources/exit.png
new file mode 100644
index 00000000..4839c614
Binary files /dev/null and b/src/qt/resources/exit.png differ
diff --git a/src/qt/resources/gl.png b/src/qt/resources/gl.png
new file mode 100644
index 00000000..f20e0f4e
Binary files /dev/null and b/src/qt/resources/gl.png differ
diff --git a/src/qt/resources/locale.png b/src/qt/resources/locale.png
new file mode 100644
index 00000000..b8abf7c7
Binary files /dev/null and b/src/qt/resources/locale.png differ
diff --git a/src/qt/resources/open.png b/src/qt/resources/open.png
new file mode 100644
index 00000000..1d2f3012
Binary files /dev/null and b/src/qt/resources/open.png differ
diff --git a/src/qt/resources/qt_logo.png b/src/qt/resources/qt_logo.png
new file mode 100644
index 00000000..99b8c97e
Binary files /dev/null and b/src/qt/resources/qt_logo.png differ
diff --git a/src/qt/resources/settings.png b/src/qt/resources/settings.png
new file mode 100644
index 00000000..f2c7c086
Binary files /dev/null and b/src/qt/resources/settings.png differ
diff --git a/src/qt/resources/vba-m.png b/src/qt/resources/vba-m.png
new file mode 100644
index 00000000..b2d68afb
Binary files /dev/null and b/src/qt/resources/vba-m.png differ
diff --git a/src/qt/vba-m.qrc b/src/qt/vba-m.qrc
index 90fc95a3..e32c9863 100644
--- a/src/qt/vba-m.qrc
+++ b/src/qt/vba-m.qrc
@@ -1,7 +1,14 @@
-
- resources/video.png
- resources/input.png
- resources/sound.png
-
+
+ resources/video.png
+ resources/input.png
+ resources/sound.png
+ resources/exit.png
+ resources/locale.png
+ resources/settings.png
+ resources/open.png
+ resources/qt_logo.png
+ resources/gl.png
+ resources/vba-m.png
+