straight copy of qt4 branch over to trunk, merge refused to work
git-svn-id: svn://svn.code.sf.net/p/qjoypad/code/trunk@95 c05e91a0-76c8-4ec0-b377-ef19ce7cc080
This commit is contained in:
committed by
virtuoussin13
parent
c1ef3fa0b7
commit
345bb5748e
@ -2,21 +2,11 @@
|
||||
#define KEYCODE_H
|
||||
|
||||
//To create the "press a key" dialog:
|
||||
#include <qdialog.h>
|
||||
#include <qpainter.h>
|
||||
#include <QPushButton>
|
||||
#include <QDialog>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
|
||||
//For the KeyButton widget
|
||||
#include <qpushbutton.h>
|
||||
|
||||
//For converting X Windows key names to something nicer.
|
||||
#include <qregexp.h>
|
||||
|
||||
//Defines constants needed for x11Event
|
||||
#include <X11/Xlib.h>
|
||||
//The KeySym for "x"
|
||||
#define XK_x 0x078
|
||||
|
||||
#define MOUSE_OFFSET 400
|
||||
|
||||
#include "constant.h"
|
||||
|
||||
@ -26,23 +16,6 @@ const QString ktos( int keycode );
|
||||
//The X11 display, taken from main.cpp
|
||||
extern Display* display;
|
||||
|
||||
//a keycode dialog box
|
||||
class GetKey : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
GetKey( QString button, bool m = false );
|
||||
protected:
|
||||
//to filter through every event this thing sees, before QT does.
|
||||
bool x11Event( XEvent* e );
|
||||
//to avoid focus issues, there is only the dialog widget, all the
|
||||
//rest is painted on. So, I need to know when to repaint.
|
||||
void paintEvent ( QPaintEvent * );
|
||||
private:
|
||||
//the dialog's message
|
||||
QString Text;
|
||||
//does this dialog accept mouse clicks?
|
||||
bool mouse;
|
||||
};
|
||||
|
||||
//a button that requests a keycode from the user when clicked.
|
||||
class KeyButton : public QPushButton {
|
||||
|
Reference in New Issue
Block a user