drawingcursor.hh gecode/gist/nodecursor.hh gecode/gist/layoutcursor.hh QtGui gecode/gist/drawingcursor.hpp Gecode::Gist::DrawingCursor Gecode Gecode::Gist /*-*-mode:C++;c-basic-offset:2;indent-tabs-mode:nil-*-*/ /* *Mainauthors: *GuidoTack<tack@gecode.org> * *Copyright: *GuidoTack,2006 * *Lastmodified: *$Date:2010-08-1209:48:30+0200(Thu,12Aug2010)$by$Author:tack$ *$Revision:11345$ * *ThisfileispartofGecode,thegenericconstraint *developmentenvironment: *http://www.gecode.org * *Permissionisherebygranted,freeofcharge,toanypersonobtaining *acopyofthissoftwareandassociateddocumentationfiles(the *"Software"),todealintheSoftwarewithoutrestriction,including *withoutlimitationtherightstouse,copy,modify,merge,publish, *distribute,sublicense,and/orsellcopiesoftheSoftware,andto *permitpersonstowhomtheSoftwareisfurnishedtodoso,subjectto *thefollowingconditions: * *Theabovecopyrightnoticeandthispermissionnoticeshallbe *includedinallcopiesorsubstantialportionsoftheSoftware. * *THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND, *EXPRESSORIMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOF *MERCHANTABILITY,FITNESSFORAPARTICULARPURPOSEAND *NONINFRINGEMENT.INNOEVENTSHALLTHEAUTHORSORCOPYRIGHTHOLDERSBE *LIABLEFORANYCLAIM,DAMAGESOROTHERLIABILITY,WHETHERINANACTION *OFCONTRACT,TORTOROTHERWISE,ARISINGFROM,OUTOFORINCONNECTION *WITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHESOFTWARE. * */ #ifndefGECODE_GIST_QT_DRAWINGCURSOR_HH #defineGECODE_GIST_QT_DRAWINGCURSOR_HH #include<gecode/gist/nodecursor.hh> #include<gecode/gist/layoutcursor.hh> #include<QtGui> namespaceGecode{namespaceGist{ classDrawingCursor:publicNodeCursor<VisualNode>{ private: QPainter&painter; QRectclippingRect; BestNode*curBest; doublex,y; boolcopies; boolisClipped(void); public: staticconstQColorred; staticconstQColorgreen; staticconstQColorblue; staticconstQColororange; staticconstQColorwhite; staticconstQColorlightRed; staticconstQColorlightGreen; staticconstQColorlightBlue; DrawingCursor(VisualNode*root, constVisualNode::NodeAllocator&na, BestNode*curBest0, QPainter&painter0, constQRect&clippingRect0,boolshowCopies); voidmoveUpwards(void); boolmayMoveDownwards(void); voidmoveDownwards(void); voidmoveSidewards(void); voidprocessCurrentNode(void); }; }} #include<gecode/gist/drawingcursor.hpp> #endif //STATISTICS:gist-any