本文整理汇总了C++中DockWindow::attach方法的典型用法代码示例。如果您正苦于以下问题:C++ DockWindow::attach方法的具体用法?C++ DockWindow::attach怎么用?C++ DockWindow::attach使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DockWindow
的用法示例。
在下文中一共展示了DockWindow::attach方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createWidget
QWidget* SpectralLibraryMatchResults::createWidget()
{
mpTabWidget = new QTabWidget(getDockWindow()->getWidget());
mpTabWidget->setTabPosition(QTabWidget::South);
mpTabWidget->setTabShape(QTabWidget::Rounded);
mpTabWidget->setMinimumHeight(100);
// dockwindow should exist so attach to it
DockWindow* pWindow = getDockWindow();
if (pWindow != NULL)
{
pWindow->attach(SIGNAL_NAME(DockWindow, AboutToShowContextMenu),
Slot(this, &SpectralLibraryMatchResults::updateContextMenu));
// Connect to the session explorer now that the window has been created
if (mpExplorer.get() == NULL)
{
Service<SessionExplorer> pExplorer;
mpExplorer.reset(pExplorer.get());
}
// set location of the results window
#pragma message(__FILE__ "(" STRING(__LINE__) ") : warning : Replace this block when public method to locate DockWindow is available. (rforehan)")
QMainWindow* pMainWindow = dynamic_cast<QMainWindow*>(Service<DesktopServices>()->getMainWidget());
if (pMainWindow != NULL)
{
pMainWindow->addDockWidget(Qt::LeftDockWidgetArea, dynamic_cast<QDockWidget*>(pWindow), Qt::Vertical);
}
}
return mpTabWidget;
}
示例2: createWidget
QWidget* RangeProfilePlotManager::createWidget()
{
DockWindow* pWindow = getDockWindow();
VERIFYRV(pWindow, NULL);
pWindow->attach(SIGNAL_NAME(Window, SessionItemDropped), Slot(this, &RangeProfilePlotManager::dropSessionItem));
pWindow->enableSessionItemDrops(this);
if (!Service<SessionManager>()->isSessionLoading())
{
mpPlot = Service<DesktopServices>()->createPlotWidget(getName(), CARTESIAN_PLOT);
}
if (mpPlot == NULL)
{
return NULL;
}
mpView = mpPlot->getPlot();
#pragma message(__FILE__ "(" STRING(__LINE__) ") : warning : If a SHALLOW_SELECTION selection mode is added " \
"to plot view (OPTICKS-528), mpView should use it (tclarke)")
mpMode = (mpView == NULL) ? NULL : mpView->getMouseMode("SelectionMode");
if (mpMode == NULL)
{
return NULL;
}
mpView->getWidget()->installEventFilter(this);
mpPlot->attach(SIGNAL_NAME(PlotWidget, AboutToShowContextMenu),
Slot(this, &RangeProfilePlotManager::updateContextMenu));
mpView->enableMouseMode(mpMode, true);
mpView->setMouseMode(mpMode);
return mpPlot->getWidget();
}