SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
dialogchooseexcelsheets.cpp
Go to the documentation of this file.
2#include "ui_dialogchooseexcelsheets.h"
3#include <QListWidgetItem>
4
5DialogChooseExcelSheets::DialogChooseExcelSheets(QWidget *parent, QStringList **_items) :
6 QDialog(parent),
8{
9 *_items = new QStringList();
10 items = *_items;
11 ui->setupUi(this);
12}
13
18
19void DialogChooseExcelSheets::AddItem(const QString &item)
20{
21 QListWidgetItem *listItem = new QListWidgetItem(item,ui->listWidget);
22 listItem->setCheckState(Qt::Unchecked);
23 ui->listWidget->addItem(listItem);
24
25}
26
28{
29 QDialog::reject();
30}
32{
33
34 for(int i = 0; i < ui->listWidget->count(); ++i)
35 {
36 QListWidgetItem* item = ui->listWidget->item(i);
37 if (item->checkState())
38 {
39 items->append(item->text());
40 }
41 }
42 QDialog::accept();
43}
void AddItem(const QString &item)
Ui::DialogChooseExcelSheets * ui
DialogChooseExcelSheets(QWidget *parent, QStringList **_items)