karbon
vselectnodes.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __VSELECTNODES_H__
00021 #define __VSELECTNODES_H__
00022
00023
00024 #include "KoRect.h"
00025
00026 #include "vvisitor.h"
00027 #include "vsegment.h"
00028
00029 class VSelectNodes : public VVisitor
00030 {
00031 public:
00032 VSelectNodes( bool select = true, bool exclusive = true )
00033 {
00034 m_select = select;
00035 m_exclusive = exclusive;
00036 }
00037
00038 VSelectNodes( const KoRect& rect, bool select = true, bool exclusive = true )
00039 {
00040 m_select = select;
00041 m_exclusive = exclusive;
00042 m_rect = rect;
00043 }
00044
00045 virtual void visitVSubpath( VSubpath& path );
00046 virtual void visitVLayer( VLayer& layer );
00047
00048 private:
00049 bool m_select;
00050 bool m_exclusive;
00051 KoRect m_rect;
00052 };
00053
00054 class VTestNodes : public VVisitor
00055 {
00056 public:
00057 VTestNodes( const KoRect& rect ) : m_rect( rect ) { m_segments.clear(); }
00058
00059 virtual void visitVSubpath( VSubpath& path );
00060 virtual void visitVLayer( VLayer& layer );
00061
00062 QPtrList<VSegment> &result() { return m_segments; }
00063
00064 private:
00065 KoRect m_rect;
00066 QPtrList<VSegment> m_segments;
00067 };
00068
00069 #endif
00070
00071
|