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
30
src/layout.h
30
src/layout.h
@ -1,22 +1,6 @@
|
||||
#ifndef JOY_LAYOUT_H
|
||||
#define JOY_LAYOUT_H
|
||||
|
||||
//for file i/o
|
||||
#include <qdir.h>
|
||||
#include <qfile.h>
|
||||
#include <qtextstream.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
//to get a name for a new layout
|
||||
#include <qinputdialog.h>
|
||||
|
||||
//qpopup is a REAL pain to include ;) This is because of some
|
||||
//odd complications and reciprocalities in QT... unfortunately, this is the
|
||||
//best way I've found to get around it.
|
||||
#ifndef MAIN
|
||||
//the layout manager is responsible for the tray icon and its popup
|
||||
#include <qpopupmenu.h>
|
||||
#endif
|
||||
|
||||
//to allow for interprocess communications (ie, signaling a running instance of
|
||||
//qjoypad by running "qjoypad layout-name", etc.) QJoyPad uses signals to
|
||||
@ -24,6 +8,14 @@
|
||||
//the joystick device list.
|
||||
#include <signal.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QDir>
|
||||
#include <QMenu>
|
||||
#include <QApplication>
|
||||
#include <QDialog>
|
||||
#include <QInputDialog>
|
||||
#include <poll.h>
|
||||
|
||||
//a layout handles several joypads
|
||||
#include "joypad.h"
|
||||
//for errors
|
||||
@ -41,7 +33,7 @@
|
||||
#define NL "[NO LAYOUT]"
|
||||
|
||||
//where QJoyPad saves its settings!
|
||||
const QString settingsDir(QDir::homeDirPath() + "/.qjoypad3/");
|
||||
const QString settingsDir(QDir::homePath() + "/.qjoypad3/");
|
||||
|
||||
//handles loading, saving, and changing of layouts
|
||||
class LayoutManager : public QObject {
|
||||
@ -74,7 +66,7 @@ class LayoutManager : public QObject {
|
||||
//when the tray icon is clicked
|
||||
void trayClick();
|
||||
//when the user selects an item on the tray's popup menu
|
||||
void trayMenu(int id);
|
||||
void trayMenu(QAction* menuItemAction);
|
||||
//rebuild the popup menu with the current information
|
||||
void fillPopup();
|
||||
//update the list of available joystick devices
|
||||
@ -87,7 +79,7 @@ class LayoutManager : public QObject {
|
||||
//the layout that is currently in use
|
||||
QString CurrentLayout;
|
||||
//the popup menu from the tray/floating icon
|
||||
QPopupMenu* Popup;
|
||||
QMenu* Popup;
|
||||
|
||||
//if there is a LayoutEdit open, this points to it. Otherwise, NULL.
|
||||
LayoutEdit* le;
|
||||
|
Reference in New Issue
Block a user