Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

geniedialog.hh

Go to the documentation of this file.
00001 /*
00002  * Game Genie Encoder/Decoder
00003  * Copyright (C) 2004-2005 emuWorks
00004  * http://games.technoplaza.net/
00005  *
00006  * This file is part of Game Genie Encoder/Decoder.
00007  *
00008  * Game Genie Encoder/Decoder is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * Game Genie Encoder/Decoder is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with Game Genie Encoder/Decoder; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021  */
00022  
00023 // $Id: geniedialog.hh,v 1.3 2005/07/30 04:55:29 technoplaza Exp $
00024 
00025 #ifndef _GENIEDIALOG_HH
00026 #define _GENIEDIALOG_HH
00027 
00028 #include <QDialog>
00029 
00030 #include "ui_maindialog.h"
00031 
00032 class QRegExpValidator;
00033 
00034 namespace emuWorks {
00035     class GenieDialog : public QDialog {
00036         Q_OBJECT
00037         
00038     private:
00039         QRegExpValidator *hexValidator;
00040         QRegExpValidator *nesValidator;
00041         QRegExpValidator *snesValidator;
00042         QRegExpValidator *genesisValidator;
00043         QRegExpValidator *gbggValidator;
00044         Ui::MainDialog ui;
00045         int system;
00046         bool encoding, decoding;        
00047         
00048         /**
00049          * Resets the controls.
00050          */
00051         void reset();
00052         
00053         /**
00054          * Encodes the value, address, and compare into a game genie code.
00055          */
00056         void encode();
00057         
00058         /**
00059          * Decodes the game genie code into value, address, and compare
00060          * components.
00061          */
00062         void decode();
00063     public:
00064         /**
00065          * Creates a new GenieDialog.
00066          */
00067         GenieDialog();
00068         
00069         /**
00070          * Destructor for a GenieDialog.
00071          */
00072         ~GenieDialog();
00073     private slots:
00074         /**
00075          * Called when the NES radio button is toggled.
00076          *
00077          * @param checked true if it was checked; false otherwise
00078          */
00079         void on_nesRadio_toggled(bool checked);
00080         
00081         /**
00082          * Called when the SNES radio button is toggled.
00083          *
00084          * @param checked true if it was checked; false otherwise
00085          */
00086         void on_snesRadio_toggled(bool checked);
00087         
00088         /**
00089          * Called when the Genesis radio button is toggled.
00090          *
00091          * @param checked true if it was checked; false otherwise
00092          */
00093         void on_genesisRadio_toggled(bool checked);
00094         
00095         /**
00096          * Called when the Game Boy / Game Gear radio button is toggled.
00097          *
00098          * @param checked true if it was checked; false otherwise
00099          */
00100         void on_gbggRadio_toggled(bool checked);
00101         
00102         /**
00103          * Called when the value box is edited.
00104          *
00105          * @param text The new text.
00106          */
00107         void on_valueEdit_textEdited(const QString &text);
00108         
00109         /**
00110          * Called when the address box is edited.
00111          * 
00112          * @param text The new text.
00113          */
00114         void on_addressEdit_textEdited(const QString &text);
00115         
00116         /**
00117          * Called when the compare box is edited.
00118          * 
00119          * @param text The new text.
00120          */
00121         void on_compareEdit_textEdited(const QString &text);
00122         
00123         /**
00124          * Called when the game genie box is edited.
00125          * 
00126          * @param text The new text.
00127          */
00128         void on_gamegenieEdit_textEdited(const QString &text);
00129     };
00130 }
00131 
00132 #endif
00133 

Generated on Sat Jul 30 15:01:51 2005 for Game Genie Encoder/Decoder by  doxygen 1.4.4