本文整理汇总了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));
}
示例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));
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}