Exemplo n.º 1
0
X11Extras::X11Extras(QObject *parent) :
    QObject(parent)
{
    knownAliases = QHash<QString, QString> ();
    _display = XOpenDisplay(NULL);
    populateKnownAliases();
}
Exemplo n.º 2
0
VirtualKeyPushButton::VirtualKeyPushButton(JoyButton *button, QString xcodestring, QWidget *parent) :
    QPushButton(parent)
{
    populateKnownAliases();

    //qDebug() << "Question: " << X11KeySymToKeycode("KP_7") << endl;
    //qDebug() << "Question: " << X11KeySymToKeycode(79) << endl;
    this->keycode = 0;
    this->xcodestring = "";
    this->displayString = "";
    this->currentlyActive = false;
    this->onCurrentButton = false;
    this->button = button;

    int temp = 0;
    if (!xcodestring.isEmpty())// && xcodestring.toInt(0, 16) > 0)
    {
        /*int qkey = xcodestring.toInt(0, 16);
        if (qkey > QtKeyMapperBase::nativeKeyPrefix)
        {
            temp = qkey - QtKeyMapperBase::nativeKeyPrefix;
        }
        else
        {
            temp = AntKeyMapper::returnVirtualKey(qkey);
        }*/
        temp = X11KeySymToKeycode(xcodestring);
    }

    if (temp > 0)
    {
#ifdef Q_OS_WIN
        this->keycode = temp;
#else
        this->keycode = X11KeyCodeToX11KeySym(temp);
        //this->keycode = temp;
#endif
        this->xcodestring = xcodestring;
        this->displayString = setDisplayString(xcodestring);
    }

    this->setText(this->displayString.replace("&", "&&"));

    connect(this, SIGNAL(clicked()), this, SLOT(processSingleSelection()));
}
Exemplo n.º 3
0
WinInfo::WinInfo(QObject *parent) :
    QObject(parent)
{
    populateKnownAliases();
}
Exemplo n.º 4
0
WinExtras::WinExtras(QObject *parent) :
    QObject(parent)
{
    populateKnownAliases();
}