mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
fa232ac180
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.
20 lines
472 B
C++
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;
|
|
};
|