Exemplo n.º 1
0
bool GwfObjectInfoReader::parseBus(const QDomElement &element)
{
    std::auto_ptr<SCgBusInfo> busInfo(new SCgBusInfo());

    if(!parseObject(element,busInfo.get()))
        return false;

    if (!getAttributeString(element, "owner", busInfo->ownerIdRef()))
        return false;

    double bx, by;
    if (!getAttributeDouble(element, "b_x", bx) || !getAttributeDouble(element, "b_y", by))
        return false;
    double ex, ey;
    if (!getAttributeDouble(element, "e_x", ex) || !getAttributeDouble(element, "e_y", ey))
        return false;

    busInfo->pointsRef().append(QPointF(bx, by));

    if (!getElementPoints(element, busInfo->pointsRef()))
        return false;

    busInfo->pointsRef().append(QPointF(ex, ey));

    mObjectsInfo[SCgBus::Type].append(busInfo.release());
    return true;
}
Exemplo n.º 2
0
void Capability::printAll()
{
	// A lot of information to output...
	printf(
		"Basic Info:\n"					\
		"    Driver:\t\t %s\n"			\
		"    Card:\t\t %s\n"			\
		"    Bus info:\t\t %s\n"		\
		"    Version:\t\t %2d\n"		\
		"\nCapabilities:\n"				\
		"    video capture:\t %s\n"		\
		"    video overlay:\t %s\n"		\
		"    VBI capture:\t %s\n"		\
		"    VBI output:\t\t %s\n"		\
		"    sliced VBI capture:\t %s\n"\
		"    sliced VBI output:\t %s\n"	\
		"    RDS capture:\t %s\n"		\
		"    video ouput overlay: %s\n"	\
		"    has tuner:\t\t %s\n"		\
		"    has audio:\t\t %s\n"		\
		"    has radio:\t\t %s\n"		\
		"    async IO:\t\t %s\n"		\
		"    streaming:\t\t %s\n",
		
		driver(),
		card(),
		busInfo(),
		version(),
		hasVideoCapture()? "YES" : "no",
		hasVideoOverlay()? "YES" : "no",
		hasVbiCapture()? "YES" : "no",
		hasVbiOutput()? "YES" : "no",
		hasSlicedVbiCapture()? "YES" : "no",
		hasSlicedVbiOutput()? "YES" : "no",
		hasRdsCapture()? "YES" : "no",
		hasVideoOutputOverlay()? "YES" : "no",
		hasTuner()? "YES" : "no",
		hasAudio()? "YES" : "no",
		hasRadio()? "YES" : "no",
		hasAsyncIo()? "YES" : "no",
		hasStreaming()? "YES" : "no"
	);
}