SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
targetsheet.cpp File Reference
#include "targetsheet.h"
Include dependency graph for targetsheet.cpp:

Go to the source code of this file.

Functions

int GuessTargetSheet (const QStringList &sheets)
 Index of the sheet whose name says it holds the target samples.

Function Documentation

◆ GuessTargetSheet()

int GuessTargetSheet ( const QStringList & sheets)

Index of the sheet whose name says it holds the target samples.

Used to preselect a row in the import dialog. A workbook's sheet order says nothing about which sheet is the target, so the sheet is looked for by name instead: "target", "sink" or "mixture", matched as a substring, ignoring case and surrounding spaces.

Returns -1 unless exactly one sheet matches, so an ambiguous workbook (say, "Target" and "Target old") preselects nothing and the choice stays with the user: no guess is better than a wrong one.

Parameters
sheetsSheet names, in the order they are shown
Returns
Index into sheets, or -1 if no single sheet matches

Definition at line 6 of file targetsheet.cpp.

References name.

Referenced by IndicateSheetsDialog::Populate_Table().