git-svn-id: svn://svn.code.sf.net/p/qjoypad/code/trunk@80 c05e91a0-76c8-4ec0-b377-ef19ce7cc080
37 lines
739 B
C++
37 lines
739 B
C++
#ifndef KEYCODE_H
|
|
#define KEYCODE_H
|
|
|
|
//To create the "press a key" dialog:
|
|
#include <QPushButton>
|
|
#include <QDialog>
|
|
#include <QPaintEvent>
|
|
#include <QPainter>
|
|
|
|
|
|
#include "constant.h"
|
|
|
|
//Produce a string for any keycode
|
|
const QString ktos( int keycode );
|
|
|
|
//The X11 display, taken from main.cpp
|
|
extern Display* display;
|
|
|
|
|
|
//a button that requests a keycode from the user when clicked.
|
|
class KeyButton : public QPushButton {
|
|
Q_OBJECT
|
|
public:
|
|
KeyButton(QString name, int val, QWidget* parent, bool m = false, bool nowMouse = false);
|
|
int getValue() {return value;};
|
|
int choseMouse() {return mouseClicked;};
|
|
protected slots:
|
|
void onClick();
|
|
private:
|
|
QString buttonname;
|
|
int value;
|
|
bool mouse;
|
|
bool mouseClicked;
|
|
};
|
|
|
|
#endif
|