#include <selectionset.h>
The user will select vector objects on the screen and these selections are stored here as integer indices into the datasets themselves.
Definition at line 20 of file selectionset.h.
Signals | |
void | selectionChanged () |
Public Member Functions | |
SelectionSet () | |
SelectionSet (const SelectionSet ©Me) | |
void | operator= (const SelectionSet ©Me) |
Copy. | |
~SelectionSet () | |
SelectionSet::SelObj & | operator[] (int iobj) |
Overload [] to make selection set behave like an array of SelObjs. | |
void | clear () |
Deselect all the vector objects. | |
int | size () |
How many vector objects are in the selection list? | |
void | add (SelObj &obj) |
Add a new object to the list of vector objects selected by the user. | |
SelectionSet::SelBox & | selBox () |
Get the structure holding the information about the selection boundary the user has defined. | |
void | setSelecting (bool sel) |
Set the status of the user defining a selection boundary. | |
bool | isSelecting () |
Is a selection boundary being set or has it been set? | |
void | resetBox () |
Reset the selection boundary. | |
void | erase (int i) |
Remove item "i" from list of selected objects. | |
bool | isSelObj (int iobj) |
Is this object selected? Is this object on the list of selected objects? | |
bool | isSelNode (int iobj, int inode) |
Is this node selected? | |
Protected Attributes | |
std::vector< SelObj > | mSelObj |
array of selected vector elements | |
SelBox | mBox |
selection box drawn by user | |
bool | mSelecting |
is the user selecting (?) | |
Classes | |
struct | SelBox |
User on-screen selection box or boundary. More... | |
struct | SelObj |
A selected vector element. More... |
SelectionSet::SelectionSet | ( | ) |
Definition at line 4 of file selectionset.cpp.
References resetBox().
SelectionSet::SelectionSet | ( | const SelectionSet & | copyMe | ) | [inline] |
SelectionSet::~SelectionSet | ( | ) |
Definition at line 8 of file selectionset.cpp.
void SelectionSet::operator= | ( | const SelectionSet & | copyMe | ) | [inline] |
SelectionSet::SelObj & SelectionSet::operator[] | ( | int | iobj | ) |
Overload [] to make selection set behave like an array of SelObjs.
Return the information about the selected object as stored in the list at index iobj. Useful for iterating through all the selected vector objects.
iobj | index into the array of selected objects. |
Definition at line 23 of file selectionset.cpp.
References mSelObj.
void SelectionSet::clear | ( | ) |
Deselect all the vector objects.
Definition at line 30 of file selectionset.cpp.
References mSelObj.
Referenced by GLIMSGIDData::clear(), VectorEditor::clearAllLayerSelections(), GlacierConfigDlg::delSel(), GLIMSLineData::pop(), GlacierConfigDlg::setSelectedGID(), GLIMSLineData::validate(), GLIMSGIDData::validate(), and VectorEditor::viewMousePress().
int SelectionSet::size | ( | ) |
How many vector objects are in the selection list?
Definition at line 40 of file selectionset.cpp.
References mSelObj.
Referenced by VectorEditor::breakLine(), LineSelectorDlg::changeCurLine(), VectorEditor::clearAllLayerSelections(), VectorEditor::delSel(), GlacierConfigDlg::delSel(), GtoSConverter::getSelectedShapeList(), VectorEditor::isSelLine(), VectorEditor::isSelPoint(), VectorEditor::joinLine(), VectorEditor::overSelNode(), GlacierIDChooserDlg::setCurLines(), GlacierConfigDlg::setSelectedGID(), GlacierConfigDlg::updateListSelection(), VectorEditor::viewMousePress(), and VectorEditor::viewSelChanged().
void SelectionSet::add | ( | SelObj & | obj | ) |
Add a new object to the list of vector objects selected by the user.
obj | a single vector object to add to the selection list. |
Definition at line 50 of file selectionset.cpp.
References mSelObj.
Referenced by GlacierConfigDlg::setSelectedGID(), GLIMSLineData::validate(), GLIMSGIDData::validate(), VectorEditor::viewMousePress(), and VectorEditor::viewSelChanged().
SelectionSet::SelBox & SelectionSet::selBox | ( | ) |
Get the structure holding the information about the selection boundary the user has defined.
Definition at line 62 of file selectionset.cpp.
References mBox.
Referenced by VectorEditor::viewMouseMove(), VectorEditor::viewMousePress(), and VectorEditor::viewMouseRelease().
void SelectionSet::setSelecting | ( | bool | sel | ) |
Set the status of the user defining a selection boundary.
Change the status of whether or not the user is defining (or has defined) a boundary for selecting vector objects.
sel | boolean true: selection boundary is being set or has been set false: no selection boundary |
Definition at line 76 of file selectionset.cpp.
References mSelecting.
Referenced by VectorEditor::viewMousePress().
bool SelectionSet::isSelecting | ( | ) |
Is a selection boundary being set or has it been set?
Definition at line 86 of file selectionset.cpp.
References mSelecting.
Referenced by VectorEditor::viewMouseMove(), and VectorEditor::viewMouseRelease().
void SelectionSet::resetBox | ( | ) |
Reset the selection boundary.
Wipe out the selection boundary and set its status to "no selection" (mSelecting = false).
Definition at line 95 of file selectionset.cpp.
References SelectionSet::SelBox::h, mBox, mSelecting, SelectionSet::SelBox::w, SelectionSet::SelBox::x, and SelectionSet::SelBox::y.
Referenced by SelectionSet(), and VectorEditor::viewMouseRelease().
void SelectionSet::erase | ( | int | i | ) |
Remove item "i" from list of selected objects.
i | index of object to remove from list, where the first object in the list is at index 0 |
Definition at line 105 of file selectionset.cpp.
References mSelObj, and selectionChanged().
Referenced by VectorEditor::joinLine().
bool SelectionSet::isSelObj | ( | int | iobj | ) |
Is this object selected? Is this object on the list of selected objects?
iobj | an object to look for in list of selected objects |
Definition at line 118 of file selectionset.cpp.
References mSelObj.
Referenced by VectorLayer::draw().
bool SelectionSet::isSelNode | ( | int | iobj, | |
int | inode | |||
) |
Is this node selected?
iobj | object the node is a part of | |
inode | a Node to look for in the selected list |
Definition at line 134 of file selectionset.cpp.
References mSelObj.
Referenced by VectorLayer::draw().
void SelectionSet::selectionChanged | ( | ) | [signal] |
Referenced by erase().
std::vector<SelObj> SelectionSet::mSelObj [protected] |
array of selected vector elements
Definition at line 44 of file selectionset.h.
Referenced by add(), clear(), erase(), isSelNode(), isSelObj(), operator=(), operator[](), SelectionSet(), and size().
SelBox SelectionSet::mBox [protected] |
selection box drawn by user
Definition at line 45 of file selectionset.h.
Referenced by operator=(), resetBox(), selBox(), and SelectionSet().
bool SelectionSet::mSelecting [protected] |
is the user selecting (?)
Definition at line 46 of file selectionset.h.
Referenced by isSelecting(), operator=(), resetBox(), SelectionSet(), and setSelecting().
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |