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
4
#include "
dialogchooseexcelsheets.h
"
5
#include "ui_dialogchooseexcelsheets.h"
6
#include <QListWidgetItem>
7
8
DialogChooseExcelSheets::DialogChooseExcelSheets
(QWidget *parent, QStringList **_items) :
9
QDialog(parent),
10
ui
(new
Ui
::
DialogChooseExcelSheets
)
11
{
12
*_items =
new
QStringList();
13
items
= *_items;
14
ui
->setupUi(
this
);
15
}
16
17
DialogChooseExcelSheets::~DialogChooseExcelSheets
()
18
{
19
delete
ui
;
20
}
21
22
void
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
30
void
DialogChooseExcelSheets::reject
()
31
{
32
QDialog::reject();
33
}
34
void
DialogChooseExcelSheets::accept
()
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
}
DialogChooseExcelSheets::AddItem
void AddItem(const QString &item)
Definition
dialogchooseexcelsheets.cpp:22
DialogChooseExcelSheets::ui
Ui::DialogChooseExcelSheets * ui
Definition
dialogchooseexcelsheets.h:23
DialogChooseExcelSheets::items
QStringList * items
Definition
dialogchooseexcelsheets.h:24
DialogChooseExcelSheets::reject
void reject()
Definition
dialogchooseexcelsheets.cpp:30
DialogChooseExcelSheets::accept
void accept()
Definition
dialogchooseexcelsheets.cpp:34
DialogChooseExcelSheets::DialogChooseExcelSheets
DialogChooseExcelSheets(QWidget *parent, QStringList **_items)
Definition
dialogchooseexcelsheets.cpp:8
DialogChooseExcelSheets::~DialogChooseExcelSheets
~DialogChooseExcelSheets()
Definition
dialogchooseexcelsheets.cpp:17
dialogchooseexcelsheets.h
Ui
Definition
dialogchooseexcelsheets.h:9
dialogchooseexcelsheets.cpp
Generated by
1.15.0