/*******************************************************************************
***  This file is part of Dux Rei Nummariae.                                 ***
***                                                                          ***
***  Copyright (C) 2017, 2018, 2019, 2020, 2021                              ***
***  John Schneiderman <Licensing _AT_ Schneiderman _DOT_ me>                ***
***                                                                          ***
***  This program is free software: you can redistribute it and/or modify it ***
***  under the terms of the GNU Affero General Public License as published   ***
***  by the Free Software Foundation, either version 3 of the License, or    ***
***  (at your option) any later version.                                     ***
***                                                                          ***
***  This program is distributed in the hope that it will be useful, but     ***
***  WITHOUT ANY WARRANTY; without even the implied warranty of              ***
***  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    ***
***  See the GNU Affero General Public License for more details.             ***
***                                                                          ***
***  You should have received a copy of the GNU Affero General Public License***
***  along with this program. If not, see <http://www.gnu.org/licenses/>.    ***
*******************************************************************************/
#ifndef DRN_DESKTOP_UI_INTERNAL_DASHBOARDWIDGET_H_
#define DRN_DESKTOP_UI_INTERNAL_DASHBOARDWIDGET_H_

#include <QWidget>

#include <vector>

#include <ui_DashboardWidget.h>


namespace pecunia
{
namespace currency
{

enum class Iso4217Codes : quint16;

}}

namespace drn
{
namespace adviser
{

class BudgetHealth;

}
namespace budgeting
{

struct BudgetItemDue;
enum class BudgetItemTypes : quint8;
struct BudgetTotals;

}
namespace foundation
{

template<typename>
class ObserverPtr;

}
namespace desktop_ui
{
namespace internal
{

/**
 * A Qt Widget that displays all the basic budget information. This object deletes itself when it
 * closes.
 */
class DashboardWidget : public QWidget, Ui::DashboardWdgt
{
	Q_OBJECT

signals:
	void displayBudgetInterface(const budgeting::BudgetItemTypes& type);

public:
	DashboardWidget(
		const budgeting::BudgetTotals& bt,
		const std::vector<budgeting::BudgetItemDue>& due,
		const adviser::BudgetHealth& bh,
		const foundation::Days& dueWithin,
		const pecunia::currency::Iso4217Codes& preferred,
		const foundation::ObserverPtr<::QWidget>& parent
	);
};

}}}

#endif
