-
Notifications
You must be signed in to change notification settings - Fork 0
/
evententry.cpp
46 lines (35 loc) · 901 Bytes
/
evententry.cpp
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
38
39
40
41
42
43
44
45
46
#include "evententry.h"
#include "ui_evententry.h"
#include <QFileDialog>
EventEntry::EventEntry(QWidget *parent, QVector<EventEntry*>* entries) :
QWidget(parent),
ui(new Ui::EventEntry)
{
ui->setupUi(this);
id = entries->size();
entries->append(this);
this->setFixedHeight(this->height());
this->entries = entries;
}
EventEntry::~EventEntry()
{
delete ui;
}
void EventEntry::on_remove_pb_clicked()
{
entries->remove(id);
for(int i = id; i < entries->size(); i++)
(*entries)[i]->id -= 1;
close();
delete this;
}
void EventEntry::setEventID(int eventID) { ui->eventID_sb->setValue(eventID); }
void EventEntry::setSample(int sample) { ui->sample_sb->setValue(sample); }
void EventEntry::on_sample_sb_valueChanged(int arg1)
{
this->sample = arg1;
}
void EventEntry::on_eventID_sb_valueChanged(int arg1)
{
this->eventID = arg1;
}