Esempio n. 1
0
SPlaneSlicer::SPlaneSlicer() noexcept :
    m_orientation(::fwDataTools::helper::MedicalImageAdaptor::Orientation::Z_AXIS),
    m_reslicer(vtkSmartPointer<vtkImageReslice>::New())
{
    newSlot(s_UPDATE_SLICE_TYPE_SLOT, &SPlaneSlicer::updateSliceOrientation, this);
    newSlot(s_UPDATE_DEFAULT_VALUE_SLOT, &SPlaneSlicer::updateDefaultValue, this);
}
Esempio n. 2
0
	static void Register(HSQUIRRELVM v)
	{
		PropEntry props[] =
		{
			PROP_ENTRY	(orientation),
			PROP_ENTRY_R(portrait),
			PROP_ENTRY_R(landscape),
			PROP_ENTRY_R(left),
			PROP_ENTRY_R(top),
			PROP_ENTRY_R(width),
			PROP_ENTRY_R(height),
			PROP_ENTRY	(scale),
			PROP_ENTRY_R(scaledWidth),
			PROP_ENTRY_R(scaledHeight),
			PROP_ENTRY_R(renderDevice),
			PROP_ENTRY_R(inputDevice),
			NULL
		};

		FuncEntry funcs[] = 
		{
			FUNC_ENTRY_H(channel,		"(): EventChannel"),
			NULL
		};

		bind(v, props, funcs);

		addStaticTable(v, "ORIENT");
		newSlot(v, -1, "PORTRAIT",			(int)type::ORIENT_PORTRAIT);
		newSlot(v, -1, "PORTRAIT_FLIP",		(int)type::ORIENT_PORTRAIT_FLIP);
		newSlot(v, -1, "LANDSCAPE",			(int)type::ORIENT_LANDSCAPE);
		newSlot(v, -1, "LANDSCAPE_FLIP",	(int)type::ORIENT_LANDSCAPE_FLIP);
		sq_poptop(v);
	}
Esempio n. 3
0
	static void Register(HSQUIRRELVM v)
	{
		PropEntry props[] =
		{
			PROP_ENTRY_R(activatedProxy),
			PROP_ENTRY_R(activated),
			NULL
		};

		FuncEntry funcs[] =
		{
			CONS_ENTRY_H(				"(sourceImage: Image, manager: TextureManager=NULL)\n"
										"(source: StreamSource, manager: TextureManager=NULL)"),
			FUNC_ENTRY_H(activate,		"(ctx: RenderContext): AR"),
			FUNC_ENTRY_H(deactivate,	"()"),
			NULL
		};

		bind(v, props, funcs);

		addStaticTable(v, "AR");
		newSlot(v, -1, "OK",			(int)GLESTexture::AR_OK);
		newSlot(v, -1, "NOT_LOADED",	(int)GLESTexture::AR_NOT_LOADED);
		newSlot(v, -1, "HAS_ERROR",		(int)GLESTexture::AR_HAS_ERROR);
		newSlot(v, -1, "LOADING",		(int)GLESTexture::AR_LOADING);
		newSlot(v, -1, "DISPOSED",		(int)GLESTexture::AR_DISPOSED);
	};
SNegatoSlicingInteractor::SNegatoSlicingInteractor() noexcept :
    m_vtkObserver(nullptr),
    m_priority(.6f)
{
    m_sigSlicingStarted = newSignal< SlicingStartedSignalType >(s_SLICING_STARTED_SIG);
    m_sigSlicingStopped = newSignal< SlicingStoppedSignalType >(s_SLICING_STOPPED_SIG);

    newSlot(s_UPDATE_SLICE_INDEX_SLOT, &SNegatoSlicingInteractor::updateSliceIndex, this);
    newSlot(s_UPDATE_SLICE_TYPE_SLOT, &SNegatoSlicingInteractor::updateSliceType, this);
}
Esempio n. 5
0
IFrameSrv::IFrameSrv() :
    m_hasMenuBar(false),
    m_hasToolBar(false),
    m_closePolicy("exit")
{
    m_sigClosed = newSignal< ClosedSignalType >(s_CLOSED_SIG);

    newSlot(s_SET_VISIBLE_SLOT, &IFrameSrv::setVisible, this);
    newSlot(s_SHOW_SLOT, &IFrameSrv::show, this);
    newSlot(s_HIDE_SLOT, &IFrameSrv::hide, this);
}
Esempio n. 6
0
int FEM_Adapt::newNode(){
	if(nodeValid){
		return  newSlot(nodeValid);
	}else{
		return theMesh->node.size();
	}
};
Esempio n. 7
0
SRenderer::SRenderer() noexcept :
    m_render( nullptr ),
    m_bPipelineIsInit(false)
{
    SLM_TRACE_FUNC();
    newSlot(s_REFRESH_SLOT, &SRenderer::refresh, this);
}
Esempio n. 8
0
SJobBar::SJobBar() noexcept
{
    newSlot( SHOW_JOB_SLOT, &SJobBar::showJob, this );

    m_sigStarted = newSignal< StartedSignalType >( STARTED_SIGNAL );
    m_sigEnded   = newSignal< EndedSignalType >( ENDED_SIGNAL );
}
Esempio n. 9
0
int FEM_Adapt::newElement(){
	if(elemValid){
		return newSlot(elemValid);
	}else{
		FEM_Elem *elem = (FEM_Elem *)theMesh->lookup(FEM_ELEM,"newElement");
		return elem->size();
	}
};
Esempio n. 10
0
S2DWheel::S2DWheel() noexcept :
    m_wheelWidget(vtkSmartPointer<fwVtkWheelWidget>::New()),
    m_visible(true)
{
    m_wheelUpdatedSignal = newSignal<WheelUpdatedSignalType>(s_WHEEL_UPDATED_SIG);

    newSlot(s_UPDATE_VISIBILITY_SLOT, &S2DWheel::updateVisibility, this);
}
Esempio n. 11
0
	static void Register(HSQUIRRELVM v)
	{
		PropEntry props[] =
		{
			PROP_ENTRY_R(numWorldMatrices),
			PROP_ENTRY_R(numTextureUnits),
			PROP_ENTRY_R(numVertexBlendMatrices),
			PROP_ENTRY_R(numVertexTextureUnits),
			PROP_ENTRY_R(maxTextureSize),
			PROP_ENTRY_R(maxViewportWidth),
			PROP_ENTRY_R(maxViewportHeight),
			PROP_ENTRY_R(numDepthBufferBits),
			PROP_ENTRY_R(numStencilBufferBits),
			PROP_ENTRY_R(numVertexShaderFloatConsts),
			PROP_ENTRY_R(numVertexShaderIntConsts),
			PROP_ENTRY_R(numVertexShaderBoolConsts),
			PROP_ENTRY_R(numGeometryShaderFloatConsts),
			PROP_ENTRY_R(numGeometryShaderIntConsts),
			PROP_ENTRY_R(numGeometryShaderBoolConsts),
			PROP_ENTRY_R(numPixelShaderFloatConsts),
			PROP_ENTRY_R(numPixelShaderIntConsts),
			PROP_ENTRY_R(numPixelShaderBoolConsts),
			PROP_ENTRY_R(numMultiRenderTargets),
			NULL
		};

		FuncEntry funcs[] = 
		{
			FUNC_ENTRY_H(isCapable,		"(spec: int): bool"),
			FUNC_ENTRY_H(report,		"(ch: LogChannel = null)"),
			NULL
		};

		bind(v, props, funcs);

		vector<std::pair<String, uint32> >::type specs;
		RenderSpec::allSpecs(specs);

		for (uint i=0; i<specs.size(); ++i)
		{
			const String& name = specs[i].first;
			size_t ppos = name.find('.');
			if (ppos != name.npos)
			{
				addStaticTable(v, name.substr(0, ppos).c_str(), false, false);
				newSlot(v, -1, name.substr(ppos+1), specs[i].second);
				sq_poptop(v);
			}
			else
			{
				addStatic(v, name.c_str(), specs[i].second);
			}
		}
	}
Esempio n. 12
0
File: ffcp.cpp Progetto: sylzd/FFCP
void FFCP::createActions()
{
	newAct = new QAction( tr("新建"), this);  //QIcon("./images/open.png"), 暂时不设置图片
	newAct->setShortcut(tr("N"));   
	connect(newAct, SIGNAL(triggered()), this, SLOT(newSlot()));

	openAct = new QAction(tr("打开"), this);
	openAct->setShortcut(tr("O"));   
	connect(openAct, SIGNAL(triggered()), this, SLOT(openSlot()));

	saveAct = new QAction(tr("保存"), this);
	saveAct->setShortcut(tr("S"));
	connect(saveAct, SIGNAL(triggered()), this, SLOT(saveSlot()));

	quitAct = new QAction(tr("退出"), this);
	quitAct->setShortcut(tr("Q"));
	connect(quitAct, SIGNAL(triggered()), this, SLOT(close()));

	aboutAct = new QAction(tr("关于"), this);
	aboutAct->setShortcut(tr("A"));
	connect(aboutAct, SIGNAL(triggered()), this, SLOT(aboutSlot()));

	compileAct = new QAction(tr("编译"), this);
	compileAct->setShortcut(tr("F7"));
	connect(compileAct, SIGNAL(triggered()), this, SLOT(compileSlot()));

	simulationAct = new QAction(tr("仿真"), this);
	simulationAct->setShortcut(tr("F6"));
	connect(simulationAct, SIGNAL(triggered()), this, SLOT(simulationSlot()));

	downloadAct = new QAction(tr("下载"), this);
	downloadAct->setShortcut(tr("F5"));
	connect(downloadAct, SIGNAL(triggered()), this, SLOT(downloadSlot()));

	clearAct = new QAction(tr("清除"), this);
	clearAct->setShortcut(tr("F8"));
	connect(clearAct, SIGNAL(triggered()), this, SLOT(clearSlot()));

	//在工具中添加变量定义
	defineAct = new QAction(tr("变量定义"),this);
	defineAct->setShortcut(tr("F1"));
	connect(defineAct, SIGNAL(triggered()), this, SLOT(defineSlot()));

	hardwareAct = new QAction(tr("硬件结构图"), this);
	defineAct->setShortcut(tr("F3"));
	connect(hardwareAct, SIGNAL(triggered()), this, SLOT(hardwareSlot()));

	softwareAct = new QAction(tr("软件流程图"), this);
	defineAct->setShortcut(tr("F2"));
	connect(softwareAct, SIGNAL(triggered()), this, SLOT(softwareSlot()));
}
Esempio n. 13
0
CFrmSettings::CFrmSettings()
{
    this->gvc = gvContext();
    Ui_Dialog tempDia;
    tempDia.setupUi(this);
    graph = NULL;
    activeWindow = NULL;
    QString path;
#ifndef WIN32
    char *s = getenv("GVEDIT_PATH");
    if (s)
	path = s;
    else
	path = GVEDIT_DATADIR;
#endif

    connect(WIDGET(QPushButton, pbAdd), SIGNAL(clicked()), this,
	    SLOT(addSlot()));
    connect(WIDGET(QPushButton, pbNew), SIGNAL(clicked()), this,
	    SLOT(newSlot()));
    connect(WIDGET(QPushButton, pbOpen), SIGNAL(clicked()), this,
	    SLOT(openSlot()));
    connect(WIDGET(QPushButton, pbSave), SIGNAL(clicked()), this,
	    SLOT(saveSlot()));
    connect(WIDGET(QPushButton, btnOK), SIGNAL(clicked()), this,
	    SLOT(okSlot()));
    connect(WIDGET(QPushButton, btnCancel), SIGNAL(clicked()), this,
	    SLOT(cancelSlot()));
    connect(WIDGET(QPushButton, pbOut), SIGNAL(clicked()), this,
	    SLOT(outputSlot()));
    connect(WIDGET(QPushButton, pbHelp), SIGNAL(clicked()), this,
	    SLOT(helpSlot()));

    connect(WIDGET(QComboBox, cbScope), SIGNAL(currentIndexChanged(int)),
	    this, SLOT(scopeChangedSlot(int)));
    scopeChangedSlot(0);


#ifndef WIN32
    loadAttrs(path + "/attrs.txt", WIDGET(QComboBox, cbNameG),
	      WIDGET(QComboBox, cbNameN), WIDGET(QComboBox, cbNameE));
#else
    loadAttrs("../share/graphviz/gvedit/attributes.txt",
	      WIDGET(QComboBox, cbNameG), WIDGET(QComboBox, cbNameN),
	      WIDGET(QComboBox, cbNameE));
#endif
    setWindowIcon(QIcon(":/images/icon.png"));
}
Esempio n. 14
0
IActionSrv::IActionSrv() :
    m_activeStateValue(true),
    m_isActive(false),
    m_isExecutable(true),
    m_isVisible(true),
    m_confirmAction(false)
{
    newSlot(s_SET_IS_ACTIVE_SLOT, &IActionSrv::setIsActive, this);
    newSlot(s_ACTIVATE_SLOT, &IActionSrv::activate, this);
    newSlot(s_DEACTIVATE_SLOT, &IActionSrv::deactivate, this);
    newSlot(s_SET_IS_EXECUTABLE_SLOT, &IActionSrv::setIsExecutable, this);
    newSlot(s_SET_EXECUTABLE_SLOT, &IActionSrv::setExecutable, this);
    newSlot(s_SET_INEXECUTABLE_SLOT, &IActionSrv::setInexecutable, this);
    newSlot(s_SET_VISIBLE_SLOT, &IActionSrv::setVisible, this);
    newSlot(s_SHOW_SLOT, &IActionSrv::show, this);
    newSlot(s_HIDE_SLOT, &IActionSrv::hide, this);

    m_sigEnabled   = newSignal< EnabledSignalType >(s_ENABLED_SIG);
    m_sigDisabled  = newSignal< DisabledSignalType >(s_DISABLED_SIG);
    m_sigChecked   = newSignal< CheckedSignalType >(s_CHECKED_SIG);
    m_sigUnchecked = newSignal< UncheckedSignalType >(s_UNCHECKED_SIG);
}
Esempio n. 15
0
void FieldContainerViewCtl::loadFieldTypesSlot(void)
{
	int i;
	QString fN (QFileDialog::getOpenFileName ( QString::null,
																						 "Type list file (*.ftd)", this ) );

	if (!fN.isEmpty()) {
		newSlot();
		Field::loadFieldTypeList(fN);
		partTypeCombo->clear();
		for (i = 0; true; i++) 
			if (Field::typeStr(i))
				partTypeCombo->insertItem(QString(Field::typeStr(i)));
			else
				break;
	}
}
Esempio n. 16
0
SExportSeries::SExportSeries()
{
    newSlot(s_CHECK_ADDED_SERIES_SLOT, &SExportSeries::checkAddedSeries, this);
    newSlot(s_CHECK_REMOVED_SERIES_SLOT, &SExportSeries::checkRemovedSeries, this);
}
Esempio n. 17
0
SMesh::SMesh() noexcept :
    m_showClippedPart(true),
    m_autoResetCamera(true),
    m_polyData(nullptr),
    m_mapper(vtkPolyDataMapper::New()),
    m_actor(nullptr),
    m_clippingPlanes(nullptr),
    m_servicesStarterCallback(nullptr),
    m_transform(vtkTransform::New()),
    m_uvgen(NONE)
{
    m_unclippedPartMaterial = ::fwData::Material::New();
    m_material              = ::fwData::Material::New();
    m_unclippedPartMaterial->diffuse()->setRGBA("#aaaaff44");
    m_clippingPlanesId = "";

    m_sigTextureApplied = newSignal<TextureAppliedSignalType>(s_TEXTURE_APPLIED_SIG);

    newSlot(s_UPDATE_VISIBILITY_SLOT, &SMesh::updateVisibility, this);
    newSlot(s_UPDATE_POINT_COLORS_SLOT, &SMesh::updatePointColors, this);
    newSlot(s_UPDATE_CELL_COLORS_SLOT, &SMesh::updateCellColors, this);
    newSlot(s_UPDATE_VERTEX_SLOT, &SMesh::updateVertex, this);
    newSlot(s_UPDATE_POINT_NORMALS_SLOT, &SMesh::updatePointNormals, this);
    newSlot(s_UPDATE_CELL_NORMALS_SLOT, &SMesh::updateCellNormals, this);
    newSlot(s_UPDATE_POINT_TEX_COORDS_SLOT, &SMesh::updatePointTexCoords, this);
    newSlot(s_UPDATE_CELL_TEX_COORDS_SLOT, &SMesh::updateCellTexCoords, this);
    newSlot(s_SHOW_POINT_COLORS_SLOT, &SMesh::showPointColors, this);
    newSlot(s_SHOW_CELL_COLORS_SLOT, &SMesh::showCellColors, this);
    newSlot(s_HIDE_COLORS_SLOT, &SMesh::hideColors, this);
    newSlot(s_UPDATE_COLOR_MODE_SLOT, &SMesh::updateColorMode, this);
    newSlot(s_UPDATE_NORMAL_MODE_SLOT, &SMesh::updateNormalMode, this);
    newSlot(s_UPDATE_MATRIX_FIELD_SLOT, &SMesh::updateMatrixField, this);
}
Esempio n. 18
0
SSnapshot::SSnapshot() noexcept
{
    newSlot(s_SNAP_SLOT, &SSnapshot::snap, this);
    newSlot(s_SNAPTOIMAGE_SLOT, &SSnapshot::snapToImage, this);
}
Esempio n. 19
0
ShowLandmark::ShowLandmark( ) noexcept
{
    newSlot(s_SHOW_LANDMARK_SLOT, &ShowLandmark::showLandmark, this);
}
Esempio n. 20
0
PointEditor::PointEditor() noexcept
{
    newSlot(s_GET_INTERACTION_SLOT, &PointEditor::getInteraction, this);
}
SJumpToPointController::SJumpToPointController() noexcept
{
    newSlot(s_CHANGE_DIRECT_TARGET_SLOT, &SJumpToPointController::jumpToViewPoint, this);
}