|
@ -143,11 +143,11 @@
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\qt\vba-m.qrc"
|
RelativePath="..\..\src\qt\vba-m.qrc"
|
||||||
|
FileType="13"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\qt\vba-m.rc"
|
RelativePath="..\..\src\qt\vba-m.rc"
|
||||||
FileType="5"
|
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
|
|
@ -23,9 +23,8 @@
|
||||||
#include "sidewidget_cheats.h"
|
#include "sidewidget_cheats.h"
|
||||||
|
|
||||||
|
|
||||||
MainWnd::MainWnd( QWidget *parent, QApplication *app, QTranslator **trans )
|
MainWnd::MainWnd( QWidget *parent, QTranslator **trans )
|
||||||
: QMainWindow( parent ),
|
: QMainWindow( parent ),
|
||||||
theApp( app ),
|
|
||||||
translator( trans ),
|
translator( trans ),
|
||||||
fileMenu( 0 ),
|
fileMenu( 0 ),
|
||||||
settingsMenu( 0 ),
|
settingsMenu( 0 ),
|
||||||
|
@ -96,14 +95,14 @@ void MainWnd::createMenus()
|
||||||
|
|
||||||
// File menu
|
// File menu
|
||||||
fileMenu = menuBar()->addMenu( tr( "&File" ) );
|
fileMenu = menuBar()->addMenu( tr( "&File" ) );
|
||||||
fileMenu->addAction( tr( "Open ROM" ), this, SLOT( showOpenROM() ) );
|
fileMenu->addAction( QIcon( ":/resources/open.png" ), tr( "Open ROM" ), this, SLOT( showOpenROM() ) );
|
||||||
fileMenu->addAction( tr( "Exit" ), this, SLOT( close() ) );
|
fileMenu->addAction( QIcon( ":/resources/exit.png" ), tr( "Exit" ), this, SLOT( close() ) );
|
||||||
|
|
||||||
|
|
||||||
// Settings menu
|
// Settings menu
|
||||||
settingsMenu = menuBar()->addMenu( tr( "&Settings" ) );
|
settingsMenu = menuBar()->addMenu( tr( "&Settings" ) );
|
||||||
settingsMenu->addAction( tr( "Main options..." ), this, SLOT( showMainOptions() ) );
|
settingsMenu->addAction( QIcon( ":/resources/settings.png" ), tr( "Main options..." ), this, SLOT( showMainOptions() ) );
|
||||||
settingsMenu->addAction( tr( "Select language..." ), this, SLOT( selectLanguage() ) );
|
settingsMenu->addAction( QIcon( ":/resources/locale.png" ), tr( "Select language..." ), this, SLOT( selectLanguage() ) );
|
||||||
settingsMenu->addAction( enableTranslationAct );
|
settingsMenu->addAction( enableTranslationAct );
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,9 +116,9 @@ void MainWnd::createMenus()
|
||||||
// Help menu
|
// Help menu
|
||||||
helpMenu = menuBar()->addMenu( tr( "&Help" ) );
|
helpMenu = menuBar()->addMenu( tr( "&Help" ) );
|
||||||
|
|
||||||
helpMenu->addAction( tr( "About &VBA-M..." ), this, SLOT( showAbout() ) );
|
helpMenu->addAction( QIcon( ":/resources/vba-m.png" ), tr( "About &VBA-M..." ), this, SLOT( showAbout() ) );
|
||||||
helpMenu->addAction( tr( "About &OpenGL..." ), this, SLOT( showAboutOpenGL() ) );
|
helpMenu->addAction( QIcon( ":/resources/gl.png" ), tr( "About &OpenGL..." ), this, SLOT( showAboutOpenGL() ) );
|
||||||
helpMenu->addAction( tr( "About &Qt..." ), this, SLOT( showAboutQt() ) );
|
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( enable ) {
|
||||||
if( *translator != 0 ) {
|
if( *translator != 0 ) {
|
||||||
theApp->installTranslator( *translator );
|
qApp->installTranslator( *translator );
|
||||||
enableTranslationAct->setChecked( true );
|
enableTranslationAct->setChecked( true );
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if( *translator != 0 ) {
|
if( *translator != 0 ) {
|
||||||
theApp->removeTranslator( *translator );
|
qApp->removeTranslator( *translator );
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -233,11 +232,6 @@ void MainWnd::showAbout()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWnd::showAboutQt()
|
|
||||||
{
|
|
||||||
QMessageBox::aboutQt( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWnd::showOpenROM()
|
void MainWnd::showOpenROM()
|
||||||
{
|
{
|
||||||
QString info;
|
QString info;
|
||||||
|
@ -246,6 +240,7 @@ void MainWnd::showOpenROM()
|
||||||
QMessageBox::about( this, tr( "Status" ), info );
|
QMessageBox::about( this, tr( "Status" ), info );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWnd::showMainOptions()
|
void MainWnd::showMainOptions()
|
||||||
{
|
{
|
||||||
ConfigDialog dialog;
|
ConfigDialog dialog;
|
||||||
|
@ -287,5 +282,6 @@ void MainWnd::showAboutOpenGL()
|
||||||
}
|
}
|
||||||
|
|
||||||
QMessageBox *test = new QMessageBox( QMessageBox::NoIcon, tr( "About OpenGL" ), info, QMessageBox::NoButton, this );
|
QMessageBox *test = new QMessageBox( QMessageBox::NoIcon, tr( "About OpenGL" ), info, QMessageBox::NoButton, this );
|
||||||
|
test->setWindowIcon( QIcon( ":/resources/gl.png" ) );
|
||||||
test->show();
|
test->show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ class MainWnd : public QMainWindow
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWnd( QWidget *parent = 0, QApplication *app = 0, QTranslator **trans = 0 );
|
MainWnd( QWidget *parent = 0, QTranslator **trans = 0 );
|
||||||
~MainWnd();
|
~MainWnd();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -38,7 +38,6 @@ private:
|
||||||
void createDockWidgets();
|
void createDockWidgets();
|
||||||
bool createDisplay();
|
bool createDisplay();
|
||||||
|
|
||||||
QApplication *theApp;
|
|
||||||
QTranslator **translator;
|
QTranslator **translator;
|
||||||
QMenu *fileMenu;
|
QMenu *fileMenu;
|
||||||
QMenu *settingsMenu;
|
QMenu *settingsMenu;
|
||||||
|
@ -52,7 +51,6 @@ private slots:
|
||||||
bool enableTranslation( bool enable );
|
bool enableTranslation( bool enable );
|
||||||
void showAbout();
|
void showAbout();
|
||||||
void showAboutOpenGL();
|
void showAboutOpenGL();
|
||||||
void showAboutQt();
|
|
||||||
void showOpenROM();
|
void showOpenROM();
|
||||||
void showMainOptions();
|
void showMainOptions();
|
||||||
};
|
};
|
||||||
|
|
|
@ -60,6 +60,7 @@ ConfigDialog::ConfigDialog()
|
||||||
|
|
||||||
|
|
||||||
setWindowTitle(tr("Options"));
|
setWindowTitle(tr("Options"));
|
||||||
|
setWindowIcon( QIcon( ":/resources/settings.png" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigDialog::createIcons()
|
void ConfigDialog::createIcons()
|
||||||
|
|
|
@ -25,7 +25,7 @@ int main( int argc, char *argv[] )
|
||||||
QApplication theApp( argc, argv );
|
QApplication theApp( argc, argv );
|
||||||
QTranslator *translator = 0;
|
QTranslator *translator = 0;
|
||||||
|
|
||||||
MainWnd *mainWnd = new MainWnd( 0, &theApp, &translator );
|
MainWnd *mainWnd = new MainWnd( 0, &translator );
|
||||||
mainWnd->show();
|
mainWnd->show();
|
||||||
|
|
||||||
return theApp.exec();
|
return theApp.exec();
|
||||||
|
|
After Width: | Height: | Size: 842 B |
After Width: | Height: | Size: 599 B |
After Width: | Height: | Size: 750 B |
After Width: | Height: | Size: 419 B |
After Width: | Height: | Size: 451 B |
After Width: | Height: | Size: 874 B |
After Width: | Height: | Size: 604 B |
|
@ -1,7 +1,14 @@
|
||||||
<!DOCTYPE RCC><RCC version="1.0">
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
<qresource>
|
<qresource>
|
||||||
<file>resources/video.png</file>
|
<file>resources/video.png</file>
|
||||||
<file>resources/input.png</file>
|
<file>resources/input.png</file>
|
||||||
<file>resources/sound.png</file>
|
<file>resources/sound.png</file>
|
||||||
</qresource>
|
<file>resources/exit.png</file>
|
||||||
|
<file>resources/locale.png</file>
|
||||||
|
<file>resources/settings.png</file>
|
||||||
|
<file>resources/open.png</file>
|
||||||
|
<file>resources/qt_logo.png</file>
|
||||||
|
<file>resources/gl.png</file>
|
||||||
|
<file>resources/vba-m.png</file>
|
||||||
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|