1 /****************************************************************************
3 ** Copyright (C) 2006-2007 Trolltech ASA. All rights reserved.
5 ** This file is part of the example classes of the Qt Toolkit.
7 ** Licensees holding a valid Qt License Agreement may use this file in
8 ** accordance with the rights, responsibilities and obligations
9 ** contained therein. Please consult your licensing agreement or
10 ** contact sales@trolltech.com if any conditions of this licensing
11 ** agreement are not clear to you.
13 ** Further information about Qt licensing is available at:
14 ** http://www.trolltech.com/products/qt/licensing.html or by
15 ** contacting info@trolltech.com.
17 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 ****************************************************************************/
25 #include <QGraphicsView>
29 #include <TDocStd_Document.hxx>
30 #include <TDF_Label.hxx>
34 class GraphWidget : public QGraphicsView
39 GraphWidget(QWidget* parent);
42 bool createModel(const Handle(TDocStd_Document)& doc);
43 Handle(TDocStd_Document) getDocument() { return myDocument; }
45 Node* findNode(const TDF_Label& );
46 void setNbThreads(const int nb);
48 void accelerateThread(const int thread_index);
49 void slowDownThread(const int thread_index);
56 void wheelEvent(QWheelEvent *event);
57 void drawBackground(QPainter *painter, const QRectF &rect);
58 void scaleView(qreal scaleFactor);
61 Handle(TDocStd_Document) myDocument;
67 int myNbFinishedThreads;