Esempio n. 1
0
void LayerBuffer::serverDestroy()
{
    sp<Source> source(clearSource());
    if (source != 0) {
        source->destroy();
    }
}
void Xml2ObjectWidget::show(DatabaseModel *model, OperationList *op_list)
{
	clearSource();
	this->setEnabled(model!=nullptr && op_list!=nullptr);
	this->op_list=op_list;
	this->model=model;
	QDialog::show();
}
Esempio n. 3
0
//************************************
// Method:    initSource
// FullName:  init for the object with number of row and colume
// Access:    protected
// Returns:   error code
// Qualifier: 
// Parameter: 
//************************************
INT C2DRaw::InitSource(INT in_rows, INT in_cols)
{
	INT retCode = eNormal;
	ASSERT(IsValid());
	if (m_pDataElements != NULL)
	{
		clearSource();
	} 
	else
	{
	}
	if(retCode == eNormal) 
	{
		m_nRows = in_rows;
		m_nColums = in_cols;
		m_pDataElements = new element[m_nRows * m_nColums];
		if(m_pDataElements == NULL)
		{
			retCode = eMemAllocErr;
		}
		else
		{
			FillMemory(m_pDataElements, sizeof(element)*m_nRows*m_nColums,0);
			/*
			for (int i=0; i < m_nRows; i++)
			{
				for(int j=0; j < m_nColums; j++)
				{
					//INT it = i;
					SetElementAt(i,j, ELEMENT_MIN);					
				}
			}*/
			
		}		
	}
		
	return retCode;
}
Esempio n. 4
0
void LayerBuffer::unregisterBuffers()
{
    sp<Source> source(clearSource());
    if (source != 0)
        source->unregisterBuffers();
}
Esempio n. 5
0
C2DRaw::~C2DRaw()
{
	clearSource();
}