mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 18:55:07 +00:00

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.
19 lines
472 B
C++
19 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;
|
|
};
|