NAP
Public Member Functions | Public Attributes | List of all members
ParameterDropDown Class Reference

#include <parameterdropdown.h>

Public Member Functions

virtual void setValue (const Parameter &value) override
 
void setSelectedIndex (int selectedIndex)
 
int getSelectedIndex ()
 
void setItems (const std::vector< std::string > &items)
 
- Public Member Functions inherited from Parameter
const std::string getDisplayName () const
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

Signal< int > indexChanged
 
Signal< const std::vector< std::string > & > itemsChanged
 
std::vector< std::string > mItems
 Property: 'Items' items of this dropdown. More...
 
int mSelectedIndex = 0
 Property: 'SelectedIndex' selected index of this dropdown. More...
 
- Public Attributes inherited from Parameter
std::string mName
 Property 'Name': The name of this property. The name is separate from the ID and doesn't have to be unique. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Parameter that acts as a dropdown menu, holds an array of string values and a selected index

Inheritance diagram for ParameterDropDown:
[legend]
Collaboration diagram for ParameterDropDown:
[legend]

Member Function Documentation

◆ getSelectedIndex()

int getSelectedIndex ( )

Gets the selected index

Returns
the selected index

◆ setItems()

void setItems ( const std::vector< std::string > &  items)

Sets the items of the dropdown menu

◆ setSelectedIndex()

void setSelectedIndex ( int  selectedIndex)

Sets the selected index

Parameters
selectedIndexthe selected index

◆ setValue()

virtual void setValue ( const Parameter value)
overridevirtual

Set the value for this parameter from another parameter

Parameters
valueThe parameter to set the value from

Implements Parameter.

Member Data Documentation

◆ indexChanged

Signal<int> indexChanged

◆ itemsChanged

Signal<const std::vector<std::string>&> itemsChanged

◆ mItems

std::vector<std::string> mItems

Property: 'Items' items of this dropdown.

◆ mSelectedIndex

int mSelectedIndex = 0

Property: 'SelectedIndex' selected index of this dropdown.