Пример #1
0
void GlyphCustom::initWidget() {
	PipelineManager* pm = m_mainWnd->getPipelineManager();
	Pipeline* pl = pm->getPipeline(m_pipelineID);

	// Get the instance of OkcVisualMap
	VisualMap* visMap = pl->getVisualMap();
	assert( typeid(*visMap)==typeid(OkcVisualMap) );
	OkcVisualMap* okcVisMap = dynamic_cast<OkcVisualMap*>(visMap);

	// Get the instance of GlyphPlace
	GlyphPlace* place = okcVisMap->getGlyphPlace();
	XmdvTool::GLYPHPLACE_MODE mode = place->getGlyphPlaceMode();

	// Check one radio button about sorting mode in terms of
	// the OkcVisualMap configuration
	switch (mode) {
	case XmdvTool::GLYPHPLACE_ORIGINAL :
		ui.radioButton_orig->setChecked(true);
		changeToOriginal();
		break;
	case XmdvTool::GLYPHPLACE_ORDERED :
		ui.radioButton_order->setChecked(true);
		changeToOrdered();
		break;
	case XmdvTool::GLYPHPLACE_DATA_DRIVEN	:
		ui.radioButton_datadriven->setChecked(true);
		changeToDatadriven();
		break;
	case XmdvTool::GLYPHPLACE_DERIVED :
		ui.radioButton_derived->setChecked(true);
		changeToDerived();
		break;
	}

}
Пример #2
0
OkcPipeline* GlyphCustom::getOkcPipeline() {
    PipelineManager* pm = m_mainWnd->getPipelineManager();
    Pipeline* pl = pm->getPipeline(m_pipelineID);
    return dynamic_cast<OkcPipeline*>(pl);
}