当前位置: 首页>>代码示例>>C++>>正文


C++ Q_TYPEID函数代码示例

本文整理汇总了C++中Q_TYPEID函数的典型用法代码示例。如果您正苦于以下问题:C++ Q_TYPEID函数的具体用法?C++ Q_TYPEID怎么用?C++ Q_TYPEID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Q_TYPEID函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Q_UNUSED

void Q3WizardPlugin::initialize(QDesignerFormEditorInterface *core)
{
    Q_UNUSED(core);

    if (m_initialized)
        return;

    m_initialized = true;
    QExtensionManager *mgr = core->extensionManager();
    Q3WizardPropertySheetFactory::registerExtension(mgr);
    mgr->registerExtensions(new Q3WizardContainerFactory(mgr), Q_TYPEID(QDesignerContainerExtension));
    mgr->registerExtensions(new Q3WizardExtraInfoFactory(core, mgr), Q_TYPEID(QDesignerExtraInfoExtension));
}
开发者ID:Fale,项目名称:qtmoko,代码行数:13,代码来源:q3wizard_plugin.cpp

示例2: Q_TYPEID

void QAxWidgetPlugin::initialize(QDesignerFormEditorInterface *core)
{
    if (m_core != 0)
        return;

    m_core = core;

    QExtensionManager *mgr = core->extensionManager();
    ActiveXPropertySheetFactory::registerExtension(mgr);
    ActiveXTaskMenuFactory::registerExtension(mgr, Q_TYPEID(QDesignerTaskMenuExtension));
    QAxWidgetExtraInfoFactory *extraInfoFactory = new QAxWidgetExtraInfoFactory(core, mgr);
    mgr->registerExtensions(extraInfoFactory, Q_TYPEID(QDesignerExtraInfoExtension));
}
开发者ID:NikhilNJ,项目名称:screenplay-dx,代码行数:13,代码来源:qaxwidgetplugin.cpp

示例3: MyTaskMenuExtension

//! [1]
        QObject *AGeneralExtensionFactory::createExtension(QObject *object,
                const QString &iid, QObject *parent) const
        {
            MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);

            if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
                return new MyTaskMenuExtension(widget, parent);

            } else if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
                return new MyContainerExtension(widget, parent);

            } else {
                return 0;
            }
        }
开发者ID:Andreas665,项目名称:qt,代码行数:16,代码来源:tools_designer_src_lib_extension_default_extensionfactory.cpp

示例4: WolfDesignerMenu

QObject *WolfDesignerMenuFactory::createExtension( QObject *_object, const QString &_iid, QObject *_parent ) const
{
	if( _iid != Q_TYPEID( QDesignerTaskMenuExtension ) ) {
		return 0;
	}
	
	if( qobject_cast<QWidget *>( _object ) ) {

		QWidget *w = qobject_cast<QWidget *>( _object );

		// the menu is requested once per widget and lifetime,
		// so we can't make things depend on properties or states!

		//~ QDesignerFormWindowInterface *formWindow;
		//~ formWindow = QDesignerFormWindowInterface::findFormWindow( w );

//~ 
     //~ formWindow->cursor()->setProperty(myWidget, myProperty, newValue);
				
		QString className = w->metaObject( )->className( );
		
		// request/answer menues just for the top level widget in
		// the form editor, otherwise we loose default edit actions
		// (F2, double click) for example for text fields, push buttons
		//~ if( className == "QDesignerWidget" ) {
			return new WolfDesignerMenu( w, _parent );
		//~ }
	}
	
	return 0;
}
开发者ID:Wolframe,项目名称:wolfclient,代码行数:31,代码来源:WolfDesignerMenu.cpp

示例5: QDesignerMemberSheet

QObject *QDesignerMemberSheetFactory::createExtension(QObject *object, const QString &iid, QObject *parent) const
{
    if (iid == Q_TYPEID(QDesignerMemberSheetExtension)) {
        return new QDesignerMemberSheet(object, parent);
    }

    return 0;
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:8,代码来源:qdesigner_membersheet.cpp

示例6: Q_TYPEID

void VideoPlayerPlugin::initialize(QDesignerFormEditorInterface * core)
{
    if (m_initialized)
        return;

    QExtensionManager *mgr = core->extensionManager();
    VideoPlayerTaskMenuFactory::registerExtension(mgr, Q_TYPEID(QDesignerTaskMenuExtension));
    m_initialized = true;
}
开发者ID:sicily,项目名称:qt4.8.4,代码行数:9,代码来源:videoplayerplugin.cpp

示例7: NavBarContainerExtension

QObject *NavBarExtensionFactory::createExtension(QObject *object, const QString &iid, QObject *parent) const
{
    NavBar *widget = qobject_cast<NavBar*>(object);

    if (widget && (iid == Q_TYPEID(QDesignerContainerExtension)))
        return new NavBarContainerExtension(widget, parent);
    else
        return 0;
}
开发者ID:Jinxiaohai,项目名称:QT,代码行数:9,代码来源:navbarextensionfactory.cpp

示例8:

QObject *Q3ListBoxExtraInfoFactory::createExtension(QObject *object, const QString &iid, QObject *parent) const
{
    if (iid != Q_TYPEID(QDesignerExtraInfoExtension))
        return 0;

    if (Q3ListBox *w = qobject_cast<Q3ListBox*>(object))
        return new Q3ListBoxExtraInfo(w, m_core, parent);

    return 0;
}
开发者ID:NikhilNJ,项目名称:screenplay-dx,代码行数:10,代码来源:q3listbox_extrainfo.cpp

示例9: QwwWidgetsExtensionFactory

void QwwTwoColorIndicatorIface::initialize(QDesignerFormEditorInterface * formEditor) {
    if (isInitialized())
        return;
    wwWidgetInterface::initialize(formEditor);
    QExtensionManager *manager = formEditor->extensionManager();
    QExtensionFactory *factory = new QwwWidgetsExtensionFactory(manager);

    Q_ASSERT(manager != 0);
    manager->registerExtensions(factory, Q_TYPEID(QDesignerTaskMenuExtension));
}
开发者ID:drescherjm,项目名称:wwwidgets,代码行数:10,代码来源:qwwtwocolorindicatoriface.cpp

示例10: QStringLiteral

void QDesignerFormBuilder::applyProperties(QObject *o, const QList<DomProperty*> &properties)
{
    typedef QList<DomProperty*> DomPropertyList;

    if (properties.empty())
        return;

    const QDesignerPropertySheetExtension *sheet = qt_extension<QDesignerPropertySheetExtension*>(core()->extensionManager(), o);
    const QDesignerDynamicPropertySheetExtension *dynamicSheet = qt_extension<QDesignerDynamicPropertySheetExtension*>(core()->extensionManager(), o);
    const bool changingMetaObject = WidgetFactory::classNameOf(core(), o) == QStringLiteral("QAxWidget");
    const QDesignerMetaObjectInterface *meta = core()->introspection()->metaObject(o);
    const bool dynamicPropertiesAllowed = dynamicSheet && dynamicSheet->dynamicPropertiesAllowed();

    QDesignerPropertySheet *designerPropertySheet = qobject_cast<QDesignerPropertySheet *>(
                    core()->extensionManager()->extension(o, Q_TYPEID(QDesignerPropertySheetExtension)));

    if (designerPropertySheet) {
        if (designerPropertySheet->pixmapCache())
            designerPropertySheet->setPixmapCache(m_pixmapCache);
        if (designerPropertySheet->iconCache())
            designerPropertySheet->setIconCache(m_iconCache);
    }

    const DomPropertyList::const_iterator cend = properties.constEnd();
    for (DomPropertyList::const_iterator it = properties.constBegin(); it != cend; ++it) {
        DomProperty *p = *it;
        QVariant v;
        if (!readDomEnumerationValue(p, sheet, v))
            v = toVariant(o->metaObject(), p);

        if (v.isNull())
            continue;

        const QString attributeName = p->attributeName();
        if (d->applyPropertyInternally(o, attributeName, v))
            continue;

        // refuse fake properties like current tab name (weak test)
        if (!dynamicPropertiesAllowed) {
            if (changingMetaObject) // Changes after setting control of QAxWidget
                meta = core()->introspection()->metaObject(o);
            if (meta->indexOfProperty(attributeName) == -1)
                continue;
        }

        QObject *obj = o;
        QAbstractScrollArea *scroll = qobject_cast<QAbstractScrollArea *>(o);
        if (scroll && attributeName == QStringLiteral("cursor") && scroll->viewport())
            obj = scroll->viewport();

        // a real property
        obj->setProperty(attributeName.toUtf8(), v);
    }
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:54,代码来源:qdesigner_formbuilder.cpp

示例11: atcmgraphTaskMenu

QObject *atcmgraphTaskMenuFactory::createExtension(QObject *object,
		const QString &iid,
		QObject *parent) const
{
	if (iid != Q_TYPEID(QDesignerTaskMenuExtension))
		return 0;

    if (ATCMgraph *anim = qobject_cast<ATCMgraph*>(object))
		return new atcmgraphTaskMenu(anim, parent);

    return 0;
}
开发者ID:MECTsrl,项目名称:mect_plugins,代码行数:12,代码来源:atcmgraphtaskmenu.cpp

示例12: TicTacToeTaskMenu

//! [5]
QObject *TicTacToeTaskMenuFactory::createExtension(QObject *object,
                                                   const QString &iid,
                                                   QObject *parent) const
{
    if (iid != Q_TYPEID(QDesignerTaskMenuExtension))
        return 0;

    if (TicTacToe *tic = qobject_cast<TicTacToe*>(object))
        return new TicTacToeTaskMenu(tic, parent);

    return 0;
}
开发者ID:AtlantisCD9,项目名称:Qt,代码行数:13,代码来源:tictactoetaskmenu.cpp

示例13: NavBarExtensionFactory

void NavBarPlugin::initialize(QDesignerFormEditorInterface *formEditor)
{
    if(initialized)
        return;

    QExtensionManager *manager = formEditor->extensionManager();
    QExtensionFactory *factory = new NavBarExtensionFactory(manager);
    Q_ASSERT(manager != 0);
    manager->registerExtensions(factory, Q_TYPEID(QDesignerContainerExtension));

    initialized = true;
}
开发者ID:kirillkovalenko,项目名称:qt-navigation-bar,代码行数:12,代码来源:navbarplugin.cpp

示例14: MyContainerExtension

//! [0]
        QObject *ANewExtensionFactory::createExtension(QObject *object,
                const QString &iid, QObject *parent) const
        {
            if (iid != Q_TYPEID(QDesignerContainerExtension))
                return 0;

            if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
                   (object))
                return new MyContainerExtension(widget, parent);

            return 0;
        }
开发者ID:Andreas665,项目名称:qt,代码行数:13,代码来源:tools_designer_src_lib_extension_default_extensionfactory.cpp

示例15: BfSubFormTaskMenu

QObject *BfSubFormTaskMenuFactory::createExtension(QObject *object,
                                                   const QString &iid,
                                                   QObject *parent) const
{
    if (iid != Q_TYPEID(QDesignerTaskMenuExtension))
        return 0;

    if (BfSubForm *bfsf = qobject_cast<BfSubForm*>(object))
        return new BfSubFormTaskMenu(bfsf, parent);

    return 0;
}
开发者ID:JustDevZero,项目名称:bulmages,代码行数:12,代码来源:bfsubformtaskmenu.cpp


注:本文中的Q_TYPEID函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。