MultiSelection Class Reference

#include <Selection.h>

Inherits XmlExportable.

Inheritance diagram for MultiSelection:

Inheritance graph
[legend]
Collaboration diagram for MultiSelection:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 46 of file Selection.h.

Public Types

typedef std::set< SelectionSelectionList

Public Member Functions

 MultiSelection ()
virtual ~MultiSelection ()
const SelectionListgetSelections () const
void setSelection (const Selection &selection)
void addSelection (const Selection &selection)
void removeSelection (const Selection &selection)
void clearSelections ()
void getExtents (size_t &startFrame, size_t &endFrame) const
Selection getContainingSelection (size_t frame, bool defaultToFollowing) const
 Return the selection that contains a given frame.
virtual void toXml (QTextStream &stream, QString indent="", QString extraAttributes="") const
 Stream this exportable object out to XML on a text stream.
virtual QString toXmlString (QString indent="", QString extraAttributes="") const
 Convert this exportable object to XML in a string.

Static Public Member Functions

static QString encodeEntities (QString)
static QString encodeColour (QColor)
static int getObjectExportId (const void *)

Protected Attributes

SelectionList m_selections


Member Typedef Documentation

typedef std::set<Selection> MultiSelection::SelectionList

Definition at line 52 of file Selection.h.


Constructor & Destructor Documentation

MultiSelection::MultiSelection (  ) 

Definition at line 102 of file Selection.cpp.

MultiSelection::~MultiSelection (  )  [virtual]

Definition at line 106 of file Selection.cpp.


Member Function Documentation

const MultiSelection::SelectionList & MultiSelection::getSelections (  )  const

Definition at line 111 of file Selection.cpp.

References m_selections.

Referenced by ViewManager::SetSelectionCommand::getName(), ViewManager::getSelections(), MainWindow::handleOSCMessage(), ViewManager::setSelections(), and WavFileWriter::writeModel().

void MultiSelection::setSelection ( const Selection selection  ) 

Definition at line 117 of file Selection.cpp.

References addSelection(), and clearSelections().

Referenced by MainWindow::exportAudio(), ViewManager::setSelection(), and WavFileWriter::writeModel().

void MultiSelection::addSelection ( const Selection selection  ) 

Definition at line 124 of file Selection.cpp.

References m_selections.

Referenced by ViewManager::addSelection(), and setSelection().

void MultiSelection::removeSelection ( const Selection selection  ) 

Definition at line 156 of file Selection.cpp.

References m_selections.

Referenced by ViewManager::removeSelection().

void MultiSelection::clearSelections (  ) 

Definition at line 169 of file Selection.cpp.

References m_selections.

Referenced by ViewManager::clearSelections(), and setSelection().

void MultiSelection::getExtents ( size_t &  startFrame,
size_t &  endFrame 
) const

Definition at line 177 of file Selection.cpp.

References m_selections.

Referenced by MainWindow::addLayer().

Selection MultiSelection::getContainingSelection ( size_t  frame,
bool  defaultToFollowing 
) const

Return the selection that contains a given frame.

If defaultToFollowing is true, and if the frame is not in a selected area, return the next selection after the given frame. Return the empty selection if no appropriate selection is found.

Definition at line 196 of file Selection.cpp.

References m_selections.

Referenced by ViewManager::getContainingSelection().

void MultiSelection::toXml ( QTextStream &  stream,
QString  indent = "",
QString  extraAttributes = "" 
) const [virtual]

Stream this exportable object out to XML on a text stream.

Implements XmlExportable.

Definition at line 217 of file Selection.cpp.

References m_selections.

Referenced by MainWindowBase::toXml().

QString XmlExportable::toXmlString ( QString  indent = "",
QString  extraAttributes = "" 
) const [virtual, inherited]

Convert this exportable object to XML in a string.

The default implementation calls toXml and returns the result as a string. Do not override this unless you really know what you're doing.

Definition at line 25 of file XmlExportable.cpp.

References XmlExportable::toXml().

Referenced by LayerFactory::setLayerDefaultProperties().

QString XmlExportable::encodeEntities ( QString   )  [static, inherited]

Definition at line 41 of file XmlExportable.cpp.

Referenced by AudioGenerator::getDefaultPlayPluginConfiguration(), SVFileReader::readPlugin(), Layer::toBriefXml(), WaveFileModel::toXml(), Transform::toXml(), TextPoint::toXml(), PluginXml::toXml(), Model::toXml(), Layer::toXml(), ImagePoint::toXml(), and Document::writeBackwardCompatibleDerivation().

QString XmlExportable::encodeColour ( QColor   )  [static, inherited]

Definition at line 54 of file XmlExportable.cpp.

Referenced by ColourDatabase::getStringValues().

int XmlExportable::getObjectExportId ( const void *   )  [static, inherited]

Definition at line 71 of file XmlExportable.cpp.

Referenced by FFTDataServer::generateFileBasename(), View::getTextLabelHeight(), Layer::toBriefXml(), SparseModel< PointType >::toXml(), Model::toXml(), Layer::toXml(), EditableDenseThreeDimensionalModel::toXml(), Document::toXml(), and Document::writeBackwardCompatibleDerivation().


Member Data Documentation

SelectionList MultiSelection::m_selections [protected]

Definition at line 74 of file Selection.h.

Referenced by addSelection(), clearSelections(), getContainingSelection(), getExtents(), getSelections(), removeSelection(), and toXml().


The documentation for this class was generated from the following files:
Generated on Wed Feb 20 15:45:34 2008 for SonicVisualiser by  doxygen 1.5.1