qCC  version 2.5.4 (Qt) - 19 Apr. 2014
 All Classes Functions Variables Typedefs Enumerations
Public Member Functions | Protected Types | Protected Slots | Protected Attributes | List of all members
ccGraphicalSegmentationTool Class Reference

Graphical segmentation mechanism (with polyline) More...

#include <ccGraphicalSegmentationTool.h>

Inheritance diagram for ccGraphicalSegmentationTool:
Inheritance graph
[legend]
Collaboration diagram for ccGraphicalSegmentationTool:
Collaboration graph
[legend]

Public Member Functions

 ccGraphicalSegmentationTool (QWidget *parent)
 Default constructor.
 
virtual ~ccGraphicalSegmentationTool ()
 Destructor.
 
bool addEntity (ccHObject *anObject)
 Adds an entity (and/or its children) to the 'to be segmented' pool. More...
 
unsigned getNumberOfValidEntities ()
 Returns the number of entites currently in the the 'to be segmented' pool.
 
ccPolyline * getPolyLine ()
 Get a pointer to the polyline that has been segmented.
 
const std::set< ccHObject * > & entities () const
 Returns the active 'to be segmented' set.
 
virtual bool linkWith (ccGLWindow *win)
 Links the overlay dialog with a MDI window. More...
 
virtual bool start ()
 Starts process. More...
 
virtual void stop (bool accepted)
 Stops process/dialog. More...
 
bool deleteHiddenParts () const
 Returns whether hidden parts should be delete after segmentation.
 
void removeAllEntities (bool unallocateVisibilityArrays)
 Remove entities from the 'to be segmented' pool.
 
- Public Member Functions inherited from ccOverlayDialog
 ccOverlayDialog (QWidget *parent=0)
 Default constructor.
 
virtual ~ccOverlayDialog ()
 Destructor.
 
virtual void reject ()
 
void addOverridenShortcut (Qt::Key key)
 Adds a keyboard shortcut (single key) that will be overridden from the associated window. More...
 

Protected Types

enum  ProcessStates {
  POLYLINE = 1, RECTANGLE = 2, PAUSED = 32, STARTED = 64,
  RUNNING = 128
}
 Process states.
 

Protected Slots

void segmentIn ()
 
void segmentOut ()
 
void segment (bool)
 
void reset ()
 
void apply ()
 
void applyAndDelete ()
 
void cancel ()
 
void addPointToPolyline (int x, int y)
 
void closePolyLine (int x=0, int y=0)
 
void closeRectangle ()
 
void updatePolyLine (int x, int y, Qt::MouseButtons buttons)
 
void pauseSegmentationMode (bool)
 
void doSetPolylineSelection ()
 
void doSetRectangularSelection ()
 
void onShortcutTriggered (int)
 To capture overridden shortcuts (pause button, etc.)
 
- Protected Slots inherited from ccOverlayDialog
virtual void onLinkedWindowDeletion (QObject *object=0)
 Slot called when the linked window is deleted (calls 'onClose')
 

Protected Attributes

std::set< ccHObject * > m_toSegment
 To be segmented entities.
 
bool m_somethingHasChanged
 Whether something has changed or not (for proper 'cancel')
 
unsigned m_state
 Current process state.
 
ccPolyline * m_segmentationPoly
 Segmentation polyline.
 
ccPointCloud * m_polyVertices
 Segmentation polyline vertices.
 
bool m_rectangularSelection
 Selection mode.
 
bool m_deleteHiddenParts
 Whether to delete hidden parts after segmentation.
 
- Protected Attributes inherited from ccOverlayDialog
ccGLWindow * m_associatedWin
 Associated (MDI) window.
 
bool m_processing
 Running/processing state.
 
QList< int > m_overriddenKeys
 Overridden keys.
 

Additional Inherited Members

- Signals inherited from ccOverlayDialog
void processFinished (bool accepted)
 Signal emitted when process is finished. More...
 
void shortcutTriggered (int key)
 Signal emitted when an overridden key shortcut is pressed. More...
 
- Protected Member Functions inherited from ccOverlayDialog
bool eventFilter (QObject *obj, QEvent *e)
 

Detailed Description

Graphical segmentation mechanism (with polyline)

Member Function Documentation

bool ccGraphicalSegmentationTool::addEntity ( ccHObject *  anObject)

Adds an entity (and/or its children) to the 'to be segmented' pool.

Warning: some entities may be rejected if they are locked, or can't be segmented this way.

Returns
whether entity has been added to the pool or not
bool ccGraphicalSegmentationTool::linkWith ( ccGLWindow *  win)
virtual

Links the overlay dialog with a MDI window.

Warning: link can't be modified while dialog is displayed/process is running!

Returns
success

Reimplemented from ccOverlayDialog.

bool ccGraphicalSegmentationTool::start ( )
virtual

Starts process.

Returns
success

Reimplemented from ccOverlayDialog.

void ccGraphicalSegmentationTool::stop ( bool  accepted)
virtual

Stops process/dialog.

Automatically emits the 'processFinished' signal (with input state as argument).

Parameters
acceptedprocess/dialog result

Reimplemented from ccOverlayDialog.


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