/****************************************************************************
** Copyright (c) 2016, Fougue SAS <https://www.fougue.pro>
** SPDX-License-Identifier: BSD-2-Clause
****************************************************************************/

#pragma once

#include "grid_helper.h"
#include "list_helper.h"
class QFileInfo;

namespace Mayo {

class WidgetHomeFiles : public QWidget {
    Q_OBJECT
public:
    explicit WidgetHomeFiles(QWidget* parent = nullptr);

signals:
    void newDocumentRequested();
    void openDocumentsRequested();
    void recentFileOpenRequested(const QFileInfo& fp);

protected:
    void resizeEvent(QResizeEvent* event) override;
    void showEvent(QShowEvent* event) override;

private:
    GridHelper::View* m_gridView;
    GridHelper::ProxyModel m_gridModel;
    ListHelper::ItemDelegate* m_gridDelegate;
};

} // namespace Mayo
