Пример #1
0
SaveOperation::SaveOperation()
    : Operation("Save project")
    , m_serviceLocator(nullptr)
{
    setIcon(QIcon(":/persistenceui/images/save.png"));
    setIconVisibleInMenu(true);
}
Пример #2
0
void KAction::initWithManager(KActionManager * parent, const QString &id)
{
    setIconVisibleInMenu(true);

    if (!id.isEmpty())
        parent->insert(this, id);
}
Пример #3
0
LoadOperation::LoadOperation()
    : Operation("Open project")
    , m_serviceLocator(nullptr)
{
    setIcon(QIcon(":/persistenceui/images/load.png"));
    setIconVisibleInMenu(true);
}
InstallComponentsOperation::InstallComponentsOperation()
    : Operation("Install new")
    , m_serviceLocator(nullptr)
{
    setIcon(QIcon(":/componentSystemUi/images/install_component.png"));
    setIconVisibleInMenu(true);
}
Пример #5
0
RedoOperation::RedoOperation()
    : Operation("Redo")
    , m_action(nullptr)
{
    setIcon(QIcon(":/undo/images/redo.png"));
    setIconVisibleInMenu(true);
    setShortcut(QKeySequence("Ctrl+Y"));
}
Пример #6
0
CQLineDashAction::
CQLineDashAction(CQLineDash *parent, const std::string &id,
                 const CLineDash &dash, const QIcon &icon) :
    QAction(parent), parent_(parent), id_(id), dash_(dash)
{
    setIcon(icon);
    setText(id_.c_str());

    setIconVisibleInMenu(true);
}
Пример #7
0
int QAction::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) {
        if (_id < 15)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 15;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< bool*>(_v) = isCheckable(); break;
        case 1: *reinterpret_cast< bool*>(_v) = isChecked(); break;
        case 2: *reinterpret_cast< bool*>(_v) = isEnabled(); break;
        case 3: *reinterpret_cast< QIcon*>(_v) = icon(); break;
        case 4: *reinterpret_cast< QString*>(_v) = text(); break;
        case 5: *reinterpret_cast< QString*>(_v) = iconText(); 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< QFont*>(_v) = font(); break;
        case 10: *reinterpret_cast< QKeySequence*>(_v) = shortcut(); break;
        case 11: *reinterpret_cast< Qt::ShortcutContext*>(_v) = shortcutContext(); break;
        case 12: *reinterpret_cast< bool*>(_v) = autoRepeat(); break;
        case 13: *reinterpret_cast< bool*>(_v) = isVisible(); break;
        case 14: *reinterpret_cast< MenuRole*>(_v) = menuRole(); break;
        case 15: *reinterpret_cast< SoftKeyRole*>(_v) = softKeyRole(); break;
        case 16: *reinterpret_cast< bool*>(_v) = isIconVisibleInMenu(); break;
        case 17: *reinterpret_cast< Priority*>(_v) = priority(); break;
        }
        _id -= 18;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setCheckable(*reinterpret_cast< bool*>(_v)); break;
        case 1: setChecked(*reinterpret_cast< bool*>(_v)); break;
        case 2: setEnabled(*reinterpret_cast< bool*>(_v)); break;
        case 3: setIcon(*reinterpret_cast< QIcon*>(_v)); break;
        case 4: setText(*reinterpret_cast< QString*>(_v)); break;
        case 5: setIconText(*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: setFont(*reinterpret_cast< QFont*>(_v)); break;
        case 10: setShortcut(*reinterpret_cast< QKeySequence*>(_v)); break;
        case 11: setShortcutContext(*reinterpret_cast< Qt::ShortcutContext*>(_v)); break;
        case 12: setAutoRepeat(*reinterpret_cast< bool*>(_v)); break;
        case 13: setVisible(*reinterpret_cast< bool*>(_v)); break;
        case 14: setMenuRole(*reinterpret_cast< MenuRole*>(_v)); break;
        case 15: setSoftKeyRole(*reinterpret_cast< SoftKeyRole*>(_v)); break;
        case 16: setIconVisibleInMenu(*reinterpret_cast< bool*>(_v)); break;
        case 17: setPriority(*reinterpret_cast< Priority*>(_v)); break;
        }
        _id -= 18;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 18;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        bool *_b = reinterpret_cast<bool*>(_a[0]);
        switch (_id) {
        case 1: *_b = isCheckable(); break;
        }
        _id -= 18;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 18;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 18;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 18;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 18;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}