ladybird/LibGUI/GFilePicker.h
Andreas Kling fa232ac180 LibGUI: Remove GModel activations to GAbstractView.
Now you can hook activation via GAbstractView::on_activation.
The design still isn't quite right, we should eventually move the selection
away from the model somehow.
2019-05-09 04:56:52 +02:00

20 lines
472 B
C++

#include <LibGUI/GDialog.h>
#include <LibGUI/GTableView.h>
class GDirectoryModel;
class GFilePicker final : public GDialog {
public:
GFilePicker(const String& path = "/", CObject* parent = nullptr);
virtual ~GFilePicker() override;
String selected_file() const;
virtual const char* class_name() const override { return "GFilePicker"; }
private:
GTableView* m_view { nullptr };
Retained<GDirectoryModel> m_model;
String m_selected_file;
};