bool QAction::qt_property( int id, int f, QVariant* v)
{
    switch ( id - staticMetaObject()->propertyOffset() ) {
    case 0: switch( f ) {
	case 0: setToggleAction(v->asBool()); break;
	case 1: *v = QVariant( this->isToggleAction(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 1: switch( f ) {
	case 0: setOn(v->asBool()); break;
	case 1: *v = QVariant( this->isOn(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 2: switch( f ) {
	case 0: setEnabled(v->asBool()); break;
	case 1: *v = QVariant( this->isEnabled(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 3: switch( f ) {
	case 0: setIconSet(v->asIconSet()); break;
	case 1: *v = QVariant( this->iconSet() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 4: switch( f ) {
	case 0: setText(v->asString()); break;
	case 1: *v = QVariant( this->text() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 5: switch( f ) {
	case 0: setMenuText(v->asString()); break;
	case 1: *v = QVariant( this->menuText() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 6: switch( f ) {
	case 0: setToolTip(v->asString()); break;
	case 1: *v = QVariant( this->toolTip() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 7: switch( f ) {
	case 0: setStatusTip(v->asString()); break;
	case 1: *v = QVariant( this->statusTip() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 8: switch( f ) {
	case 0: setWhatsThis(v->asString()); break;
	case 1: *v = QVariant( this->whatsThis() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 9: switch( f ) {
	case 0: setAccel(v->asKeySequence()); break;
	case 1: *v = QVariant( this->accel() ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    case 10: switch( f ) {
	case 0: setVisible(v->asBool()); break;
	case 1: *v = QVariant( this->isVisible(), 0 ); break;
	case 3: case 4: case 5: break;
	default: return FALSE;
    } break;
    default:
	return QObject::qt_property( id, f, v );
    }
    return TRUE;
}
Exemple #2
0
void BtStyle::setCurrentStyle(int style) {
    if (style == BtStyle::darkTheme) {

        currentStyle = style;

        BtModuleTextModel::setLinkColor(QColor(0,191,255));
        BtModuleTextModel::setHighlightColor(QColor(255,255,0));
        BtModuleTextModel::setJesusWordsColor(QColor(255,0,0));

        setTextColor(QColor(255,255,255));
        setLinkColor(QColor(0,0,80));
        setTextBackgroundColor(QColor(0,0,0));
        setTextBackgroundHighlightColor(QColor(184,135,11));

        setButtonColor(QColor(0,0,0));
        setButtonBackground(QColor(35,35,100));
        setButtonTextColor(QColor(255,210,0));
        setButtonHighlightedText(QColor(255,255,0));
        setButtonBorder(QColor(110,110,110));
        setButtonRadius(3);
        setButtonGradient0(QColor(125,125,125));
        setButtonGradient1(QColor(60,60,60));
        setButtonGradient2(QColor(50,50,50));
        setButtonGradient3(QColor(20,20,20));

        setWindowTab(QColor(100,100,100));
        setWindowTabSelected(QColor(218,165,3));
        setWindowTabText(QColor(255,255,255));
        setWindowTabTextSelected(QColor(0,0,0));

        setMenu(QColor(255,255,255));
        setMenuBorder(QColor(60,60,60));
        setMenuText(QColor(0,0,0));
        setMenuHeight(34);

        setToolbarColor(QColor(0,0,0));
        setToolbarTextColor(QColor(218,165,3));
        setToolbarButtonText(QColor(255,255,255));
        setToolbarTextPointSize(10);
    }
    else if (style == BtStyle::lightBlueTheme) {

        currentStyle = style;

        BtModuleTextModel::setLinkColor(QColor(0,0,255));
        BtModuleTextModel::setHighlightColor(QColor(0,0,255));
        BtModuleTextModel::setJesusWordsColor(QColor(255,0,0));

        setTextColor(QColor(0,0,0));
        setLinkColor(QColor(0,0,220));
        setTextBackgroundColor(QColor(255,255,255));
        setTextBackgroundHighlightColor(QColor(255,240,170));

        setButtonColor(QColor(0,0,0));
        setButtonBackground(QColor(190,220,255));
        setButtonTextColor(QColor(0,0,0));
        setButtonHighlightedText(QColor(0,0,255));
        setButtonBorder(QColor(80,80,0));
        setButtonRadius(3);
        setButtonGradient0(QColor(180,180,255));
        setButtonGradient1(QColor(255,255,255));
        setButtonGradient2(QColor(255,255,255));
        setButtonGradient3(QColor(180,180,255));

        setWindowTab(QColor(245,245,245));
        setWindowTabSelected(QColor(65,105,225));
        setWindowTabText(QColor(100,100,100));
        setWindowTabTextSelected(QColor(255,255,255));

        setMenu(QColor(255,255,255));
        setMenuBorder(QColor(220,220,220));
        setMenuText(QColor(0,0,0));
        setMenuHeight(40);

        setToolbarColor(QColor(190,220,255));
        setToolbarTextColor(QColor(0,0,0));
        setToolbarButtonText(QColor(0,0,0));
        setToolbarTextPointSize(10);
    }
    else if (style == BtStyle::crimsonTheme) {

        currentStyle = style;

        BtModuleTextModel::setLinkColor(QColor(0,0,255));
        BtModuleTextModel::setHighlightColor(QColor(0,0,255));
        BtModuleTextModel::setJesusWordsColor(QColor(170,0,0));

        setTextColor(QColor(0,0,0));
        setLinkColor(QColor(0,0,220));
        setTextBackgroundColor(QColor(255,255,255));
        setTextBackgroundHighlightColor(QColor(255,240,170));

        setButtonColor(QColor(0,0,0));
        setButtonBackground(QColor(190,220,255));
        setButtonTextColor(QColor(0,0,0));
        setButtonHighlightedText(QColor(0,0,255));
        setButtonBorder(QColor(80,80,0));
        setButtonRadius(3);
        setButtonGradient0(QColor(180,180,255));
        setButtonGradient1(QColor(255,255,255));
        setButtonGradient2(QColor(255,255,255));
        setButtonGradient3(QColor(180,180,255));

        setWindowTab(QColor(245,245,245));
        setWindowTabSelected(QColor(218,165,3));
        setWindowTabText(QColor(100,100,100));
        setWindowTabTextSelected(QColor(0,0,0));

        setMenu(QColor(255,255,255));
        setMenuBorder(QColor(220,220,220));
        setMenuText(QColor(0,0,0));
        setMenuHeight(40);

        setToolbarColor(QColor(99,0,0));
        setToolbarTextColor(QColor(255,255,255));
        setToolbarButtonText(QColor(0,0,0));
        setToolbarTextPointSize(10);
    }
}
int Q3Action::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: activated(); break;
        case 1: toggled((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 2: activate(); break;
        case 3: toggle(); break;
        case 4: setOn((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 5: setEnabled((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 6: setDisabled((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 7: setVisible((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 8: internalActivation(); break;
        case 9: toolButtonToggled((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 10: objectDestroyed(); break;
        case 11: menuStatusText((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 12: showStatusText((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 13: clearStatusText(); break;
        }
        _id -= 14;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< bool*>(_v) = isToggleAction(); break;
        case 1: *reinterpret_cast< bool*>(_v) = isOn(); break;
        case 2: *reinterpret_cast< bool*>(_v) = isEnabled(); break;
        case 3: *reinterpret_cast< QIcon*>(_v) = iconSet(); break;
        case 4: *reinterpret_cast< QString*>(_v) = text(); break;
        case 5: *reinterpret_cast< QString*>(_v) = menuText(); break;
        case 6: *reinterpret_cast< QString*>(_v) = toolTip(); break;
        case 7: *reinterpret_cast< QString*>(_v) = statusTip(); break;
        case 8: *reinterpret_cast< QString*>(_v) = whatsThis(); break;
        case 9: *reinterpret_cast< QKeySequence*>(_v) = accel(); break;
        case 10: *reinterpret_cast< bool*>(_v) = isVisible(); break;
        }
        _id -= 11;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setToggleAction(*reinterpret_cast< bool*>(_v)); break;
        case 1: setOn(*reinterpret_cast< bool*>(_v)); break;
        case 2: setEnabled(*reinterpret_cast< bool*>(_v)); break;
        case 3: setIconSet(*reinterpret_cast< QIcon*>(_v)); break;
        case 4: setText(*reinterpret_cast< QString*>(_v)); break;
        case 5: setMenuText(*reinterpret_cast< QString*>(_v)); break;
        case 6: setToolTip(*reinterpret_cast< QString*>(_v)); break;
        case 7: setStatusTip(*reinterpret_cast< QString*>(_v)); break;
        case 8: setWhatsThis(*reinterpret_cast< QString*>(_v)); break;
        case 9: setAccel(*reinterpret_cast< QKeySequence*>(_v)); break;
        case 10: setVisible(*reinterpret_cast< bool*>(_v)); break;
        }
        _id -= 11;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 11;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 11;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 11;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 11;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 11;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 11;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}