00001 /************************************************************************************ 00002 ** 00003 ** This file is part of the QtOPENCASCADE Toolkit. 00004 ** 00005 ** Copyright (C) 2006, 2007, 2008 QtOCC Team Members 00006 ** Peter Dolbey, Marc Britten, Stephane Routelous 00007 ** Stefan Boeykens, Pawel Dobrolowski, Walter Steffe 00008 ** Álvaro Castro Castilla, Dirk Burski, Fotis Sioutis 00009 ** 00010 ** This library is free software; you can redistribute it and/or 00011 ** modify it under the terms of the GNU Lesser General Public 00012 ** License as published by the Free Software Foundation; either 00013 ** version 2.1 of the License, or (at your option) any later version. 00014 ** 00015 ** This library is distributed in the hope that it will be useful, 00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 ** Lesser General Public License for more details. 00019 ** 00020 ** You should have received a copy of the GNU Lesser General Public 00021 ** License along with this library; if not, write to the Free Software 00022 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00023 ** 00024 ***********************************************************************************/ 00025 #ifndef QOCCCOMMAND_H 00026 #define QOCCCOMMAND_H 00027 00028 #include <QtCore/QObject> 00029 #include "qocc.h" 00030 00031 class QAction; 00032 class QoccController; 00033 class Qocc3dWidget; 00034 class QMouseEvent; 00035 00036 class QOCC_DECLSPEC QoccCommand : public QObject 00037 { 00038 Q_OBJECT 00039 00040 public: 00041 00042 QoccCommand( QAction* startingAction = NULL, QWidget* parent = NULL ); 00043 ~QoccCommand( ); 00044 00045 virtual bool isDrawing() { return myIsDrawing; } 00046 00047 virtual void clickEvent( Qocc3dWidget*, QMouseEvent* ) {}; 00048 virtual void moveEvent ( Qocc3dWidget*, QMouseEvent* ) {}; 00049 00050 protected: 00051 00052 QAction* myAction; 00053 bool myIsDrawing; 00054 }; 00055 00056 #endif // QOCCCOMMAND_H