Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TxqClickListener.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------
00002 //
00003 // File:    TxqClickListener.h
00004 //
00005 // Purpose: A helper class to implement click listens.
00006 //
00007 // Version: $Id: TxqClickListener.h,v 1.10 2001/10/09 19:15:48 kgl Exp $
00008 //
00009 // Copyright (c) 2000 by Tech-X Corporation.  All rights reserved.
00010 //
00011 // Author:  Kelly G. Luetkemeyer
00012 //
00013 //--------------------------------------------------------------------
00014 
00015 #ifndef TXQ_CLICKLISTENER_H
00016 #define TXQ_CLICKLISTENER_H
00017 
00018 // Qt includes
00019 #include <qwidget.h>
00020 #include <qobject.h>
00021 #include <qapplication.h>
00022 
00033 class TxqClickListener : public QObject  
00034 {
00035   Q_OBJECT
00036 
00037 public:
00038 
00042   TxqClickListener(){}
00043 
00044 
00045 signals:
00046 
00052   void mouseClick(double, double);
00053 
00057   void mouseClick(); 
00058 
00059 public slots:
00060  
00069   void listen(double x, double y) {
00070     // debug ( "Heard the point ( %g, %g ) ", x, y );
00071     // cout <<  "Heard the point ( " << x << ", " << y << " ) " << endl;
00072   }
00073 
00081   void listen(QMouseEvent *mouseEvent) {
00082   // listen( (double) (mouseEvent->x()),  (double) (mouseEvent->y()) );
00083     double x = (double) (mouseEvent->x());
00084     double y = (double) (mouseEvent->y());
00085     // debug ( "Heard the mouse point ( %g, %g ) ", x, y );
00086     // cout << "Heard the mouse point ( " << x << ", " << y << " )" << endl;
00087   }
00088 
00092   // ~TxqClickListener() {}
00093 
00094 };
00095 
00096 #endif
Copyright Tech-X Corporation, all rights reserved.