34#include <NDEVR/QCustomLineEdit.h>
35#include <NDEVR/QCustomValidator.h>
36#include <NDEVR/DesignObjectLookup.h>
37#include <NDEVR/DesignObject.h>
38#include <NDEVR/RegexFunctions.h>
53 , m_ignore_case(false)
55 setPlaceholderText(
_tqa(
"Search"));
56 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
57 customValidator().setAllowEmpty(
true);
69 m_objects_to_search = objects;
70 m_property = property;
71 onObjectUpdatedSlot();
75 if (m_objects_to_search == objects)
77 m_objects_to_search = objects;
78 onObjectUpdatedSlot();
82 m_property = property;
83 onObjectUpdatedSlot();
86 case DesignObject::DesignProperty::e_file:
87 customValidator().setRegex(RegexFunctions::FileRegex());
97 if (value.
size() == 0)
98 return m_objects_to_search;
101 const bool ignore_case = m_ignore_case;
102 for(
const UUID&
id : m_objects_to_search)
104 if(m_manager->object(
id).doesPropertyContain(property, value, ignore_case))
114 String value = getValue();
115 if (value.
size() == 0)
116 return m_objects_to_search;
119 const bool ignore_case = m_ignore_case;
120 for (
const UUID&
id : m_objects_to_search)
122 if (m_manager->object(
id).doesPropertyBeginWith(property, value, ignore_case))
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
void add(t_type &&object)
Adds object to the end of the buffer.
Definition Buffer.hpp:186
constexpr t_index_type size() const
Definition Buffer.hpp:823
A low-level database object that can be used to access general stored properties within the NDEVR Mod...
Definition DesignObject.h:67
DesignProperty
Values stored in the property database.
Definition DesignObject.h:93
A core class where all Design Objects including models, materials, and geometries are stored....
Definition DesignObjectLookup.h:65
A line edit allows users to enter and edit a single line of plain text with useful editing functions,...
Definition QCustomLineEdit.h:56
The core String class for the NDEVR API.
Definition String.h:69
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60