bobsview.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Gav Wood                                        *
00003  *   gav@cs.york.ac.uk                                                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef BOBSVIEW_H
00021 #define BOBSVIEW_H
00022 
00023 #define __GEDDEI_BUILD
00024 
00025 #include <qpoint.h>
00026 #include <qcanvas.h>
00027 
00032 class Bob;
00033 class BobPort;
00034 class FloatingLink;
00035 class QCanvasItem;
00036 class GeddeiNite;
00037 
00041 class BobsView: public QCanvasView
00042 {
00043 Q_OBJECT
00044 
00045  bool theSnapToGrid;
00046  QCanvasItem *theDragging, *theActivating;
00047  Bob *thePausing;
00048  BobPort *theLinking;
00049  FloatingLink *theFloatingLink;
00050  QPoint theDragOffset;
00051 
00052  void contentsMousePressEvent(QMouseEvent *);
00053  void contentsMouseReleaseEvent(QMouseEvent *);
00054  void contentsMouseMoveEvent(QMouseEvent *);
00055  void dropEvent(QDropEvent *);
00056  void dragEnterEvent(QDragEnterEvent *);
00057 
00058  GeddeiNite *geddeiNite();
00059 
00060 public slots:
00061  void setSnapToGrid(bool y) { theSnapToGrid = y; }
00062  void setCanvas(QCanvas *c);
00063 
00064 public:
00065  bool snapToGrid() { return theSnapToGrid; }
00066 
00067  BobsView(QWidget *parent = 0, const char *name = 0, WFlags f = 0);
00068 };
00069 
00070 #endif

Generated on Thu Jul 13 06:56:33 2006 for Exscalibar by  doxygen 1.4.7