X11Extras::X11Extras(QObject *parent) : QObject(parent) { knownAliases = QHash<QString, QString> (); _display = XOpenDisplay(NULL); populateKnownAliases(); }
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())); }
WinInfo::WinInfo(QObject *parent) : QObject(parent) { populateKnownAliases(); }
WinExtras::WinExtras(QObject *parent) : QObject(parent) { populateKnownAliases(); }