-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpotentialdiffwidget.cpp
More file actions
37 lines (30 loc) · 885 Bytes
/
potentialdiffwidget.cpp
File metadata and controls
37 lines (30 loc) · 885 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
35
36
#include "potentialdiffwidget.h"
#include "ui_potentialdiffwidget.h"
PotentialDiffWidget::PotentialDiffWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::PotentialDiffWidget)
{
ui->setupUi(this);
}
PotentialDiffWidget::PotentialDiffWidget(QWidget *parent, Change* chng, Chapter* chpt) :
QWidget(parent),
ui(new Ui::PotentialDiffWidget)
{
//Set values for obj.
this->change = chng;
this->chapter = chpt;
//Obtain sentences to display to user.
const QString labelText = "Original Sentence: " + change->getOriginalSentence() +
"\nProposed Sentence: " + change->getProposedSentence();
ui->setupUi(this);
ui->changeTextLabel->setText(labelText);
}
PotentialDiffWidget::~PotentialDiffWidget()
{
delete ui;
}
void PotentialDiffWidget::on_mergeDiffButton_clicked()
{
chapter->mergeNotes(change);
this->hide();
}