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.
1// SedSAT3 – Sediment Source Assessment Tool, version 3
2// U.S. Geological Survey. See LICENSE.md and DISCLAIMER.md in the repository root.
3
5#include "ui_dialogchooseexcelsheets.h"
6#include <QListWidgetItem>
7
8DialogChooseExcelSheets::DialogChooseExcelSheets(QWidget *parent, QStringList **_items) :
9 QDialog(parent),
11{
12 *_items = new QStringList();
13 items = *_items;
14 ui->setupUi(this);
15}
16
21
22void DialogChooseExcelSheets::AddItem(const QString &item)
23{
24 QListWidgetItem *listItem = new QListWidgetItem(item,ui->listWidget);
25 listItem->setCheckState(Qt::Unchecked);
26 ui->listWidget->addItem(listItem);
27
28}
29
31{
32 QDialog::reject();
33}
35{
36
37 for(int i = 0; i < ui->listWidget->count(); ++i)
38 {
39 QListWidgetItem* item = ui->listWidget->item(i);
40 if (item->checkState())
41 {
42 items->append(item->text());
43 }
44 }
45 QDialog::accept();
46}
void AddItem(const QString &item)
Ui::DialogChooseExcelSheets * ui
DialogChooseExcelSheets(QWidget *parent, QStringList **_items)