00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Martin Koller * 00003 * m.koller@surfeu.at * 00004 * This file is part of the KDE Control Center Module for Joysticks * 00005 * * 00006 * This program is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 2 of the License, or * 00009 * (at your option) any later version. * 00010 * * 00011 * This program is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License * 00017 * along with this program; if not, write to the * 00018 * Free Software Foundation, Inc., * 00019 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 00020 ***************************************************************************/ 00021 #ifndef _POSWIDGET_H_ 00022 #define _POSWIDGET_H_ 00023 00024 #include <tqwidget.h> 00025 00029 class PosWidget : public QWidget 00030 { 00031 Q_OBJECT 00032 00033 public: 00034 PosWidget(TQWidget *parent = 0, const char *name = 0); 00035 00036 void changeX(int x); 00037 void changeY(int y); 00038 00039 // define if a trace of the moving joystick shall be displayed 00040 // setting it to false will erase all previous marks from the widget 00041 // NOTE: the traced positions are not stored and will be erased if the widget is covered/redisplayed 00042 void showTrace(bool t); 00043 00044 protected: 00045 virtual void paintEvent(TQPaintEvent *); 00046 00047 private: 00048 void eraseOld(); 00049 00050 private: 00051 int x, y; 00052 bool trace; 00053 }; 00054 00055 #endif
1.6.1