Inviwo  0.9.10.1
Inviwo documentation
inviwo::ListPropertyWidgetQt Class Reference

PropertyWidget for a ListProperty. More...

#include <listpropertywidgetqt.h>

+ Inheritance diagram for inviwo::ListPropertyWidgetQt:

Public Member Functions

 ListPropertyWidgetQt (ListProperty *property)
 
virtual void updateFromProperty () override
 
virtual bool isChildRemovable () const override
 
virtual std::unique_ptr< QMenu > getContextMenu () override
 
- Public Member Functions inherited from inviwo::CompositePropertyWidgetQt
 CompositePropertyWidgetQt (CompositeProperty *property)
 
virtual bool isCollapsed () const override
 
virtual void onSetCollapsed (bool value) override
 
virtual void initState () override
 
- Public Member Functions inherited from inviwo::CollapsibleGroupBoxWidgetQt
 CollapsibleGroupBoxWidgetQt (CompositeProperty *property, bool isCheckable=false)
 
 CollapsibleGroupBoxWidgetQt (Processor *property, bool isCheckable=false)
 
 CollapsibleGroupBoxWidgetQt (Settings *property, bool isCheckable=false)
 
 CollapsibleGroupBoxWidgetQt (Property *property, PropertyOwner *owner, const std::string &displayName="", bool isCheckable=false)
 
virtual std::string getDisplayName () const
 
virtual void setDisplayName (const std::string &displayName)
 
void addProperty (Property *tmpProperty)
 
const std::vector< Property * > & getProperties ()
 
const std::vector< PropertyWidgetQt * > & getPropertyWidgets ()
 
void setPropertyOwner (PropertyOwner *propertyOwner)
 
PropertyOwnergetPropertyOwner () const
 
void setShowIfEmpty (bool val)
 
virtual bool isChecked () const
 
bool isCheckable () const
 
void setCheckable (bool checkable)
 
virtual QSize sizeHint () const override
 
virtual QSize minimumSizeHint () const override
 
virtual void setReadOnly (bool readonly) override
 
void toggleCollapsed ()
 
std::unique_ptr< QMimeData > getPropertyOwnerMimeData () const
 
- Public Member Functions inherited from inviwo::PropertyWidgetQt
 PropertyWidgetQt (Property *property=nullptr)
 
void setSpacingAndMargins (QLayout *layout)
 
virtual void onChildVisibilityChange (PropertyWidgetQt *child)
 
void setNestedDepth (int depth)
 
int getNestedDepth () const
 
PropertyWidgetQtgetParentPropertyWidget () const
 
void setParentPropertyWidget (PropertyWidgetQt *parent)
 
virtual std::unique_ptr< QMimeData > getPropertyMimeData () const
 
- Public Member Functions inherited from inviwo::PropertyWidget
 PropertyWidget (Property *property)
 
virtual ~PropertyWidget ()
 
virtual PropertyEditorWidgetgetEditorWidget () const
 
virtual bool hasEditorWidget () const
 
virtual PropertygetProperty ()
 
- Public Member Functions inherited from inviwo::PropertyObserver
virtual void onSetIdentifier (Property *property, const std::string &identifier)
 
virtual void onSetDisplayName (Property *property, const std::string &displayName)
 
- Public Member Functions inherited from inviwo::Observer
 Observer (const Observer &other)
 
 Observer (Observer &&other)
 
Observeroperator= (Observer &&other)
 
Observeroperator= (const Observer &other)
 
virtual ~Observer ()
 
void removeObservation (ObservableInterface *observable)
 
void removeObservations ()
 
- Public Member Functions inherited from inviwo::PropertyOwnerObserver
virtual void onWillAddProperty (Property *property, size_t index)
 
virtual void onDidRemoveProperty (Property *property, size_t index)
 
- Public Member Functions inherited from inviwo::ProcessorObserver
virtual void onAboutPropertyChange (Property *)
 
virtual void onProcessorInvalidationBegin (Processor *)
 
virtual void onProcessorInvalidationEnd (Processor *)
 
virtual void onProcessorIdentifierChanged (Processor *, const std::string &)
 
virtual void onProcessorPortAdded (Processor *, Port *)
 
virtual void onProcessorPortRemoved (Processor *, Port *)
 
virtual void onProcessorAboutToProcess (Processor *)
 
virtual void onProcessorFinishedProcess (Processor *)
 
virtual void onProcessorSourceChanged (Processor *)
 
virtual void onProcessorSinkChanged (Processor *)
 
virtual void onProcessorReadyChanged (Processor *)
 

Protected Member Functions

bool canAddElements () const
 
void addNewItem (size_t index)
 
- Protected Member Functions inherited from inviwo::CompositePropertyWidgetQt
virtual void setCollapsed (bool value) override
 
- Protected Member Functions inherited from inviwo::CollapsibleGroupBoxWidgetQt
virtual void onDidAddProperty (Property *property, size_t index) override
 
virtual void onWillRemoveProperty (Property *property, size_t index) override
 
void onProcessorDisplayNameChanged (Processor *processor, const std::string &oldIdentifier) override
 
virtual void onSetSemantics (Property *property, const PropertySemantics &semantics) override
 
virtual void onSetReadOnly (Property *property, bool readonly) override
 
virtual void onSetVisible (Property *property, bool visible) override
 
virtual void onSetUsageMode (Property *property, UsageMode usageMode) override
 
virtual void setVisible (bool visible) override
 
virtual void setChecked (bool checked)
 
void setEmptyLabelString (const std::string &str)
 set the text which is shown if there are no sub-properties and showIfEmpty is true More...
 
std::unique_ptr< QWidget > createPropertyLayoutWidget ()
 
void addButtonLayout (QGridLayout *layout, int row, Property *prop)
 
void insertProperty (Property *prop, size_t index)
 
void insertPropertyWidget (PropertyWidgetQt *propertyWidget, bool insertAtEnd)
 
virtual void updateFocusPolicy ()
 
- Protected Member Functions inherited from inviwo::PropertyWidgetQt
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
UsageMode getApplicationUsageMode ()
 
virtual bool event (QEvent *event) override
 
virtual void paintEvent (QPaintEvent *pe) override
 
int getSpacing () const
 Assigned on mousePressEvent.
 
- Protected Member Functions inherited from inviwo::Observer
void addObservation (ObservableInterface *observable)
 

Protected Attributes

ListPropertylistProperty_
 
QToolButton * addItemButton_
 
- Protected Attributes inherited from inviwo::CollapsibleGroupBoxWidgetQt
std::string displayName_
 
bool checked_
 
EditableLabelQtlabel_
 
QToolButton * resetButton_
 
std::vector< Property * > properties_
 
std::vector< PropertyWidgetQt * > propertyWidgets_
 
std::vector< std::unique_ptr< PropertyWidgetQt > > oldWidgets_
 
- Protected Attributes inherited from inviwo::PropertyWidgetQt
QPoint mousePressedPosition_
 
- Protected Attributes inherited from inviwo::PropertyWidget
Propertyproperty_ = nullptr
 
- Protected Attributes inherited from inviwo::Observer
ObservableSet observables_
 

Additional Inherited Members

- Public Types inherited from inviwo::PropertyWidgetQt
using BaseCallBack = std::function< void()>
 
- Static Public Member Functions inherited from inviwo::PropertyWidgetQt
static void setSpacingAndMargins (QWidget *w, QLayout *layout)
 
- Public Attributes inherited from inviwo::PropertyOwnerObserver
friend PropertyOwnerObservable
 
- Public Attributes inherited from inviwo::ProcessorObserver
friend ProcessorObservable
 
- Static Public Attributes inherited from inviwo::PropertyWidgetQt
static const double minimumWidthEm
 
static const double spacingEm = utilqt::refSpaceEm()
 
static const double marginEm
 
static const int minimumWidth = 200
 
static const int spacing = 7
 
static const int margin = 0
 
- Protected Types inherited from inviwo::Observer
using ObservableSet = std::unordered_set< ObservableInterface * >
 

Detailed Description

PropertyWidget for a ListProperty.

This widget considers the UI flags of the property. If the property supports adding list elements, a tool button is added next to the property name (indicated by a plus). In case multiple prefab objects are registered with the property, a menu is shown. Alternatively, new entries can be added using the context menu. List entries can be removed via a small "x" tool button next to them, if enabled.

Member Function Documentation

◆ updateFromProperty()

void inviwo::ListPropertyWidgetQt::updateFromProperty ( )
overridevirtual

Implement this function to update the widget after the property has been modified.

Reimplemented from inviwo::CollapsibleGroupBoxWidgetQt.


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