blob: 3c437c45a2d543da401fba102e62b044a54cddde (
plain) (
blame)
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
35
36
37
|
#include "diffview.hpp"
#include <QTextEdit>
#include <QLabel>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <qboxlayout.h>
diff_view::diff_view(QWidget *par) : QWidget(par)
{
this->setWindowTitle("Map tally comparison results");
tea_b = new QTextEdit();
teb_a = new QTextEdit();
tea_b->setReadOnly(true);
teb_a->setReadOnly(true);
auto hl = new QHBoxLayout();
auto lvl = new QVBoxLayout();
lvl->addWidget(new QLabel("Maps present in library but not in tally"));
lvl->addWidget(tea_b);
auto rvl = new QVBoxLayout();
rvl->addWidget(new QLabel("Maps present in tally but not in library"));
rvl->addWidget(teb_a);
hl->addLayout(lvl);
hl->addLayout(rvl);
this->setLayout(hl);
}
void diff_view::set_results(const std::vector<int> &a_b, const std::vector<int> &b_a)
{
tea_b->clear();
teb_a->clear();
QString sa_b, sb_a;
for (auto &i : a_b) sa_b.append(QString("%1\n").arg(i));
for (auto &i : b_a) sb_a.append(QString("%1\n").arg(i));
tea_b->setText(sa_b);
teb_a->setText(sb_a);
}
|