-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexportcsvform.cpp
55 lines (48 loc) · 1.49 KB
/
exportcsvform.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
47
48
49
50
51
52
53
54
55
#include "exportcsvform.h"
#include "ui_exportcsvform.h"
ExportCsvForm::ExportCsvForm(QWidget *parent) :
QDialog(parent),
ui(new Ui::ExportCsvForm)
{
ui->setupUi(this);
ui->selectedList->addItem("firstName");
ui->selectedList->addItem("lastName");
ui->selectedList->addItem("email");
ui->selectedList->addItem("phone");
ui->avalableList->addItem("scNumber");
ui->avalableList->addItem("studentNumber");
ui->avalableList->addItem("bDate");
ui->avalableList->addItem("street");
ui->avalableList->addItem("houseNumber");
ui->avalableList->addItem("postalCode");
ui->avalableList->addItem("city");
ui->avalableList->addItem("nationality");
ui->avalableList->addItem("gender");
ui->avalableList->addItem("currentlyMember");
ui->avalableList->addItem("dateLeft");
ui->avalableList->addItem("dateJoined");
ui->avalableList->addItem("initials");
ui->avalableList->addItem("comments");
}
ExportCsvForm::~ExportCsvForm()
{
delete ui;
}
void ExportCsvForm::on_putLeft_clicked()
{
QListWidgetItem* item= ui->avalableList->takeItem(ui->avalableList->currentRow());
ui->selectedList->addItem(item);
}
void ExportCsvForm::on_ExportCsvForm_accepted()
{
m_selectedValues.clear();
for(int i=0; i<ui->selectedList->count(); i++)
{
m_selectedValues << ui->selectedList->item(i)->text();
}
}
void ExportCsvForm::on_putRight_clicked()
{
QListWidgetItem* item= ui->selectedList->takeItem(ui->selectedList->currentRow());
ui->avalableList->addItem(item);
}