mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:47:35 +00:00
LibGUI+VisualBuilder: Support custom editing widgets for property values.
Implemented this by letting GAbstractViews provide a GModelEditingDelegate for a given index, which then knows how to create and setup a custom widget appropriate for the data type being edited.
This commit is contained in:
parent
1d0ada32cc
commit
6a0011dcea
8 changed files with 170 additions and 7 deletions
|
@ -16,11 +16,15 @@ public:
|
|||
|
||||
void open();
|
||||
void close();
|
||||
void select_all();
|
||||
|
||||
GModel* model() { return m_list_view->model(); }
|
||||
const GModel* model() const { return m_list_view->model(); }
|
||||
void set_model(NonnullRefPtr<GModel>);
|
||||
|
||||
bool only_allow_values_from_model() const { return m_only_allow_values_from_model; }
|
||||
void set_only_allow_values_from_model(bool);
|
||||
|
||||
Function<void(const String&)> on_change;
|
||||
Function<void()> on_return_pressed;
|
||||
|
||||
|
@ -34,4 +38,5 @@ private:
|
|||
GButton* m_open_button { nullptr };
|
||||
GWindow* m_list_window { nullptr };
|
||||
GListView* m_list_view { nullptr };
|
||||
bool m_only_allow_values_from_model { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue