API Documentation
Loading...
Searching...
No Matches
ModelChooserCombo Class Reference

#include <ModelChooserCombo.h>

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

Signals

void modelSelectedSignal (UUID id)
 
void newModelSelectedSignal ()
 
- Signals inherited from QCustomComboBox
void edited ()
 

Public Member Functions

void addID (const UUID &id)
 
bool canAddModel (const Model &model)
 
TranslatedString displayName (const Model &m)
 
bool isModelAllowed (const Model &model)
 
bool isNewSelected () const
 
 ModelChooserCombo (QWidget *parent=nullptr)
 
virtual void onSorted (const Buffer< uint04 > &sorted_indices)
 
void refreshFromManager ()
 
void removeID (const UUID &id)
 
UUID selectedID () const
 
void setAllowNew (bool allow_new, const TranslatedString &new_title)
 
void setCurrentSelection (UUID id)
 
void setDisplayNameCallback (std::function< TranslatedString(const Model &)> &callback)
 
void setExclusionList (const Buffer< UUID > &exclusion_list)
 
void setIDs (const Buffer< UUID > &ids)
 
void setIncludeParentName (bool include_parent_name, const String &parent_type=String())
 
void setIncludePath (bool include_parent_name, const String &parent_type=String())
 
void setManager (QTModelManager *manager)
 
void setModelFilter (const std::function< bool(const Model &)> &model_filter)
 
void setModelParentID (const UUID &parent)
 
void setModels (const Buffer< Model > &models)
 
void setModelType (const String &type)
 
void setToNew ()
 
- Public Member Functions inherited from QCustomComboBox
template<class t_type >
void add (const t_type &value, const TranslatedString &display_value, bool refresh_widget=false)
 
void clearValue ()
 
QCustomValidatorcustomValidator ()
 
const QCustomValidatorcustomValidator () const
 
const Buffer< TranslatedString > & displayValues () const
 
bool event (QEvent *event) override
 
void focusInEvent (QFocusEvent *e) override
 
template<class t_type >
t_type getAs () const
 
template<class t_type >
t_type getAs (uint04 index) const
 
Angle< fltp08getUnitAngle () const
 
fltp08 getUnitValue () const
 
void hidePopup () override
 
bool isUsingCustom () const
 
void lockInCustomValue ()
 
QSize minimumSizeHint () const override
 
void paintEvent (QPaintEvent *) override
 
 QCustomComboBox (QWidget *parent=nullptr)
 
void refresh ()
 
template<class t_type >
void remove (const t_type &value, bool refresh_widget=false)
 
void resizeEvent (QResizeEvent *event) override
 
template<class t_enum >
std::enable_if< ObjectInfo< t_enum >::Enum >::type set (t_enum value)
 
void setAllowCustom (bool allow_custom)
 
void setAutoFormat (bool auto_format)
 
void setConstantUnit (const ConstPointer< Unit > &unit, uint01 dimension=Constant< uint01 >::Invalid)
 
void setCustomUnit (const String &unit, UnitCategory fallback_unit, uint01 dimension=Constant< uint01 >::Invalid)
 
void setCustomValidator (const QCustomValidator &validator)
 
void setSuffix (const TranslatedString &suffix)
 
void setTitle (const TranslatedString &title)
 
void setToolTip (const TranslatedString &tooltip)
 
void setUnitType (UnitCategory unit, uint01 dimension=Constant< uint01 >::Invalid)
 
void setUnitValue (fltp08 value, uint01 unit_dimension=0)
 
template<class t_object >
void setup (const TranslatedString &title, const Buffer< std::pair< TranslatedString, t_object > > &items)
 
void setup (const TranslatedString &title, const Buffer< String > &values, const Buffer< TranslatedString > &display_values)
 
template<class t_object >
std::enable_if< ObjectInfo< t_object >::Enum >::type setup (const TranslatedString &title, const Buffer< t_object > &items)
 
template<class t_object >
std::enable_if< ObjectInfo< t_object >::Number >::type setup (const TranslatedString &title, const Buffer< t_object > &items)
 
template<class t_object >
std::enable_if<!ObjectInfo< t_object >::Enum &&!ObjectInfo< t_object >::Number >::type setup (const TranslatedString &title, const Buffer< t_object > &items)
 
void setup (const TranslatedString &title, const Buffer< TranslatedString > &values)
 
template<class t_enum >
std::enable_if< ObjectInfo< t_enum >::Enum >::type setup (const TranslatedString &title, t_enum first, t_enum last)
 
template<class t_enum >
std::enable_if< ObjectInfo< t_enum >::Enum >::type setup (const TranslatedString &title, uint04 size)
 
template<class t_type >
void setupResource (const TranslatedString &title, Resource< t_type > &resource)
 
void setValue (const String &value)
 
template<class t_type >
void setValue (const t_type &t_value)
 
void setValue (const TranslatedString &t_value)
 
void showPopup () override
 
QSize sizeHint () const override
 
void sortAlphabetically (uint04 start=0, uint04 size=Constant< uint04 >::Invalid)
 
const TranslatedStringsuffix () const
 
void updateFontSize ()
 
const Buffer< String > & values () const
 
void wheelEvent (QWheelEvent *e) override
 

Protected Slots

void addModel (const Model &m)
 
void onEdited ()
 
void onObjectAddedSlot (const Buffer< UUID > &ids)
 
void onObjectsDeletedSlot ()
 
void onObjectUpdatedSlot (Buffer< UUID > ids)
 
- Protected Slots inherited from QCustomComboBox
void onChange ()
 
void onEdit ()
 
void onEditTextChangedSlot ()
 

Protected Attributes

bool m_allow_add_new
 
std::function< TranslatedString(const Model &)> m_display_name_callback
 
Set< UUIDm_exclusion_list
 
bool m_include_parent_name
 
bool m_include_path
 
QTModelManagerm_manager
 
std::function< bool(const Model &)> m_model_filter
 
UUID m_model_parent = Constant<UUID>::Invalid
 
Dictionary< UUID, Buffer< UUID > > m_model_parents
 
String m_model_type
 
Dictionary< UUID, uint04m_models
 
String m_parent_type
 
- Protected Attributes inherited from QCustomComboBox
Dictionary< uint04, uint04enum_to_index
 
Dictionary< uint04, uint04index_to_enum
 
bool m_allow_custom
 
bool m_auto_format
 
String m_current_custom
 
uint04 m_custom_index
 
Buffer< TranslatedStringm_display_values
 
bool m_is_changing = false
 
bool m_is_refreshing = false
 
bool m_is_showing_popup = false
 
uint04 m_last_index
 
QCustomLineEditm_line_edit
 
QTResourceListenerm_resource_changed_listener
 
bool m_sort_alphabetically = false
 
uint04 m_sort_offset = 0
 
TranslatedString m_suffix
 
bool m_using_custom
 
Buffer< Stringm_values
 

Additional Inherited Members

- Protected Member Functions inherited from QCustomComboBox
void adjustLineEditSize ()
 
void refreshWidget ()
 

Constructor & Destructor Documentation

◆ ModelChooserCombo()

ModelChooserCombo ( QWidget * parent = nullptr)

Member Function Documentation

◆ addID()

void addID ( const UUID & id)

◆ addModel

void addModel ( const Model & m)
inlineprotectedslot

◆ canAddModel()

bool canAddModel ( const Model & model)
inline

◆ displayName()

TranslatedString displayName ( const Model & m)

◆ isModelAllowed()

bool isModelAllowed ( const Model & model)

◆ isNewSelected()

bool isNewSelected ( ) const
inline

◆ modelSelectedSignal

void modelSelectedSignal ( UUID id)
signal

◆ newModelSelectedSignal

void newModelSelectedSignal ( )
signal

◆ onEdited

void onEdited ( )
protectedslot

◆ onObjectAddedSlot

void onObjectAddedSlot ( const Buffer< UUID > & ids)
protectedslot

◆ onObjectsDeletedSlot

void onObjectsDeletedSlot ( )
protectedslot

◆ onObjectUpdatedSlot

void onObjectUpdatedSlot ( Buffer< UUID > ids)
protectedslot

◆ onSorted()

virtual void onSorted ( const Buffer< uint04 > & sorted_indices)
virtual

Reimplemented from QCustomComboBox.

◆ refreshFromManager()

void refreshFromManager ( )
inline

◆ removeID()

void removeID ( const UUID & id)
inline

◆ selectedID()

UUID selectedID ( ) const
inline

◆ setAllowNew()

void setAllowNew ( bool allow_new,
const TranslatedString & new_title )

◆ setCurrentSelection()

void setCurrentSelection ( UUID id)

◆ setDisplayNameCallback()

void setDisplayNameCallback ( std::function< TranslatedString(const Model &)> & callback)
inline

◆ setExclusionList()

void setExclusionList ( const Buffer< UUID > & exclusion_list)
inline

◆ setIDs()

void setIDs ( const Buffer< UUID > & ids)
inline

◆ setIncludeParentName()

void setIncludeParentName ( bool include_parent_name,
const String & parent_type = String() )

◆ setIncludePath()

void setIncludePath ( bool include_parent_name,
const String & parent_type = String() )

◆ setManager()

void setManager ( QTModelManager * manager)

◆ setModelFilter()

void setModelFilter ( const std::function< bool(const Model &)> & model_filter)
inline

◆ setModelParentID()

void setModelParentID ( const UUID & parent)

◆ setModels()

void setModels ( const Buffer< Model > & models)

◆ setModelType()

void setModelType ( const String & type)

◆ setToNew()

void setToNew ( )
inline

Member Data Documentation

◆ m_allow_add_new

bool m_allow_add_new
protected

◆ m_display_name_callback

std::function<TranslatedString(const Model&)> m_display_name_callback
protected

◆ m_exclusion_list

Set<UUID> m_exclusion_list
protected

◆ m_include_parent_name

bool m_include_parent_name
protected

◆ m_include_path

bool m_include_path
protected

◆ m_manager

QTModelManager* m_manager
protected

◆ m_model_filter

std::function<bool(const Model&)> m_model_filter
protected

◆ m_model_parent

UUID m_model_parent = Constant<UUID>::Invalid
protected

◆ m_model_parents

Dictionary<UUID, Buffer<UUID> > m_model_parents
protected

◆ m_model_type

String m_model_type
protected

◆ m_models

Dictionary<UUID, uint04> m_models
protected

◆ m_parent_type

String m_parent_type
protected

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