Logo Search packages:      
Sourcecode: synaptiks version File versions  Download package

Touchpad * Touchpad::findTouchpad ( QObject *  parent = 0 ) [static]

Find the touchpad on this system.

If the system doesn't provide a configurable touchpad, a null pointer is returned. This happens, if there is no physical touchpad on this system, if the touchpad is not controlled by the synaptics driver or if the driver is too old.

Parameters:
parentthe parent object
Returns:
A synaptiks::Touchpad instance representing the installed touchpad or NULL, if there is no touchpad.

Definition at line 102 of file touchpad.cpp.

References QXDevice::findDevicesWithProperty(), isSupported(), and Touchpad().

Referenced by synaptiks::SynaptiksDaemon::SynaptiksDaemon().

                                                {
    if (!Touchpad::isSupported()) {
        kWarning() << "device properties unsupported";
        return 0;
    }
    QXDevice::List devices = QXDevice::findDevicesWithProperty(OFF);
    if (devices.empty()) {
        kWarning() << "no touchpad found";
        return 0;
    } else {
        if (devices.size() > 1) {
            kWarning() << "multiple matching devices found, taking first";
        }
        return new Touchpad(devices.at(0), parent);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index