-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphviewer.cpp
More file actions
34 lines (28 loc) · 1005 Bytes
/
graphviewer.cpp
File metadata and controls
34 lines (28 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "graphviewer.h"
#include "financegraph.h"
#include "ui_graphviewer.h"
GraphViewer::GraphViewer(QWidget *parent)
: QDialog(parent)
, ui(new Ui::GraphViewer)
{
ui->setupUi(this);
}
GraphViewer::~GraphViewer()
{
delete ui;
}
void GraphViewer::sendAccounts(Account f, Account t, Account o)
{
financeGraph *foodGraph = new financeGraph(this);
financeGraph *transportationGraph = new financeGraph(this);
financeGraph *otherGraph = new financeGraph(this);
foodGraph->setTitle("Food Account");
transportationGraph->setTitle("Transportation Account");
otherGraph->setTitle("Other Account");
foodGraph->appendData(f.GetTransactions());
transportationGraph->appendData(t.GetTransactions());
otherGraph->appendData(o.GetTransactions());
ui->foodGraphLayout->addWidget(foodGraph->getChartView());
ui->transportationGraphLayout->addWidget(transportationGraph->getChartView());
ui->otherGraphLayout->addWidget(otherGraph->getChartView());
}