reverting trunk back to stable 3.4.1 version

git-svn-id: svn://svn.code.sf.net/p/qjoypad/code/trunk@82 c05e91a0-76c8-4ec0-b377-ef19ce7cc080
This commit is contained in:
John Toman
2009-05-26 00:57:02 +00:00
committed by virtuoussin13
parent 1cc6e9087e
commit 17ed926cdf
45 changed files with 2674 additions and 2784 deletions

View File

@ -2,11 +2,21 @@
#define KEYCODE_H
//To create the "press a key" dialog:
#include <QPushButton>
#include <QDialog>
#include <QPaintEvent>
#include <QPainter>
#include <qdialog.h>
#include <qpainter.h>
//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"
@ -16,6 +26,23 @@ 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 {