casa
5.7.0-16
|
Dialog for editing a single region shape. More...
#include <QtSingleRegionShape.qo.h>
Public Slots | |
void | apply () |
Apply changes to the underlying region shape. More... | |
Signals | |
void | applyClicked () |
Only emitted when widget is in creation mode, the apply button is shown, and the apply button is clicked. More... | |
Public Member Functions | |
QtEditRegionShape (QtSingleRegionShape *shape) | |
Non-Static Members //. More... | |
QtEditRegionShape (RegionShape *shape, QtRegionShapeManager *manager, QWidget *coordWidget=NULL, bool showPosition=true, bool showSize=true, casacore::String applyButtonText="") | |
Creation mode constructor. More... | |
~QtEditRegionShape () | |
Destructor. More... | |
casacore::String | chosenCoordinateSystem () const |
Methods used for accessing what coordinate system/unit the user has chosen. More... | |
casacore::String | chosenPositionUnit () const |
casacore::String | chosenSizeUnit () const |
bool | enteredCoordinatesAreValid (casacore::String &reason) const |
Returns true if the entered coordinates are valid, false otherwise. More... | |
Static Public Member Functions | |
static std::vector < casacore::String > | systems () |
Returns available systems for the system chooser. More... | |
static QComboBox * | systemsChooser () |
Static Public Attributes | |
static const casacore::String | SEXAGESIMAL |
Static Members //. More... | |
static const casacore::String | UNKNOWN |
Private Slots | |
void | coordSystemChanged () |
Update the displayed values to reflect the coordinate system, position unit, and size unit chosen by the user. More... | |
void | coordReset () |
Resets the values, system, and units to that of the underlying shape. More... | |
void | linethrough () |
Enable/disable the linethrough options. More... | |
void | applySlot () |
Call apply() if in edit mode, otherwise emit applyClicked() signal. More... | |
Private Member Functions | |
void | init (QWidget *coordWidget=NULL, bool showPosition=true, bool showSize=true, casacore::String applyButtonText="") |
Initial GUI setup, depending on creation/edit mode. More... | |
void | setupGui () |
Sets up the GUI to reflect values/properties of the underlying region shape. More... | |
double | convertToRS (int index, bool &ok) const |
Takes the value entered in the coordinate at the given index of m_coordEdits and converts it into a number that can be sent to the shape's coordinate parameter methods. More... | |
void | displayCoordinates (const std::vector< double > &coords) |
Displays the given coordinates with the proper unit. More... | |
Static Private Member Functions | |
static std::vector < casacore::String > | positionUnits () |
Private Static Methods //. More... | |
static std::vector < casacore::String > | sizeUnits () |
Returns available units for the size unit chooser. More... | |
Private Attributes | |
bool | m_creation |
Indicates whether the widget is being used in creation or editing mode. More... | |
QtSingleRegionShape * | m_shape |
Shape being edited. More... | |
RegionShape * | m_cShape |
Shape being created. More... | |
QtRegionShapeManager * | m_manager |
Shape manager. More... | |
std::vector< QLineEdit * > | m_coordEdits |
casacore::Coordinate editing fields. More... | |
std::vector < RegionShape::CoordinateParameterType > | m_coordTypes |
Coord types. More... | |
casacore::String | m_lastSystem |
Last chosen system, position unit, and size unit. More... | |
casacore::String | m_lastPosUnit |
casacore::String | m_lastSizeUnit |
QtColorWidget * | m_lineColor |
Line color widget. More... | |
QtColorWidget * | m_ltColor |
Linethrough color widget. More... | |
QtColorWidget * | m_labelColor |
Label color widget. More... | |
std::vector< QtRSOption * > | m_optWidgets |
Option widgets. More... | |
std::vector < RegionShape::OptionType > | m_optTypes |
Option types. More... | |
Dialog for editing a single region shape.
Can either be used in editing or creation mode. Currently there are three sections:
Definition at line 179 of file QtSingleRegionShape.qo.h.
casa::QtEditRegionShape::QtEditRegionShape | ( | QtSingleRegionShape * | shape | ) |
Non-Static Members //.
Editing mode constructor.
casa::QtEditRegionShape::QtEditRegionShape | ( | RegionShape * | shape, |
QtRegionShapeManager * | manager, | ||
QWidget * | coordWidget = NULL , |
||
bool | showPosition = true , |
||
bool | showSize = true , |
||
casacore::String | applyButtonText = "" |
||
) |
Creation mode constructor.
showPosition, showSize, and applyButtonText are only used if coordWidget is not NULL.
casa::QtEditRegionShape::~QtEditRegionShape | ( | ) |
Destructor.
|
slot |
Apply changes to the underlying region shape.
Referenced by applySlot().
|
signal |
Only emitted when widget is in creation mode, the apply button is shown, and the apply button is clicked.
Referenced by applySlot().
|
inlineprivateslot |
Call apply() if in edit mode, otherwise emit applyClicked() signal.
Definition at line 343 of file QtSingleRegionShape.qo.h.
References apply(), applyClicked(), and m_creation.
casacore::String casa::QtEditRegionShape::chosenCoordinateSystem | ( | ) | const |
Methods used for accessing what coordinate system/unit the user has chosen.
casacore::String casa::QtEditRegionShape::chosenPositionUnit | ( | ) | const |
casacore::String casa::QtEditRegionShape::chosenSizeUnit | ( | ) | const |
|
private |
Takes the value entered in the coordinate at the given index of m_coordEdits and converts it into a number that can be sent to the shape's coordinate parameter methods.
|
privateslot |
Resets the values, system, and units to that of the underlying shape.
|
privateslot |
Update the displayed values to reflect the coordinate system, position unit, and size unit chosen by the user.
|
private |
Displays the given coordinates with the proper unit.
Assumes that the world system matches the GUI and the unit matches RegionShape::UNIT.
bool casa::QtEditRegionShape::enteredCoordinatesAreValid | ( | casacore::String & | reason | ) | const |
Returns true if the entered coordinates are valid, false otherwise.
Has no effect if a custom coordinate widget is provided. Entered coordinates are valid if: 1) Non-empty 2) For non-sexagesimal, contains a number 3) For sexagesimal, contains three numbers separated by :'s. If invalid, a reason is given.
|
private |
Initial GUI setup, depending on creation/edit mode.
|
privateslot |
Enable/disable the linethrough options.
|
inlinestaticprivate |
Private Static Methods //.
Returns available units for the position unit chooser.
Definition at line 311 of file QtSingleRegionShape.qo.h.
References casa::RSValue::DEG, casa::RSValue::DMS, casa::RSValue::HMS, casa::RSValue::RAD, and SEXAGESIMAL.
|
private |
Sets up the GUI to reflect values/properties of the underlying region shape.
|
inlinestaticprivate |
Returns available units for the size unit chooser.
Definition at line 322 of file QtSingleRegionShape.qo.h.
References casa::RSValue::ARCMIN, casa::RSValue::ARCSEC, casa::RSValue::DEG, and casa::RSValue::RAD.
|
inlinestatic |
Returns available systems for the system chooser.
Definition at line 192 of file QtSingleRegionShape.qo.h.
References casacore::MDirection::B1950, casacore::MDirection::ECLIPTIC, casacore::MDirection::GALACTIC, casacore::MDirection::J2000, casa::RSUtils::PIXEL, casacore::MDirection::showType(), and casacore::MDirection::SUPERGAL.
Referenced by systemsChooser().
|
inlinestatic |
Definition at line 203 of file QtSingleRegionShape.qo.h.
References systems().
|
private |
casacore::Coordinate editing fields.
Definition at line 266 of file QtSingleRegionShape.qo.h.
|
private |
Coord types.
Definition at line 269 of file QtSingleRegionShape.qo.h.
|
private |
Indicates whether the widget is being used in creation or editing mode.
Definition at line 254 of file QtSingleRegionShape.qo.h.
Referenced by applySlot().
|
private |
Shape being created.
Definition at line 260 of file QtSingleRegionShape.qo.h.
|
private |
Label color widget.
Definition at line 281 of file QtSingleRegionShape.qo.h.
|
private |
Definition at line 272 of file QtSingleRegionShape.qo.h.
|
private |
Definition at line 272 of file QtSingleRegionShape.qo.h.
|
private |
Last chosen system, position unit, and size unit.
Definition at line 272 of file QtSingleRegionShape.qo.h.
|
private |
Line color widget.
Definition at line 275 of file QtSingleRegionShape.qo.h.
|
private |
Linethrough color widget.
Definition at line 278 of file QtSingleRegionShape.qo.h.
|
private |
Shape manager.
Definition at line 263 of file QtSingleRegionShape.qo.h.
|
private |
Option types.
Definition at line 287 of file QtSingleRegionShape.qo.h.
|
private |
Option widgets.
Definition at line 284 of file QtSingleRegionShape.qo.h.
|
private |
Shape being edited.
Definition at line 257 of file QtSingleRegionShape.qo.h.
|
static |
Static Members //.
System/casacore::Unit constants.
Definition at line 187 of file QtSingleRegionShape.qo.h.
Referenced by positionUnits().
|
static |
Definition at line 188 of file QtSingleRegionShape.qo.h.