Ejemplo n.º 1
0
void MainMenuButton::onActiveToggle(bool state)
{
	if (state)
	{
		setDefaultImage("#menu_button");
	}
	else
	{
		setDefaultImage("#menu_button_nonactive");
	}
}
int WallpaperImage::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    typedef bb::cascades::ImageView QMocSuperClass;
    _id = QMocSuperClass::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 13)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 13;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QUrl*>(_v) = url(); break;
        case 1: *reinterpret_cast< QString*>(_v) = imageID(); break;
        case 2: *reinterpret_cast< float*>(_v) = loading(); break;
        case 3: *reinterpret_cast< QUrl*>(_v) = defaultImage(); break;
        case 4: *reinterpret_cast< bool*>(_v) = ready(); break;
        }
        _id -= 5;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setUrl(*reinterpret_cast< QUrl*>(_v)); break;
        case 1: setImageID(*reinterpret_cast< QString*>(_v)); break;
        case 2: setLoading(*reinterpret_cast< float*>(_v)); break;
        case 3: setDefaultImage(*reinterpret_cast< QUrl*>(_v)); break;
        case 4: setReady(*reinterpret_cast< bool*>(_v)); break;
        }
        _id -= 5;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 5;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Ejemplo n.º 3
0
MainMenuButton::MainMenuButton(wxWindow* parent, bool offline) : gcImageButton(parent, wxID_ANY, wxDefaultPosition, wxSize(30, 66))//, gcCustomMenu()
{
	Bind(wxEVT_KILL_FOCUS, &MainMenuButton::onBlur, this);
	Bind(wxEVT_COMMAND_BUTTON_CLICKED, &MainMenuButton::onMouseClick, this);

	SetBackgroundColour( wxColour(128,128,0) );
	SetSize(wxSize( 30,66 ));

	setDefaultImage("#menu_button");
	setHoverImage("#menu_button_hover");
	
	m_mainMenu = NULL;
	createMenu(offline);

	m_bIgnoreNextClick = false;
}