1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2025-04-21 12:27:27 +03:00

Made GMenu2X::ts private.

Pass Touchscreen reference to constructors instead of pulling it from
the GMenu2X class.
This commit is contained in:
Maarten ter Huurne
2011-12-23 14:03:05 +01:00
parent 944ab86f9c
commit 1ad6b2f25a
40 changed files with 243 additions and 182 deletions

View File

@@ -30,9 +30,10 @@ using std::string;
using fastdelegate::MakeDelegate;
MenuSettingBool::MenuSettingBool(
GMenu2X *gmenu2x, const string &name,
const string &description, int *value)
GMenu2X *gmenu2x, Touchscreen &ts,
const string &name, const string &description, int *value)
: MenuSetting(gmenu2x, name, description)
, ts(ts)
{
_ivalue = value;
_value = NULL;
@@ -42,9 +43,10 @@ MenuSettingBool::MenuSettingBool(
}
MenuSettingBool::MenuSettingBool(
GMenu2X *gmenu2x, const string &name,
const string &description, bool *value)
GMenu2X *gmenu2x, Touchscreen &ts,
const string &name, const string &description, bool *value)
: MenuSetting(gmenu2x, name, description)
, ts(ts)
{
_value = value;
_ivalue = NULL;
@@ -55,7 +57,8 @@ MenuSettingBool::MenuSettingBool(
void MenuSettingBool::initButton()
{
IconButton *btn = new IconButton(gmenu2x, "skin:imgs/buttons/accept.png",
IconButton *btn = new IconButton(gmenu2x, ts,
"skin:imgs/buttons/accept.png",
gmenu2x->tr["Switch"]);
btn->setAction(MakeDelegate(this, &MenuSettingBool::toggle));
buttonBox.add(btn);