本文整理汇总了C++中QExtensionManager类的典型用法代码示例。如果您正苦于以下问题:C++ QExtensionManager类的具体用法?C++ QExtensionManager怎么用?C++ QExtensionManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QExtensionManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sipIsDerived
static PyObject *meth_QExtensionManager_registerExtensions(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
PyObject *sipParseErr = NULL;
bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf));
{
QAbstractExtensionFactory* a0;
const QString& a1def = QString();
const QString* a1 = &a1def;
int a1State = 0;
QExtensionManager *sipCpp;
static const char *sipKwdList[] = {
NULL,
sipName_iid,
};
if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ8|J1", &sipSelf, sipType_QExtensionManager, &sipCpp, sipType_QAbstractExtensionFactory, &a0, sipType_QString,&a1, &a1State))
{
Py_BEGIN_ALLOW_THREADS
(sipSelfWasArg ? sipCpp->QExtensionManager::registerExtensions(a0,*a1) : sipCpp->registerExtensions(a0,*a1));
Py_END_ALLOW_THREADS
sipReleaseType(const_cast<QString *>(a1),sipType_QString,a1State);
Py_INCREF(Py_None);
return Py_None;
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_QExtensionManager, sipName_registerExtensions, doc_QExtensionManager_registerExtensions);
return NULL;
}
示例2: QObject
TaskMenuComponent::TaskMenuComponent(QDesignerFormEditorInterface *core, QObject *parent)
: QObject(parent),
m_core(core)
{
Q_ASSERT(m_core != 0);
QExtensionManager *mgr = core->extensionManager();
const QString taskMenuId = QStringLiteral("QDesignerInternalTaskMenuExtension");
ButtonTaskMenuFactory::registerExtension(mgr, taskMenuId);
CommandLinkButtonTaskMenuFactory::registerExtension(mgr, taskMenuId); // Order!
ButtonGroupTaskMenuFactory::registerExtension(mgr, taskMenuId);
GroupBoxTaskMenuFactory::registerExtension(mgr, taskMenuId);
LabelTaskMenuFactory::registerExtension(mgr, taskMenuId);
LineEditTaskMenuFactory::registerExtension(mgr, taskMenuId);
ListWidgetTaskMenuFactory::registerExtension(mgr, taskMenuId);
TreeWidgetTaskMenuFactory::registerExtension(mgr, taskMenuId);
TableWidgetTaskMenuFactory::registerExtension(mgr, taskMenuId);
TextEditTaskMenuFactory::registerExtension(mgr, taskMenuId);
PlainTextEditTaskMenuFactory::registerExtension(mgr, taskMenuId);
MenuTaskMenuFactory::registerExtension(mgr, taskMenuId);
MenuBarTaskMenuFactory::registerExtension(mgr, taskMenuId);
ToolBarTaskMenuFactory::registerExtension(mgr, taskMenuId);
StatusBarTaskMenuFactory::registerExtension(mgr, taskMenuId);
LayoutWidgetTaskMenuFactory::registerExtension(mgr, taskMenuId);
SpacerTaskMenuFactory::registerExtension(mgr, taskMenuId);
mgr->registerExtensions(new ContainerWidgetTaskMenuFactory(core, mgr), taskMenuId);
mgr->registerExtensions(new ComboBoxTaskMenuFactory(taskMenuId, mgr), taskMenuId);
}
示例3: initialize
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));
}
示例4: initialize
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;
}
示例5: initialize
//! [0]
void MyPlugin::initialize(QDesignerFormEditorInterface *formEditor)
{
if (initialized)
return;
QExtensionManager *manager = formEditor->extensionManager();
Q_ASSERT(manager != 0);
manager->registerExtensions(new MyExtensionFactory(manager),
Q_TYPEID(QDesignerTaskMenuExtension));
initialized = true;
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:14,代码来源:tools_designer_src_lib_extension_qextensionmanager.cpp
示例6: 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));
}
示例7: initialize
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));
}
示例8: Q_UNUSED
void wActionButtonPlugin::initialize(QDesignerFormEditorInterface *core)
{
if (m_initialized)
return;
Q_UNUSED(core);
QExtensionManager *manager = core->extensionManager();
Q_ASSERT(manager != 0);
manager->registerExtensions(new wActionButtonTaskMenuFactory(manager),
Q_TYPEID(QDesignerTaskMenuExtension));
m_initialized = true;
}
示例9: release_QExtensionManager
static void release_QExtensionManager(void *sipCppV,int)
{
QExtensionManager *sipCpp = reinterpret_cast<QExtensionManager *>(sipCppV);
Py_BEGIN_ALLOW_THREADS
if (QThread::currentThread() == sipCpp->thread())
delete sipCpp;
else
sipCpp->deleteLater();
Py_END_ALLOW_THREADS
}
示例10: Q_UNUSED
void Q3IconViewPlugin::initialize(QDesignerFormEditorInterface *core)
{
Q_UNUSED(core);
if (m_initialized)
return;
QExtensionManager *mgr = core->extensionManager();
Q_ASSERT(mgr != 0);
mgr->registerExtensions(new Q3IconViewExtraInfoFactory(core, mgr), Q_TYPEID(QDesignerExtraInfoExtension));
m_initialized = true;
}
示例11: Q_UNUSED
void MainWindowDsgnPlugin::initialize(QDesignerFormEditorInterface* formEditor)
{
Q_UNUSED(formEditor);
if (initialized)
return;
initialized = true;
QExtensionManager* manager = formEditor->extensionManager();
Q_ASSERT(manager != Q_NULL);
manager->registerExtensions(new MainWindowMenuExFactory(manager), Q_TYPEID(QDesignerTaskMenuExtension));
manager->registerExtensions(new MainWindowContainerFactory(manager), Q_TYPEID(QDesignerContainerExtension));
m_core = formEditor;
}
示例12: Q_UNUSED
void wDBTablePlugin::initialize(QDesignerFormEditorInterface *core)
{
if (m_initialized)
return;
Q_UNUSED(core);
QExtensionManager *manager = core->extensionManager();
Q_ASSERT(manager != 0);
manager->registerExtensions(new wDBTableTaskMenuFactory(manager),
Q_TYPEID(QDesignerTaskMenuExtension));
m_initialized = true;
printf("wDBTable inited\n");
}
示例13: initialize
void CustomWidgetInterface::initialize(
QDesignerFormEditorInterface *formEditor)
{
if ( d_isInitialized )
return;
QExtensionManager *manager = formEditor->extensionManager();
if ( manager )
{
manager->registerExtensions(new TaskMenuFactory(manager),
Q_TYPEID(QDesignerTaskMenuExtension));
}
d_isInitialized = true;
}
示例14: connect
void OfficeStyleDsgnPlugin::initialize(QDesignerFormEditorInterface* core)
{
if (initialized)
return;
initialized = true;
m_core = core;
connect(core->formWindowManager(), SIGNAL(formWindowAdded(QDesignerFormWindowInterface*)),
this, SLOT(formWindowAdded(QDesignerFormWindowInterface*)));
#if 0
QExtensionManager* manager = core->extensionManager();
Q_ASSERT(manager != Q_NULL);
manager->registerExtensions(new DsgnRibbonTaskMenuFactory(manager), QLatin1String("QDesignerInternalTaskMenuExtension"));
#endif
}
示例15: storeExpansionState
void PropertyEditor::setObject(QObject *object)
{
QDesignerFormWindowInterface *oldFormWindow = QDesignerFormWindowInterface::findFormWindow(m_object);
// In the first setObject() call following the addition of a dynamic property, focus and edit it.
const bool editNewDynamicProperty = object != 0 && m_object == object && !m_recentlyAddedDynamicProperty.isEmpty();
m_object = object;
m_propertyManager->setObject(object);
QDesignerFormWindowInterface *formWindow = QDesignerFormWindowInterface::findFormWindow(m_object);
FormWindowBase *fwb = qobject_cast<FormWindowBase *>(formWindow);
m_treeFactory->setFormWindowBase(fwb);
m_groupFactory->setFormWindowBase(fwb);
storeExpansionState();
UpdateBlocker ub(this);
updateToolBarLabel();
QMap<QString, QtVariantProperty *> toRemove = m_nameToProperty;
const QDesignerDynamicPropertySheetExtension *dynamicSheet =
qt_extension<QDesignerDynamicPropertySheetExtension*>(m_core->extensionManager(), m_object);
const QDesignerPropertySheet *sheet = qobject_cast<QDesignerPropertySheet*>(m_core->extensionManager()->extension(m_object, Q_TYPEID(QDesignerPropertySheetExtension)));
// Optimizization: Instead of rebuilding the complete list every time, compile a list of properties to remove,
// remove them, traverse the sheet, in case property exists just set a value, otherwise - create it.
QExtensionManager *m = m_core->extensionManager();
m_propertySheet = qobject_cast<QDesignerPropertySheetExtension*>(m->extension(object, Q_TYPEID(QDesignerPropertySheetExtension)));
if (m_propertySheet) {
const int propertyCount = m_propertySheet->count();
for (int i = 0; i < propertyCount; ++i) {
if (!m_propertySheet->isVisible(i))
continue;
const QString propertyName = m_propertySheet->propertyName(i);
if (m_propertySheet->indexOf(propertyName) != i)
continue;
const QString groupName = m_propertySheet->propertyGroup(i);
const QMap<QString, QtVariantProperty *>::const_iterator rit = toRemove.constFind(propertyName);
if (rit != toRemove.constEnd()) {
QtVariantProperty *property = rit.value();
if (m_propertyToGroup.value(property) == groupName && toBrowserType(m_propertySheet->property(i), propertyName) == property->propertyType())
toRemove.remove(propertyName);
}
}
}
QMapIterator<QString, QtVariantProperty *> itRemove(toRemove);
while (itRemove.hasNext()) {
itRemove.next();
QtVariantProperty *property = itRemove.value();
m_nameToProperty.remove(itRemove.key());
m_propertyToGroup.remove(property);
delete property;
}
if (oldFormWindow != formWindow)
reloadResourceProperties();
bool isMainContainer = false;
if (QWidget *widget = qobject_cast<QWidget*>(object)) {
if (QDesignerFormWindowInterface *fw = QDesignerFormWindowInterface::findFormWindow(widget)) {
isMainContainer = (fw->mainContainer() == widget);
}
}
m_groups.clear();
if (m_propertySheet) {
QtProperty *lastProperty = 0;
QtProperty *lastGroup = 0;
const int propertyCount = m_propertySheet->count();
for (int i = 0; i < propertyCount; ++i) {
if (!m_propertySheet->isVisible(i))
continue;
const QString propertyName = m_propertySheet->propertyName(i);
if (m_propertySheet->indexOf(propertyName) != i)
continue;
const QVariant value = m_propertySheet->property(i);
const int type = toBrowserType(value, propertyName);
QtVariantProperty *property = m_nameToProperty.value(propertyName, 0);
bool newProperty = property == 0;
if (newProperty) {
property = m_propertyManager->addProperty(type, propertyName);
if (property) {
newProperty = true;
if (type == DesignerPropertyManager::enumTypeId()) {
const PropertySheetEnumValue e = qvariant_cast<PropertySheetEnumValue>(value);
QStringList names;
QStringListIterator it(e.metaEnum.keys());
while (it.hasNext())
names.append(it.next());
m_updatingBrowser = true;
property->setAttribute(m_strings.m_enumNamesAttribute, names);
m_updatingBrowser = false;
} else if (type == DesignerPropertyManager::designerFlagTypeId()) {
//.........这里部分代码省略.........