USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::RubberBandComboBox Class Reference

Combo box for choosing a rubber band type. More...

#include <RubberBandComboBox.h>

Inheritance diagram for Isis::RubberBandComboBox:
Inheritance graph
[legend]
Collaboration diagram for Isis::RubberBandComboBox:
Collaboration graph
[legend]

List of all members.

Public Types

enum  RubberBandOptions {
  Circle = 1, Ellipse = 2, Rectangle = 4, RotatedRectangle = 8,
  Polygon = 16, Line = 32, SegmentedLine = 64, Angle = 128
}
 

Enum to store rubber band shapes.

More...

Public Member Functions

 RubberBandComboBox (unsigned int bandingOptions, unsigned int defaultOption, bool showIndicatorColors=false)
 RubberBandComboBox constructor.
QString toolIconDir () const
 Returns the icon directory.
void reset ()
 Resets the selection.

Protected Slots

void selectionChanged (int index)
 This slot is called whenever the rubberband shape selection has changed.

Private Member Functions

unsigned int getDefault (unsigned int defaultOption, unsigned int bandingOptions)
 This is used to figure out which option should be defaulted.
void showAngle ()
 Enables the angle shape.
void showCircle ()
 Enables the circle shape.
void showEllipse ()
 Enables the ellipse shape.
void showLine ()
 Enables the line.
void showRectangle ()
 Enables the rectangle shape.
void showRotatedRectangle ()
 Enables the rotated rectangle shape.
void showPolygon ()
 Enables the polygon shape.
void showSegmentedLine ()
 Enables the segmented line shape.

Private Attributes

QStringList p_bandingOptionStrings
 List of rubberband options.
bool p_showIndicatorColors
 Show colors?

Detailed Description

Combo box for choosing a rubber band type.

Author:
2007-09-11 Steven Lambright

For internal use only.

History:
2008-09-26 Steven Lambright Added Segmented line, reordered banding options at Stuart's Request
History:
2008-10-01 Steven Lambright Fixed bug with segmented line, if polygon was enabled then segmented line was
History:
2010-06-26 Eric Hyer - Fixed one include issue
History:
2010-11-08 Eric Hyer - Updated documentation for drawing lines

Definition at line 26 of file RubberBandComboBox.h.


Member Enumeration Documentation

Enum to store rubber band shapes.

Enumerator:
Circle 

Circle.

Ellipse 

Ellipse.

Rectangle 

Rectangle.

RotatedRectangle 

RotatedRectangle.

Polygon 

Polygon.

Line 

Line.

SegmentedLine 

Segmented Line.

Angle 

Angle.

Definition at line 35 of file RubberBandComboBox.h.


Constructor & Destructor Documentation

Isis::RubberBandComboBox::RubberBandComboBox ( unsigned int  bandingOptions,
unsigned int  defaultOption,
bool  showIndicatorColors = false 
)

RubberBandComboBox constructor.

Parameters:
bandingOptions 
defaultOption 
showIndicatorColors 

Definition at line 16 of file RubberBandComboBox.cpp.

References Circle, getDefault(), Isis::RubberBandTool::getInstance(), Line, p_bandingOptionStrings, p_showIndicatorColors, Polygon, Rectangle, RotatedRectangle, SegmentedLine, selectionChanged(), and toolIconDir().


Member Function Documentation

unsigned int Isis::RubberBandComboBox::getDefault ( unsigned int  defaultOption,
unsigned int  bandingOptions 
) [private]

This is used to figure out which option should be defaulted.

Returns the default option.

Parameters:
defaultOption 
bandingOptions 
Returns:
unsigned int

Definition at line 239 of file RubberBandComboBox.cpp.

Referenced by RubberBandComboBox().

void Isis::RubberBandComboBox::reset (  ) 

Resets the selection.

Definition at line 225 of file RubberBandComboBox.cpp.

References selectionChanged().

Referenced by Isis::MeasureTool::enableRubberBandTool().

void Isis::RubberBandComboBox::selectionChanged ( int  index  )  [protected, slot]

This slot is called whenever the rubberband shape selection has changed.

Parameters:
index 

Definition at line 188 of file RubberBandComboBox.cpp.

References Circle, Line, Polygon, Rectangle, RotatedRectangle, SegmentedLine, showAngle(), showCircle(), showEllipse(), showLine(), showPolygon(), showRectangle(), showRotatedRectangle(), showSegmentedLine(), and Isis::toInt().

Referenced by reset(), and RubberBandComboBox().

void Isis::RubberBandComboBox::showAngle (  )  [inline, private]

Enables the angle shape.

Definition at line 60 of file RubberBandComboBox.h.

References p_showIndicatorColors.

Referenced by selectionChanged().

void Isis::RubberBandComboBox::showCircle (  )  [inline, private]

Enables the circle shape.

Definition at line 64 of file RubberBandComboBox.h.

References p_showIndicatorColors.

Referenced by selectionChanged().

void Isis::RubberBandComboBox::showEllipse (  )  [inline, private]

Enables the ellipse shape.

Definition at line 68 of file RubberBandComboBox.h.

References p_showIndicatorColors.

Referenced by selectionChanged().

void Isis::RubberBandComboBox::showLine (  )  [inline, private]

Enables the line.

Definition at line 72 of file RubberBandComboBox.h.

References p_showIndicatorColors.

Referenced by selectionChanged().

void Isis::RubberBandComboBox::showPolygon (  )  [inline, private]

Enables the polygon shape.

Definition at line 84 of file RubberBandComboBox.h.

References p_showIndicatorColors.

Referenced by selectionChanged().

void Isis::RubberBandComboBox::showRectangle (  )  [inline, private]

Enables the rectangle shape.

Definition at line 76 of file RubberBandComboBox.h.

References p_showIndicatorColors.

Referenced by selectionChanged().

void Isis::RubberBandComboBox::showRotatedRectangle (  )  [inline, private]

Enables the rotated rectangle shape.

Definition at line 80 of file RubberBandComboBox.h.

References p_showIndicatorColors.

Referenced by selectionChanged().

void Isis::RubberBandComboBox::showSegmentedLine (  )  [inline, private]

Enables the segmented line shape.

Definition at line 88 of file RubberBandComboBox.h.

References p_showIndicatorColors.

Referenced by selectionChanged().

QString Isis::RubberBandComboBox::toolIconDir (  )  const [inline]

Returns the icon directory.

Definition at line 47 of file RubberBandComboBox.h.

References Isis::RubberBandTool::getInstance(), and Isis::Tool::toolIconDir().

Referenced by RubberBandComboBox().


Member Data Documentation

List of rubberband options.

Definition at line 90 of file RubberBandComboBox.h.

Referenced by RubberBandComboBox().


The documentation for this class was generated from the following files: