-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
+// License as published by the Free Software Foundation; either
// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef OCCVIEWER_VIEWSKETCHER_H
#define OCCVIEWER_VIEWSKETCHER_H
#include "OCCViewer.h"
-#include <qobject.h>
-#include <qcursor.h>
+#include <QObject>
+#include <QCursor>
+#include <QSize>
class OCCViewer_ViewWindow;
+class QKeyEvent;
+class QMouseEvent;
+class QPolygon;
+
+class QtxRectRubberBand;
+class QtxPolyRubberBand;
-#ifdef WNT
+#ifdef WIN32
#pragma warning ( disable:4251 )
#endif
int type() const;
int result() const;
int buttonState() const;
+ bool isHasShift() const;
void* data() const;
void activate();
QCursor mySavedCursor;
QPoint myStart, myCurr;
int myButtonState;
+ bool myHasShift;
};
/*!
virtual void onSketch( SketchState );
virtual void onActivate();
virtual void onDeactivate();
+ private:
+ QtxRectRubberBand* mypRectRB;
};
/*!
virtual void onDeactivate();
private:
- bool isValid( const QPointArray*, const QPoint& ) const;
+ bool isValid( const QPolygon*, const QPoint& ) const;
bool isIntersect( const QPoint&, const QPoint&,
const QPoint&, const QPoint& ) const;
private:
bool myDbl;
QSize myToler;
- QPointArray* mypPoints;
+ QPolygon* mypPoints;
int myAddButton;
int myDelButton;
+
+ QtxPolyRubberBand* mypPolyRB;
};
-#ifdef WNT
+#ifdef WIN32
#pragma warning( default:4251 )
#endif