#include <View.h>
Inherits PropertyContainer.
Inheritance diagram for ViewPropertyContainer:


Definition at line 384 of file View.h.
Public Types | |
| enum | PropertyType { ToggleProperty, RangeProperty, ValueProperty, ColourProperty, UnitsProperty, InvalidProperty } |
| typedef QString | PropertyName |
| typedef std::vector< PropertyName > | PropertyList |
Public Slots | |
| virtual void | setProperty (const PropertyName &n, int value) |
| virtual void | setProperty (const PropertyName &, int value) |
| Set a property. | |
| virtual void | setProperty (QString nameString, QString valueString) |
| Set a property using a fuzzy match. | |
| virtual void | setPropertyWithCommand (const PropertyName &, int value) |
| Set a property using a command, supporting undo and redo. | |
| virtual void | setPropertyWithCommand (QString nameString, QString valueString) |
| As above, but using a command. | |
Signals | |
| void | propertyChanged (PropertyContainer::PropertyName) |
Public Member Functions | |
| ViewPropertyContainer (View *v) | |
| PropertyList | getProperties () const |
| Get a list of the names of all the supported properties on this container. | |
| QString | getPropertyLabel (const PropertyName &n) const |
| PropertyType | getPropertyType (const PropertyName &n) const |
| int | getPropertyRangeAndValue (const PropertyName &n, int *min, int *max, int *deflt) const |
| QString | getPropertyValueLabel (const PropertyName &n, int value) const |
| QString | getPropertyContainerName () const |
| QString | getPropertyContainerIconName () const |
| virtual QString | getPropertyLabel (const PropertyName &) const =0 |
| Return the human-readable (and i18n'ised) name of a property. | |
| virtual PropertyType | getPropertyType (const PropertyName &) const |
| Return the type of the given property, or InvalidProperty if the property is not supported on this container. | |
| virtual QString | getPropertyIconName (const PropertyName &) const |
| Return an icon for the property, if any. | |
| virtual QString | getPropertyGroupName (const PropertyName &) const |
| If this property has something in common with other properties on this container, return a name that can be used to group them (in order to save screen space, for example). | |
| virtual int | getPropertyRangeAndValue (const PropertyName &, int *min, int *max, int *deflt) const |
| Return the minimum and maximum values for the given property and its current value in this container. | |
| virtual QString | getPropertyValueLabel (const PropertyName &, int value) const |
| If the given property is a ValueProperty, return the display label to be used for the given value for that property. | |
| virtual RangeMapper * | getNewPropertyRangeMapper (const PropertyName &) const |
| If the given property is a RangeProperty, return a new RangeMapper object mapping its integer range onto an underlying floating point value range for human-intelligible display, if appropriate. | |
| virtual PlayParameters * | getPlayParameters () |
Protected Member Functions | |
| virtual bool | convertPropertyStrings (QString nameString, QString valueString, PropertyName &name, int &value) |
Protected Attributes | |
| View * | m_v |
typedef QString PropertyContainer::PropertyName [inherited] |
Definition at line 35 of file PropertyContainer.h.
typedef std::vector<PropertyName> PropertyContainer::PropertyList [inherited] |
Definition at line 36 of file PropertyContainer.h.
enum PropertyContainer::PropertyType [inherited] |
Definition at line 38 of file PropertyContainer.h.
| ViewPropertyContainer::ViewPropertyContainer | ( | View * | v | ) |
| PropertyList ViewPropertyContainer::getProperties | ( | ) | const [inline, virtual] |
Get a list of the names of all the supported properties on this container.
These should be fixed (i.e. not internationalized).
Reimplemented from PropertyContainer.
Definition at line 390 of file View.h.
References View::getProperties(), and m_v.
| QString ViewPropertyContainer::getPropertyLabel | ( | const PropertyName & | n | ) | const [inline] |
| PropertyType ViewPropertyContainer::getPropertyType | ( | const PropertyName & | n | ) | const [inline] |
| int ViewPropertyContainer::getPropertyRangeAndValue | ( | const PropertyName & | n, | |
| int * | min, | |||
| int * | max, | |||
| int * | deflt | |||
| ) | const [inline] |
| QString ViewPropertyContainer::getPropertyValueLabel | ( | const PropertyName & | n, | |
| int | value | |||
| ) | const [inline] |
| QString ViewPropertyContainer::getPropertyContainerName | ( | ) | const [inline, virtual] |
Implements PropertyContainer.
Definition at line 404 of file View.h.
References View::getPropertyContainerName(), and m_v.
| QString ViewPropertyContainer::getPropertyContainerIconName | ( | ) | const [inline, virtual] |
Implements PropertyContainer.
Definition at line 407 of file View.h.
References View::getPropertyContainerIconName(), and m_v.
| virtual void ViewPropertyContainer::setProperty | ( | const PropertyName & | n, | |
| int | value | |||
| ) | [inline, virtual, slot] |
| virtual QString PropertyContainer::getPropertyLabel | ( | const PropertyName & | ) | const [pure virtual, inherited] |
Return the human-readable (and i18n'ised) name of a property.
Referenced by PropertyContainer::convertPropertyStrings(), and PropertyBox::updatePropertyEditor().
| PropertyContainer::PropertyType PropertyContainer::getPropertyType | ( | const PropertyName & | ) | const [virtual, inherited] |
Return the type of the given property, or InvalidProperty if the property is not supported on this container.
Definition at line 33 of file PropertyContainer.cpp.
References PropertyContainer::InvalidProperty.
Referenced by PropertyBox::colourDatabaseChanged(), PropertyContainer::convertPropertyStrings(), ImageLayer::getPropertyType(), PropertyContainer::getPropertyValueLabel(), PropertyBox::propertyControllerChanged(), PropertyBox::unitDatabaseChanged(), and PropertyBox::updatePropertyEditor().
| QString PropertyContainer::getPropertyIconName | ( | const PropertyName & | ) | const [virtual, inherited] |
Return an icon for the property, if any.
Definition at line 39 of file PropertyContainer.cpp.
Referenced by PropertyBox::updatePropertyEditor().
| QString PropertyContainer::getPropertyGroupName | ( | const PropertyName & | ) | const [virtual, inherited] |
If this property has something in common with other properties on this container, return a name that can be used to group them (in order to save screen space, for example).
e.g. "Window Type" and "Window Size" might both have a group name of "Window". If this property is not groupable, return the empty string.
Definition at line 45 of file PropertyContainer.cpp.
Referenced by PropertyBox::updatePropertyEditor().
| int PropertyContainer::getPropertyRangeAndValue | ( | const PropertyName & | , | |
| int * | min, | |||
| int * | max, | |||
| int * | deflt | |||
| ) | const [virtual, inherited] |
Return the minimum and maximum values for the given property and its current value in this container.
Min and/or max may be passed as NULL if their values are not required.
Definition at line 51 of file PropertyContainer.cpp.
Referenced by PropertyContainer::convertPropertyStrings(), PropertyContainer::SetPropertyCommand::execute(), SpectrogramLayer::getPropertyRangeAndValue(), SingleColourLayer::getPropertyRangeAndValue(), ImageLayer::getPropertyRangeAndValue(), Colour3DPlotLayer::getPropertyRangeAndValue(), PropertyContainer::setPropertyWithCommand(), and PropertyBox::updatePropertyEditor().
| QString PropertyContainer::getPropertyValueLabel | ( | const PropertyName & | , | |
| int | value | |||
| ) | const [virtual, inherited] |
If the given property is a ValueProperty, return the display label to be used for the given value for that property.
Definition at line 61 of file PropertyContainer.cpp.
References PropertyContainer::ColourProperty, ColourDatabase::getColourCount(), ColourDatabase::getColourName(), ColourDatabase::getInstance(), and PropertyContainer::getPropertyType().
Referenced by PropertyContainer::convertPropertyStrings(), SingleColourLayer::getPropertyValueLabel(), ImageLayer::getPropertyValueLabel(), and PropertyBox::updatePropertyEditor().
| RangeMapper * PropertyContainer::getNewPropertyRangeMapper | ( | const PropertyName & | ) | const [virtual, inherited] |
If the given property is a RangeProperty, return a new RangeMapper object mapping its integer range onto an underlying floating point value range for human-intelligible display, if appropriate.
The RangeMapper should be allocated with new, and the caller takes responsibility for deleting it. Return NULL (as in the default implementation) if there is no such mapping.
Definition at line 74 of file PropertyContainer.cpp.
Referenced by PropertyContainer::convertPropertyStrings(), and PropertyBox::updatePropertyEditor().
| virtual PlayParameters* PropertyContainer::getPlayParameters | ( | ) | [inline, virtual, inherited] |
Reimplemented in Layer.
Definition at line 106 of file PropertyContainer.h.
Referenced by PropertyBox::editPlugin(), PropertyBox::pluginConfigurationChanged(), and PropertyBox::populateViewPlayFrame().
| void PropertyContainer::propertyChanged | ( | PropertyContainer::PropertyName | ) | [signal, inherited] |
Referenced by Preferences::setBackgroundMode(), Preferences::setOmitTempsFromRecentFiles(), Preferences::setPropertyBoxLayout(), Preferences::setResampleOnLoad(), Preferences::setResampleQuality(), Preferences::setShowSplash(), Preferences::setSpectrogramSmoothing(), Preferences::setTemporaryDirectoryRoot(), Preferences::setTuningFrequency(), Preferences::setViewFontSize(), Preferences::setWindowType(), SpectrogramLayer::SpectrogramLayer(), SpectrumLayer::SpectrumLayer(), and ViewPropertyContainer().
| void PropertyContainer::setProperty | ( | const PropertyName & | , | |
| int | value | |||
| ) | [virtual, slot, inherited] |
Set a property.
This is used for all property types. For boolean properties, zero is false and non-zero true; for colours, the integer value is an index into the colours in the global ColourDatabase.
Definition at line 80 of file PropertyContainer.cpp.
References PropertyContainer::getPropertyContainerName().
Referenced by PropertyContainer::SetPropertyCommand::execute(), PropertyContainer::setProperty(), ImageLayer::setProperty(), and PropertyContainer::SetPropertyCommand::unexecute().
| void PropertyContainer::setProperty | ( | QString | nameString, | |
| QString | valueString | |||
| ) | [virtual, slot, inherited] |
Set a property using a fuzzy match.
Compare nameString with the property labels and underlying names, and if it matches one (with preference given to labels), try to convert valueString appropriately and set it. The valueString should contain a value label for value properties, a mapped value for range properties, "on" or "off" for toggle properties, a colour or unit name, or the underlying integer value for the property.
Note that as property and value labels may be translatable, the results of this function may vary by locale. It is intended for handling user-originated strings, _not_ persistent storage.
The default implementation should work for most subclasses.
Definition at line 96 of file PropertyContainer.cpp.
References PropertyContainer::convertPropertyStrings(), and PropertyContainer::setProperty().
| void PropertyContainer::setPropertyWithCommand | ( | const PropertyName & | , | |
| int | value | |||
| ) | [virtual, slot, inherited] |
Set a property using a command, supporting undo and redo.
The default implementation should work for most subclasses.
Definition at line 86 of file PropertyContainer.cpp.
References CommandHistory::addCommand(), CommandHistory::getInstance(), and PropertyContainer::getPropertyRangeAndValue().
Referenced by MainWindow::handleOSCMessage(), PropertyBox::propertyControllerChanged(), and PropertyContainer::setPropertyWithCommand().
| void PropertyContainer::setPropertyWithCommand | ( | QString | nameString, | |
| QString | valueString | |||
| ) | [virtual, slot, inherited] |
As above, but using a command.
Definition at line 111 of file PropertyContainer.cpp.
References PropertyContainer::convertPropertyStrings(), and PropertyContainer::setPropertyWithCommand().
| bool PropertyContainer::convertPropertyStrings | ( | QString | nameString, | |
| QString | valueString, | |||
| PropertyName & | name, | |||
| int & | value | |||
| ) | [protected, virtual, inherited] |
Definition at line 126 of file PropertyContainer.cpp.
References PropertyContainer::ColourProperty, ColourDatabase::getColourIndex(), UnitDatabase::getInstance(), ColourDatabase::getInstance(), PropertyContainer::getNewPropertyRangeMapper(), RangeMapper::getPositionForValue(), PropertyContainer::getProperties(), PropertyContainer::getPropertyLabel(), PropertyContainer::getPropertyRangeAndValue(), PropertyContainer::getPropertyType(), PropertyContainer::getPropertyValueLabel(), UnitDatabase::getUnitId(), PropertyContainer::InvalidProperty, PropertyContainer::RangeProperty, PropertyContainer::ToggleProperty, PropertyContainer::UnitsProperty, and PropertyContainer::ValueProperty.
Referenced by PropertyContainer::setProperty(), and PropertyContainer::setPropertyWithCommand().
View* ViewPropertyContainer::m_v [protected] |
Definition at line 417 of file View.h.
Referenced by getProperties(), getPropertyContainerIconName(), getPropertyContainerName(), getPropertyLabel(), getPropertyRangeAndValue(), getPropertyType(), getPropertyValueLabel(), setProperty(), and ViewPropertyContainer().
1.5.1