Isis 3 Programmer Reference
Isis::RubberBandComboBox Class Reference

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

#include <RubberBandComboBox.h>

Inheritance diagram for Isis::RubberBandComboBox:
Inheritance graph
Collaboration diagram for Isis::RubberBandComboBox:
Collaboration graph

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 (Tool *tool, unsigned int bandingOptions, unsigned int defaultOption, bool showIndicatorColors=false)
 RubberBandComboBox constructor. More...
 
QString toolIconDir () const
 Returns the icon directory. More...
 
void reset ()
 Resets the selection. More...
 

Protected Slots

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

Private Member Functions

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

Private Attributes

QStringList m_bandingOptionStrings
 List of rubberband options. More...
 
bool m_showIndicatorColors
 Show colors? More...
 
Toolm_tool
 

Detailed Description

Combo box for choosing a rubber band type.

Author
2007-09-11 Steven Lambright
History:

2008-09-26 Steven Lambright Added Segmented line, reordered banding options at Stuart's Request

2008-10-01 Steven Lambright Fixed bug with segmented line, if polygon was enabled then segmented line was

2010-06-26 Eric Hyer - Fixed one include issue

2010-11-08 Eric Hyer - Updated documentation for drawing lines

Definition at line 26 of file RubberBandComboBox.h.

Member Enumeration Documentation

◆ RubberBandOptions

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 36 of file RubberBandComboBox.h.

Constructor & Destructor Documentation

◆ RubberBandComboBox()

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

RubberBandComboBox constructor.

Parameters
bandingOptions
defaultOption
showIndicatorColors

Definition at line 16 of file RubberBandComboBox.cpp.

References Angle, Circle, Ellipse, getDefault(), Line, m_bandingOptionStrings, m_showIndicatorColors, Polygon, Rectangle, RotatedRectangle, SegmentedLine, selectionChanged(), and toolIconDir().

Member Function Documentation

◆ getDefault()

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 240 of file RubberBandComboBox.cpp.

Referenced by RubberBandComboBox().

◆ reset()

void Isis::RubberBandComboBox::reset ( )

Resets the selection.

Definition at line 226 of file RubberBandComboBox.cpp.

References selectionChanged().

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

◆ selectionChanged

void Isis::RubberBandComboBox::selectionChanged ( int  index)
protectedslot

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

Parameters
index

Definition at line 189 of file RubberBandComboBox.cpp.

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

Referenced by reset(), and RubberBandComboBox().

◆ showAngle()

void Isis::RubberBandComboBox::showAngle ( )
inlineprivate

Enables the angle shape.

Definition at line 61 of file RubberBandComboBox.h.

References Isis::RubberBandTool::enable(), and m_showIndicatorColors.

Referenced by selectionChanged().

◆ showCircle()

void Isis::RubberBandComboBox::showCircle ( )
inlineprivate

Enables the circle shape.

Definition at line 65 of file RubberBandComboBox.h.

References Isis::RubberBandTool::enable(), and m_showIndicatorColors.

Referenced by selectionChanged().

◆ showEllipse()

void Isis::RubberBandComboBox::showEllipse ( )
inlineprivate

Enables the ellipse shape.

Definition at line 69 of file RubberBandComboBox.h.

References Isis::RubberBandTool::enable(), and m_showIndicatorColors.

Referenced by selectionChanged().

◆ showLine()

void Isis::RubberBandComboBox::showLine ( )
inlineprivate

Enables the line.

Definition at line 73 of file RubberBandComboBox.h.

References Isis::RubberBandTool::enable(), and m_showIndicatorColors.

Referenced by selectionChanged().

◆ showPolygon()

void Isis::RubberBandComboBox::showPolygon ( )
inlineprivate

Enables the polygon shape.

Definition at line 86 of file RubberBandComboBox.h.

References Isis::RubberBandTool::enable(), and m_showIndicatorColors.

Referenced by selectionChanged().

◆ showRectangle()

void Isis::RubberBandComboBox::showRectangle ( )
inlineprivate

Enables the rectangle shape.

Definition at line 77 of file RubberBandComboBox.h.

References Isis::RubberBandTool::enable(), and m_showIndicatorColors.

Referenced by selectionChanged().

◆ showRotatedRectangle()

void Isis::RubberBandComboBox::showRotatedRectangle ( )
inlineprivate

Enables the rotated rectangle shape.

Definition at line 81 of file RubberBandComboBox.h.

References Isis::RubberBandTool::enable(), and m_showIndicatorColors.

Referenced by selectionChanged().

◆ showSegmentedLine()

void Isis::RubberBandComboBox::showSegmentedLine ( )
inlineprivate

Enables the segmented line shape.

Definition at line 90 of file RubberBandComboBox.h.

References Isis::RubberBandTool::enable(), and m_showIndicatorColors.

Referenced by selectionChanged().

◆ toolIconDir()

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

Returns the icon directory.

Definition at line 48 of file RubberBandComboBox.h.

References Isis::Tool::toolIconDir().

Referenced by RubberBandComboBox().

Member Data Documentation

◆ m_bandingOptionStrings

QStringList Isis::RubberBandComboBox::m_bandingOptionStrings
private

List of rubberband options.

Definition at line 94 of file RubberBandComboBox.h.

Referenced by RubberBandComboBox().

◆ m_showIndicatorColors

bool Isis::RubberBandComboBox::m_showIndicatorColors
private

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