本文整理汇总了C++中SpatialDataWindow::print方法的典型用法代码示例。如果您正苦于以下问题:C++ SpatialDataWindow::print方法的具体用法?C++ SpatialDataWindow::print怎么用?C++ SpatialDataWindow::print使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpatialDataWindow
的用法示例。
在下文中一共展示了SpatialDataWindow::print方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
bool PrintView::execute(PlugInArgList* pInArgList, PlugInArgList* pOutArgList)
{
StepResource pStep("Execute Wizard Item", "app", "4EA89098-57C8-4b93-B04F-3197C59B0D58");
pStep->addProperty("Item", getName());
mpStep = pStep.get();
if (!extractInputArgs(pInArgList))
{
reportError("Unable to extract input arguments.", "9FC540AC-4BCF-4041-9E8E-484A494AF6AD");
return false;
}
// Get the window
SpatialDataWindow* pWindow = NULL;
vector<Window*> windows;
Service<DesktopServices> pDesktop;
if (pDesktop.get() != NULL)
{
pDesktop->getWindows(SPATIAL_DATA_WINDOW, windows);
}
for (vector<Window*>::iterator iter = windows.begin(); iter != windows.end(); ++iter)
{
SpatialDataWindow* pCurrentWindow = static_cast<SpatialDataWindow*>(*iter);
if (pCurrentWindow != NULL)
{
SpatialDataView* pView = pCurrentWindow->getSpatialDataView();
if (pView != NULL)
{
LayerList* pLayerList = pView->getLayerList();
if (pLayerList != NULL)
{
RasterElement* pRasterElement = pLayerList->getPrimaryRasterElement();
if (pRasterElement != NULL && pRasterElement == mpRasterElement)
{
pWindow = pCurrentWindow;
break;
}
}
}
}
}
if (pWindow == NULL)
{
reportError("Could not get the window for the data set!", "28355746-8AE3-44a4-9253-58684E1964C1");
return false;
}
// Print the view
pWindow->print(mbPrintDialog);
reportComplete();
return true;
}