ladybird/Applications/FileManager/DirectoryTableView.h

31 lines
771 B
C
Raw Normal View History

#pragma once
#include <LibGUI/GTableView.h>
#include <sys/stat.h>
2019-03-23 01:42:49 +01:00
#include "DirectoryModel.h"
class DirectoryTableView final : public GTableView {
public:
explicit DirectoryTableView(GWidget* parent);
virtual ~DirectoryTableView() override;
void open(const String& path);
String path() const { return model().path(); }
void open_parent_directory();
void refresh();
Function<void(const String&)> on_path_change;
Function<void(String)> on_status_message;
private:
virtual void model_notification(const GModelNotification&) override;
2019-03-23 01:42:49 +01:00
DirectoryModel& model() { return *m_model; }
const DirectoryModel& model() const { return *m_model; }
void set_status_message(const String&);
2019-03-23 01:42:49 +01:00
Retained<DirectoryModel> m_model;
};