1 /*	Copyright 2008 Filipe Azevedo <pasnox@gmail.com>
2 
3 	This file is part of Yabause.
4 
5 	Yabause is free software; you can redistribute it and/or modify
6 	it under the terms of the GNU General Public License as published by
7 	the Free Software Foundation; either version 2 of the License, or
8 	(at your option) any later version.
9 
10 	Yabause is distributed in the hope that it will be useful,
11 	but WITHOUT ANY WARRANTY; without even the implied warranty of
12 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 	GNU General Public License for more details.
14 
15 	You should have received a copy of the GNU General Public License
16 	along with Yabause; if not, write to the Free Software
17 	Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
18 */
19 #include "UICheatRaw.h"
20 #include "UIHexInput.h"
21 #include "../QtYabause.h"
22 
UICheatRaw(QWidget * p)23 UICheatRaw::UICheatRaw( QWidget* p )
24 	: QDialog( p )
25 {
26 	// setup dialog
27 	setupUi( this );
28 
29 	// fill types
30 	mButtonGroup = new QButtonGroup( this );
31 	mButtonGroup->addButton( rbEnable, CHEATTYPE_ENABLE );
32 	mButtonGroup->addButton( rbByte, CHEATTYPE_BYTEWRITE );
33 	mButtonGroup->addButton( rbWord, CHEATTYPE_WORDWRITE );
34 	mButtonGroup->addButton( rbLong, CHEATTYPE_LONGWRITE );
35 
36 	leAddress->setValidator(new HexValidator(0x00000000, 0xFFFFFFFF, leAddress));
37 	leValue->setValidator(new HexValidator(0x00000000, 0xFFFFFFFF, leValue));
38 
39 	// retranslate widgets
40 	QtYabause::retranslateWidget( this );
41 }
42