Source
xxxxxxxxxx
626
626
virtual ~PlotFlagAllTool();
627
627
628
628
// Implements PlotMouseTool::handleMouseEvent().
629
629
virtual void handleMouseEvent(const PlotEvent& event);
630
630
631
631
};
632
632
INHERITANCE_POINTER(PlotFlagAllTool, PlotFlagAllToolPtr, PlotMouseTool,
633
633
PlotMouseToolPtr, PlotTool, PlotToolPtr)
634
634
635
635
636
+
// A PlotUnflagAllTool is a concrete subclass of PlotMouseTool that handles
637
+
// one-click data unflag functionality.
638
+
// PlotUnflagAllTool is responsible for:
639
+
// 1) the behavior described above
640
+
class PlotUnflagAllTool : public virtual PlotMouseTool {
641
+
public:
642
+
// Constructor which takes the tool's coordinate system.
643
+
PlotUnflagAllTool(PlotCoordinate::System system = PlotCoordinate::WORLD);
644
+
645
+
// Constructor which takes the tool's axes and coordinate system.
646
+
PlotUnflagAllTool(PlotAxis xAxis, PlotAxis yAxis,
647
+
PlotCoordinate::System system = PlotCoordinate::WORLD);
648
+
649
+
// Destructor.
650
+
virtual ~PlotUnflagAllTool();
651
+
652
+
// Implements PlotMouseTool::handleMouseEvent().
653
+
virtual void handleMouseEvent(const PlotEvent& event);
654
+
655
+
};
656
+
INHERITANCE_POINTER(PlotUnflagAllTool, PlotUnflagAllToolPtr, PlotMouseTool,
657
+
PlotMouseToolPtr, PlotTool, PlotToolPtr)
658
+
659
+
636
660
///////////////////////////////
637
661
// TOOL NOTIFICATION CLASSES //
638
662
///////////////////////////////
639
663
640
664
641
665
// Interface for objects that want to be notified when the selection tool
642
666
// changes.
643
667
class PlotSelectToolNotifier {
644
668
friend class PlotSelectTool;
645
669
833
857
PlotStandardMouseToolGroup(PlotAxis xAxis, PlotAxis yAxis,
834
858
ToolCode activeTool = NONE_TOOL,
835
859
PlotCoordinate::System system = PlotCoordinate::WORLD);
836
860
837
861
// Constructor which uses the given tools (or creates default tools if the
838
862
// given ones are invalid), and sets the active tool to the given.
839
863
PlotStandardMouseToolGroup(PlotSelectToolPtr selectTool,
840
864
PlotZoomToolPtr zoomTool,
841
865
PlotPanToolPtr panTool,
842
866
PlotFlagAllToolPtr flagAllTool,
867
+
PlotUnflagAllToolPtr unflagAllTool,
843
868
PlotTrackerToolPtr trackerTool,
844
869
ToolCode activeTool = NONE_TOOL);
845
870
846
871
// Destructor.
847
872
~PlotStandardMouseToolGroup();
848
873
849
874
// Gets/sets the active standard tool.
850
875
// <group>
851
876
void setActiveTool(ToolCode tool);
852
877
ToolCode activeToolType() const;
864
889
vector<PlotRegion> getSelectedRects();
865
890
void clearSelectedRects();
866
891
867
892
// Provides access to the individual tools. Note: this should be avoided
868
893
// if possible.
869
894
// <group>
870
895
PlotSelectToolPtr selectTool();
871
896
PlotZoomToolPtr zoomTool();
872
897
PlotPanToolPtr panTool();
873
898
PlotFlagAllToolPtr flagAllTool();
899
+
PlotUnflagAllToolPtr unflagAllTool();
874
900
PlotTrackerToolPtr trackerTool();
875
901
// </group>
876
902
877
903
// Overrides PlotMouseToolGroup handler methods to give events to the
878
904
// tracker first.
879
905
// <group>
880
906
void handleMouseEvent(const PlotEvent& event) {
881
907
if(m_tracker->isActive()) m_tracker->handleMouseEvent(event);
882
908
PlotMouseToolGroup::handleMouseEvent(event); }
883
909