ADDED basic cheat sidebar

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@365 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
spacy51 2008-02-10 15:32:44 +00:00
parent 17ca636ce3
commit e48f793db8
9 changed files with 270 additions and 61 deletions

View File

@ -61,97 +61,97 @@
<context> <context>
<name>MainWnd</name> <name>MainWnd</name>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="36"/> <location filename="../src/qt/MainWnd.cpp" line="38"/>
<source>VBA-M</source> <source>VBA-M</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="90"/> <location filename="../src/qt/MainWnd.cpp" line="93"/>
<source>&amp;File</source> <source>&amp;File</source>
<translation>&amp;Datei</translation> <translation>&amp;Datei</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="95"/> <location filename="../src/qt/MainWnd.cpp" line="98"/>
<source>&amp;Settings</source> <source>&amp;Settings</source>
<translation>&amp;Einstellungen</translation> <translation>&amp;Einstellungen</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="101"/> <location filename="../src/qt/MainWnd.cpp" line="104"/>
<source>&amp;Tools</source> <source>&amp;Tools</source>
<translation>&amp;Werkzeuge</translation> <translation>&amp;Werkzeuge</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="105"/> <location filename="../src/qt/MainWnd.cpp" line="108"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation>&amp;Hilfe</translation> <translation>&amp;Hilfe</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="108"/> <location filename="../src/qt/MainWnd.cpp" line="111"/>
<source>About &amp;OpenGL...</source> <source>About &amp;OpenGL...</source>
<translation>Über &amp;OpenGL...</translation> <translation>Über &amp;OpenGL...</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="107"/> <location filename="../src/qt/MainWnd.cpp" line="110"/>
<source>About &amp;VBA-M...</source> <source>About &amp;VBA-M...</source>
<translation>Über &amp;VBA-M...</translation> <translation>Über &amp;VBA-M...</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="109"/> <location filename="../src/qt/MainWnd.cpp" line="112"/>
<source>About &amp;Qt...</source> <source>About &amp;Qt...</source>
<translation>Über &amp;Qt...</translation> <translation>Über &amp;Qt...</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="191"/> <location filename="../src/qt/MainWnd.cpp" line="210"/>
<source>This program is licensed under terms of the GNU General Public License.</source> <source>This program is licensed under terms of the GNU General Public License.</source>
<translation>Dieses Programm ist unter den Bedingungen der GNU General Public License lizenziert.</translation> <translation>Dieses Programm ist unter den Bedingungen der GNU General Public License lizenziert.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="205"/> <location filename="../src/qt/MainWnd.cpp" line="229"/>
<source>OpenGL version 2.1 is present.</source> <source>OpenGL version 2.1 is present.</source>
<translation>OpenGL Version 2.1 ist verfügbar.</translation> <translation>OpenGL Version 2.1 ist verfügbar.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="208"/> <location filename="../src/qt/MainWnd.cpp" line="232"/>
<source>OpenGL version 2.0 is present.</source> <source>OpenGL version 2.0 is present.</source>
<translation>OpenGL Version 2.0 ist verfügbar.</translation> <translation>OpenGL Version 2.0 ist verfügbar.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="211"/> <location filename="../src/qt/MainWnd.cpp" line="235"/>
<source>OpenGL version 1.5 is present.</source> <source>OpenGL version 1.5 is present.</source>
<translation>OpenGL Version 1.5 ist verfügbar.</translation> <translation>OpenGL Version 1.5 ist verfügbar.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="214"/> <location filename="../src/qt/MainWnd.cpp" line="238"/>
<source>OpenGL version 1.4 is present.</source> <source>OpenGL version 1.4 is present.</source>
<translation>OpenGL Version 1.4 ist verfügbar.</translation> <translation>OpenGL Version 1.4 ist verfügbar.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="217"/> <location filename="../src/qt/MainWnd.cpp" line="241"/>
<source>OpenGL version 1.3 is present.</source> <source>OpenGL version 1.3 is present.</source>
<translation>OpenGL Version 1.3 ist verfügbar.</translation> <translation>OpenGL Version 1.3 ist verfügbar.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="220"/> <location filename="../src/qt/MainWnd.cpp" line="244"/>
<source>OpenGL version 1.2 is present.</source> <source>OpenGL version 1.2 is present.</source>
<translation>OpenGL Version 1.2 ist verfügbar.</translation> <translation>OpenGL Version 1.2 ist verfügbar.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="223"/> <location filename="../src/qt/MainWnd.cpp" line="247"/>
<source>OpenGL version 1.1 is present.</source> <source>OpenGL version 1.1 is present.</source>
<translation>OpenGL Version 1.1 ist verfügbar.</translation> <translation>OpenGL Version 1.1 ist verfügbar.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="229"/> <location filename="../src/qt/MainWnd.cpp" line="253"/>
<source>OpenGL is NOT available!</source> <source>OpenGL is NOT available!</source>
<translation>OpenGL ist NICHT verfügbar!</translation> <translation>OpenGL ist NICHT verfügbar!</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="190"/> <location filename="../src/qt/MainWnd.cpp" line="215"/>
<source>About VBA-M</source> <source>About VBA-M</source>
<translation>Über VBA-M</translation> <translation>Über VBA-M</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="232"/> <location filename="../src/qt/MainWnd.cpp" line="256"/>
<source>About OpenGL</source> <source>About OpenGL</source>
<translation>Über OpenGL</translation> <translation>Über OpenGL</translation>
</message> </message>
@ -171,44 +171,74 @@
<translation type="obsolete">Übersetzungsdateien (*.qm)</translation> <translation type="obsolete">Übersetzungsdateien (*.qm)</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="146"/> <location filename="../src/qt/MainWnd.cpp" line="164"/>
<source>.qm</source> <source>.qm</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="91"/> <location filename="../src/qt/MainWnd.cpp" line="94"/>
<source>Exit</source> <source>Exit</source>
<translation>Beenden</translation> <translation>Beenden</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="96"/> <location filename="../src/qt/MainWnd.cpp" line="99"/>
<source>Select language...</source> <source>Select language...</source>
<translation>Sprache auswählen...</translation> <translation>Sprache auswählen...</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="129"/> <location filename="../src/qt/MainWnd.cpp" line="147"/>
<source>Select language</source> <source>Select language</source>
<translation>Sprache auswählen</translation> <translation>Sprache auswählen</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="131"/> <location filename="../src/qt/MainWnd.cpp" line="149"/>
<source>Language files (*.qm)</source> <source>Language files (*.qm)</source>
<translation>Sprachdateien (*.qm)</translation> <translation>Sprachdateien (*.qm)</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="139"/> <location filename="../src/qt/MainWnd.cpp" line="157"/>
<source>Error!</source> <source>Error!</source>
<translation>Fehler!</translation> <translation>Fehler!</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="139"/> <location filename="../src/qt/MainWnd.cpp" line="157"/>
<source>Language file can not be loaded!</source> <source>Language file can not be loaded!</source>
<translation>Sprachdatei kann nicht geladen werden!</translation> <translation>Sprachdatei kann nicht geladen werden!</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="59"/> <location filename="../src/qt/MainWnd.cpp" line="62"/>
<source>Enable translation</source> <source>Enable translation</source>
<translation>Übersetzung aktivieren</translation> <translation>Übersetzung aktivieren</translation>
</message> </message>
<message>
<location filename="../src/qt/MainWnd.cpp" line="213"/>
<source>
No language file loaded.</source>
<translation>
Deutsche Übersetzung von spacy.</translation>
</message>
<message>
<location filename="../src/qt/MainWnd.cpp" line="123"/>
<source>Cheats</source>
<translation></translation>
</message>
</context>
<context>
<name>sidewidget_cheats</name>
<message>
<location filename="../src/qt/sidewidget_cheats.ui" line="25"/>
<source>Enable</source>
<translation>Aktivieren</translation>
</message>
<message>
<location filename="../src/qt/sidewidget_cheats.ui" line="32"/>
<source>Search...</source>
<translation>Suchen...</translation>
</message>
<message>
<location filename="../src/qt/sidewidget_cheats.ui" line="19"/>
<source>Cheats</source>
<translation></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -3,22 +3,22 @@
<context> <context>
<name>MainWnd</name> <name>MainWnd</name>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="36"/> <location filename="../src/qt/MainWnd.cpp" line="38"/>
<source>VBA-M</source> <source>VBA-M</source>
<translation>VBA-M</translation> <translation>VBA-M</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="90"/> <location filename="../src/qt/MainWnd.cpp" line="93"/>
<source>&amp;File</source> <source>&amp;File</source>
<translation>&amp;Archivo</translation> <translation>&amp;Archivo</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="91"/> <location filename="../src/qt/MainWnd.cpp" line="94"/>
<source>Exit</source> <source>Exit</source>
<translation>Salir</translation> <translation>Salir</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="95"/> <location filename="../src/qt/MainWnd.cpp" line="98"/>
<source>&amp;Settings</source> <source>&amp;Settings</source>
<translation>&amp;Ajustes</translation> <translation>&amp;Ajustes</translation>
</message> </message>
@ -28,27 +28,27 @@
<translation type="obsolete">Seleccione traducción...</translation> <translation type="obsolete">Seleccione traducción...</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="101"/> <location filename="../src/qt/MainWnd.cpp" line="104"/>
<source>&amp;Tools</source> <source>&amp;Tools</source>
<translation>&amp;Herramientas</translation> <translation>&amp;Herramientas</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="105"/> <location filename="../src/qt/MainWnd.cpp" line="108"/>
<source>&amp;Help</source> <source>&amp;Help</source>
<translation>&amp;Ayuda</translation> <translation>&amp;Ayuda</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="107"/> <location filename="../src/qt/MainWnd.cpp" line="110"/>
<source>About &amp;VBA-M...</source> <source>About &amp;VBA-M...</source>
<translation>Sobre &amp;VBA-M...</translation> <translation>Sobre &amp;VBA-M...</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="108"/> <location filename="../src/qt/MainWnd.cpp" line="111"/>
<source>About &amp;OpenGL...</source> <source>About &amp;OpenGL...</source>
<translation>Sobre &amp;OpenGL...</translation> <translation>Sobre &amp;OpenGL...</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="109"/> <location filename="../src/qt/MainWnd.cpp" line="112"/>
<source>About &amp;Qt...</source> <source>About &amp;Qt...</source>
<translation>Sobre &amp;Qt...</translation> <translation>Sobre &amp;Qt...</translation>
</message> </message>
@ -63,94 +63,123 @@
<translation type="obsolete">Archivos de traducción (*.qm)</translation> <translation type="obsolete">Archivos de traducción (*.qm)</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="146"/> <location filename="../src/qt/MainWnd.cpp" line="164"/>
<source>.qm</source> <source>.qm</source>
<translation>.qm</translation> <translation>.qm</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="190"/> <location filename="../src/qt/MainWnd.cpp" line="215"/>
<source>About VBA-M</source> <source>About VBA-M</source>
<translation>Sobre VBA-M</translation> <translation>Sobre VBA-M</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="191"/> <location filename="../src/qt/MainWnd.cpp" line="210"/>
<source>This program is licensed under terms of the GNU General Public License.</source> <source>This program is licensed under terms of the GNU General Public License.</source>
<translation>Este programa se licencia bajo los términos de la Licencia Pública General GNU.</translation> <translation>Este programa se licencia bajo los términos de la Licencia Pública General GNU.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="205"/> <location filename="../src/qt/MainWnd.cpp" line="229"/>
<source>OpenGL version 2.1 is present.</source> <source>OpenGL version 2.1 is present.</source>
<translation>OpenGL versión 2.1 está presente.</translation> <translation>OpenGL versión 2.1 está presente.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="208"/> <location filename="../src/qt/MainWnd.cpp" line="232"/>
<source>OpenGL version 2.0 is present.</source> <source>OpenGL version 2.0 is present.</source>
<translation>OpenGL versión 2.0 está presente.</translation> <translation>OpenGL versión 2.0 está presente.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="211"/> <location filename="../src/qt/MainWnd.cpp" line="235"/>
<source>OpenGL version 1.5 is present.</source> <source>OpenGL version 1.5 is present.</source>
<translation>OpenGL versión 1.5 está presente.</translation> <translation>OpenGL versión 1.5 está presente.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="214"/> <location filename="../src/qt/MainWnd.cpp" line="238"/>
<source>OpenGL version 1.4 is present.</source> <source>OpenGL version 1.4 is present.</source>
<translation>OpenGL versión 1.4 está presente.</translation> <translation>OpenGL versión 1.4 está presente.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="217"/> <location filename="../src/qt/MainWnd.cpp" line="241"/>
<source>OpenGL version 1.3 is present.</source> <source>OpenGL version 1.3 is present.</source>
<translation>OpenGL versión 1.3 está presente.</translation> <translation>OpenGL versión 1.3 está presente.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="220"/> <location filename="../src/qt/MainWnd.cpp" line="244"/>
<source>OpenGL version 1.2 is present.</source> <source>OpenGL version 1.2 is present.</source>
<translation>OpenGL versión 1.2 está presente.</translation> <translation>OpenGL versión 1.2 está presente.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="223"/> <location filename="../src/qt/MainWnd.cpp" line="247"/>
<source>OpenGL version 1.1 is present.</source> <source>OpenGL version 1.1 is present.</source>
<translation>OpenGL versión 1.1 está presente.</translation> <translation>OpenGL versión 1.1 está presente.</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="229"/> <location filename="../src/qt/MainWnd.cpp" line="253"/>
<source>OpenGL is NOT available!</source> <source>OpenGL is NOT available!</source>
<translation>¡OpenGL no está disponible!</translation> <translation>¡OpenGL no está disponible!</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="232"/> <location filename="../src/qt/MainWnd.cpp" line="256"/>
<source>About OpenGL</source> <source>About OpenGL</source>
<translation>Sobre OpenGL</translation> <translation>Sobre OpenGL</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="96"/> <location filename="../src/qt/MainWnd.cpp" line="99"/>
<source>Select language...</source> <source>Select language...</source>
<translation>Seleccione traducción...</translation> <translation>Seleccione traducción...</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="129"/> <location filename="../src/qt/MainWnd.cpp" line="147"/>
<source>Select language</source> <source>Select language</source>
<translation>Seleccione traducción</translation> <translation>Seleccione traducción</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="131"/> <location filename="../src/qt/MainWnd.cpp" line="149"/>
<source>Language files (*.qm)</source> <source>Language files (*.qm)</source>
<translation>Archivos de traducción (*.qm)</translation> <translation>Archivos de traducción (*.qm)</translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="139"/> <location filename="../src/qt/MainWnd.cpp" line="157"/>
<source>Error!</source> <source>Error!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="139"/> <location filename="../src/qt/MainWnd.cpp" line="157"/>
<source>Language file can not be loaded!</source> <source>Language file can not be loaded!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qt/MainWnd.cpp" line="59"/> <location filename="../src/qt/MainWnd.cpp" line="62"/>
<source>Enable translation</source> <source>Enable translation</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../src/qt/MainWnd.cpp" line="213"/>
<source>
No language file loaded.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/MainWnd.cpp" line="123"/>
<source>Cheats</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>sidewidget_cheats</name>
<message>
<location filename="../src/qt/sidewidget_cheats.ui" line="25"/>
<source>Enable</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/sidewidget_cheats.ui" line="32"/>
<source>Search...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/sidewidget_cheats.ui" line="19"/>
<source>Cheats</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -3,6 +3,9 @@ CONFIG += qt release
QT += opengl QT += opengl
TARGET = VisualBoyAdvance TARGET = VisualBoyAdvance
TRANSLATIONS += ../../lang/german.ts
TRANSLATIONS += ../../lang/spanish.ts
PRECOMPILED_HEADER = ../../src/qt/precompile.h PRECOMPILED_HEADER = ../../src/qt/precompile.h
HEADERS += ../../src/qt/main.h HEADERS += ../../src/qt/main.h
@ -14,5 +17,6 @@ SOURCES += ../../src/qt/MainWnd.cpp
HEADERS += ../../src/qt/glwidget.h HEADERS += ../../src/qt/glwidget.h
SOURCES += ../../src/qt/glwidget.cpp SOURCES += ../../src/qt/glwidget.cpp
TRANSLATIONS += ../../lang/german.ts FORMS += ../../src/qt/sidewidget_cheats.ui
TRANSLATIONS += ../../lang/spanish.ts HEADERS += ../../src/qt/sidewidget_cheats.h
SOURCES += ../../src/qt/sidewidget_cheats.cpp

View File

@ -29,7 +29,7 @@
CleanCommandLine="nmake distclean&#x0D;&#x0A;rmdir /S /Q debug&#x0D;&#x0A;rmdir /S /Q release" CleanCommandLine="nmake distclean&#x0D;&#x0A;rmdir /S /Q debug&#x0D;&#x0A;rmdir /S /Q release"
Output="$(OutDir)\VisualBoyAdvance.exe" Output="$(OutDir)\VisualBoyAdvance.exe"
PreprocessorDefinitions="WIN32;_DEBUG" PreprocessorDefinitions="WIN32;_DEBUG"
IncludeSearchPath="" IncludeSearchPath="&quot;$(ProjectDir)&quot;"
ForcedIncludes="" ForcedIncludes=""
AssemblySearchPath="" AssemblySearchPath=""
ForcedUsingAssemblies="" ForcedUsingAssemblies=""
@ -49,7 +49,7 @@
CleanCommandLine="nmake distclean&#x0D;&#x0A;rmdir /S /Q debug&#x0D;&#x0A;rmdir /S /Q release" CleanCommandLine="nmake distclean&#x0D;&#x0A;rmdir /S /Q debug&#x0D;&#x0A;rmdir /S /Q release"
Output="$(OutDir)\VisualBoyAdvance.exe" Output="$(OutDir)\VisualBoyAdvance.exe"
PreprocessorDefinitions="WIN32;NDEBUG" PreprocessorDefinitions="WIN32;NDEBUG"
IncludeSearchPath="" IncludeSearchPath="&quot;$(ProjectDir)&quot;"
ForcedIncludes="" ForcedIncludes=""
AssemblySearchPath="" AssemblySearchPath=""
ForcedUsingAssemblies="" ForcedUsingAssemblies=""
@ -88,6 +88,26 @@
> >
</File> </File>
</Filter> </Filter>
<Filter
Name="side widgets"
>
<Filter
Name="cheats"
>
<File
RelativePath="..\..\src\qt\sidewidget_cheats.cpp"
>
</File>
<File
RelativePath="..\..\src\qt\sidewidget_cheats.h"
>
</File>
<File
RelativePath="..\..\src\qt\sidewidget_cheats.ui"
>
</File>
</Filter>
</Filter>
</Filter> </Filter>
<Filter <Filter
Name="Makefile" Name="Makefile"

View File

@ -19,6 +19,7 @@
#include "MainWnd.h" #include "MainWnd.h"
#include "glwidget.h" #include "glwidget.h"
#include "sidewidget_cheats.h"
MainWnd::MainWnd( QWidget *parent, QApplication *app, QTranslator **trans ) MainWnd::MainWnd( QWidget *parent, QApplication *app, QTranslator **trans )
: QMainWindow( parent ), : QMainWindow( parent ),
@ -28,7 +29,8 @@ MainWnd::MainWnd( QWidget *parent, QApplication *app, QTranslator **trans )
settingsMenu( 0 ), settingsMenu( 0 ),
toolsMenu( 0 ), toolsMenu( 0 ),
helpMenu( 0 ), helpMenu( 0 ),
enableTranslationAct( 0 ) enableTranslationAct( 0 ),
dockWidget_cheats( 0 )
{ {
createDisplay(); createDisplay();
@ -37,6 +39,7 @@ MainWnd::MainWnd( QWidget *parent, QApplication *app, QTranslator **trans )
createActions(); createActions();
createMenus(); createMenus();
createDockWidgets();
} }
MainWnd::~MainWnd() MainWnd::~MainWnd()
@ -109,6 +112,21 @@ void MainWnd::createMenus()
helpMenu->addAction( tr( "About &Qt..." ), this, SLOT( showAboutQt() ) ); helpMenu->addAction( tr( "About &Qt..." ), this, SLOT( showAboutQt() ) );
} }
void MainWnd::createDockWidgets()
{
if( dockWidget_cheats != 0 ) {
delete dockWidget_cheats;
dockWidget_cheats = 0;
}
// Cheat Widget
dockWidget_cheats = new QDockWidget( tr( "Cheats" ), this );
SideWidget_Cheats *sw_cheats = new SideWidget_Cheats( dockWidget_cheats );
dockWidget_cheats->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
dockWidget_cheats->setWidget( sw_cheats );
addDockWidget( Qt::LeftDockWidgetArea, dockWidget_cheats );
}
bool MainWnd::createDisplay() bool MainWnd::createDisplay()
{ {
if( !QGLFormat::hasOpenGL() ) return false; if( !QGLFormat::hasOpenGL() ) return false;
@ -182,13 +200,19 @@ bool MainWnd::enableTranslation( bool enable )
// the user might have to restart the application to apply changes completely // the user might have to restart the application to apply changes completely
createActions(); createActions();
createMenus(); createMenus();
createDockWidgets();
return true; return true;
} }
void MainWnd::showAbout() void MainWnd::showAbout()
{ {
QMessageBox::about( this, tr( "About VBA-M" ), QString info;
tr( "This program is licensed under terms of the GNU General Public License." ) ); info += tr ( "This program is licensed under terms of the GNU General Public License." );
// translators may use this string to give informations about the language file
info += tr ( "\nNo language file loaded." );
QMessageBox::about( this, tr( "About VBA-M" ), info );
} }
void MainWnd::showAboutQt() void MainWnd::showAboutQt()

View File

@ -35,6 +35,7 @@ public slots:
private: private:
void createActions(); void createActions();
void createMenus(); void createMenus();
void createDockWidgets();
bool createDisplay(); bool createDisplay();
QApplication *theApp; QApplication *theApp;
@ -44,6 +45,7 @@ private:
QAction *enableTranslationAct; QAction *enableTranslationAct;
QMenu *toolsMenu; QMenu *toolsMenu;
QMenu *helpMenu; QMenu *helpMenu;
QDockWidget *dockWidget_cheats;
private slots: private slots:
bool selectLanguage(); bool selectLanguage();

View File

@ -0,0 +1,24 @@
// VBA-M, A Nintendo Handheld Console Emulator
// Copyright (C) 2008 VBA-M development team
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or(at your option)
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "sidewidget_cheats.h"
SideWidget_Cheats::SideWidget_Cheats( QWidget *parent )
: QWidget( parent )
{
ui.setupUi( this );
}

View File

@ -0,0 +1,36 @@
// VBA-M, A Nintendo Handheld Console Emulator
// Copyright (C) 2008 VBA-M development team
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or(at your option)
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef SIDEWIDGET_CHEAT_H
#define SIDEWIDGET_CHEAT_H
#include "precompile.h"
#include "ui_sidewidget_cheats.h"
class SideWidget_Cheats : public QWidget
{
Q_OBJECT
public:
SideWidget_Cheats( QWidget *parent = 0 );
private:
Ui::sidewidget_cheats ui;
};
#endif // #ifndef SIDEWIDGET_CHEAT_H

View File

@ -0,0 +1,40 @@
<ui version="4.0" >
<class>sidewidget_cheats</class>
<widget class="QWidget" name="sidewidget_cheats" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>143</width>
<height>126</height>
</rect>
</property>
<property name="minimumSize" >
<size>
<width>96</width>
<height>0</height>
</size>
</property>
<property name="windowTitle" >
<string>Cheats</string>
</property>
<layout class="QVBoxLayout" >
<item>
<widget class="QCheckBox" name="enableCheatsCheckbox" >
<property name="text" >
<string>Enable</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="searchForCheatsButton" >
<property name="text" >
<string>Search...</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>