本文整理汇总了C++中shell::Pointer::GetControl方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetControl方法的具体用法?C++ Pointer::GetControl怎么用?C++ Pointer::GetControl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类shell::Pointer
的用法示例。
在下文中一共展示了Pointer::GetControl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MenuItemTriggered
void SwitchToWindowMenu::MenuItemTriggered(int index)
{
if (index < 0 || index >= windows.size()) return;
IWorkbenchWindow* window = windows[index];
Shell::Pointer windowShell = window->GetShell();
if (windowShell->GetMinimized())
{
windowShell->SetMinimized(false);
}
windowShell->SetActive();
windowShell->GetControl()->raise();
}
示例2: allShells
QList<Shell::Pointer> QtShell::GetShells()
{
GuiWidgetsTweaklet* widgetTweaklet = Tweaklets::Get(GuiWidgetsTweaklet::KEY);
QList<Shell::Pointer> allShells(widgetTweaklet->GetShells());
QList<Shell::Pointer> descendants;
for (int i = 0; i < allShells.size(); ++i)
{
Shell::Pointer shell = allShells[i];
if (widgetTweaklet->GetShell(shell->GetControl()) == this)
{
descendants.push_back(shell);
}
}
return descendants;
}
示例3: CreateShell
Shell::Pointer QtWidgetsTweakletImpl::CreateShell(Shell::Pointer parent, int style)
{
#ifdef __APPLE__
Qt::WindowFlags qtFlags(0);
#else
Qt::WindowFlags qtFlags(Qt::CustomizeWindowHint);
#endif
if (style & Constants::MAX)
qtFlags |= Qt::WindowMaximizeButtonHint;
if (style & Constants::MIN)
qtFlags |= Qt::WindowMinimizeButtonHint;
if (style & Constants::CLOSE)
{
qtFlags |= Qt::WindowSystemMenuHint;
#if QT_VERSION >= 0x040500
qtFlags |= Qt::WindowCloseButtonHint;
#endif
}
if (!(style & Constants::BORDER))
qtFlags |= Qt::FramelessWindowHint;
if (style & Constants::TITLE)
qtFlags |= Qt::WindowTitleHint;
if (style & Constants::TOOL)
qtFlags |= Qt::Tool;
QWidget* parentWidget = nullptr;
if (parent != 0)
parentWidget = static_cast<QWidget*>(parent->GetControl());
auto qtshell = new QtShell(parentWidget, qtFlags);
Shell::Pointer shell(qtshell);
shellList.push_back(shell);
if ((style & Constants::APPLICATION_MODAL)
|| (style & Constants::SYSTEM_MODAL)) qtshell->GetWidget()->setWindowModality(Qt::ApplicationModal);
if (style & Constants::PRIMARY_MODAL) qtshell->GetWidget()->setWindowModality(Qt::WindowModal);
return shell;
}