-
Notifications
You must be signed in to change notification settings - Fork 0
/
BrowseSimulations.h
66 lines (56 loc) · 1.83 KB
/
BrowseSimulations.h
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
56
57
58
59
60
61
62
63
64
65
66
/**
* @file BrowseSimulations.h
* @author Dan R. Lipsa
* @date 18 August 2011
* @brief Dialog used for choosing simulations to analyse or compare.
* @ingroup ui
*
* @defgroup ui UI
* User interface and interaction
*/
#ifndef __BROWSE_SIMULATION_H__
#define __BROWSE_SIMULATION_H__
#include "ui_BrowseSimulations.h"
#include "Labels.h"
/**
* @brief Dialog used for choosing simulations to analyse or compare.
*/
class BrowseSimulations :
public QDialog, private Ui::BrowseSimulations
{
public:
BrowseSimulations (
const char* imageFolder,
const vector<string>& names, const vector<size_t>& questionMarkCount,
const vector<Labels>& labels, QWidget* parent = 0);
vector<size_t> GetSelectedIndexes () const;
vector<string> GetFilter () const;
vector<size_t> GetQuestionMarkCount ();
public Q_SLOTS:
void CurrentChangedSimulation (int current, int previous);
void SelectionChangedSimulation (const QItemSelection & selected,
const QItemSelection & deselected);
void CurrentIndexChangedLabel(QString);
void TextChangedLineEdit (QString);
private:
size_t globalIndex (size_t localIndex) const;
string getInitialFilter (const vector<size_t>& count);
vector<size_t> getQuestionMarkCount (const vector<size_t>& indexesSelected);
vector<size_t> indexesSelected (const QModelIndexList& mil);
void setLineEditFilter (const vector<size_t>& questionMarkCount);
private:
static const char* LABEL_ALL;
private:
Q_OBJECT
QStringListModel m_model;
QStringList m_selectedNames;
vector<size_t> m_selectedQuestionMarkCount;
string m_imageFolder;
const vector<string>& m_names;
const vector<size_t>& m_questionMarkCount;
const vector<Labels>& m_labels;
};
#endif //__BROWSE_SIMULATION_H__
// Local Variables:
// mode: c++
// End: