MCPcopy Create free account
hub / github.com/KDAB/GammaRay / createWidgets

Method createWidgets

ui/propertywidget.cpp:94–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void PropertyWidget::createWidgets()
95{
96 if (m_objectBaseName.isEmpty())
97 return;
98 for (PropertyWidgetTabFactoryBase *factory : std::as_const(s_tabFactories)) {
99 if (!factoryInUse(factory) && extensionAvailable(factory)) {
100 const PageInfo pi = { factory, factory->createWidget(this) };
101 m_pages.push_back(pi);
102 }
103 }
104
105 std::sort(m_pages.begin(), m_pages.end(), [](const PageInfo &lhs, const PageInfo &rhs) -> bool {
106 if (lhs.factory->priority() == rhs.factory->priority())
107 return s_tabFactories.indexOf(lhs.factory) < s_tabFactories.indexOf(rhs.factory);
108 return lhs.factory->priority() < rhs.factory->priority();
109 });
110}
111
112void PropertyWidget::updateShownTabs()
113{

Callers

nothing calls this directly

Calls 5

endMethod · 0.80
priorityMethod · 0.80
isEmptyMethod · 0.45
createWidgetMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected