-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearchHistory.h
More file actions
76 lines (61 loc) · 1.8 KB
/
SearchHistory.h
File metadata and controls
76 lines (61 loc) · 1.8 KB
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
67
68
69
70
71
72
73
74
75
76
/*
* header file for SearchHistory class
* Original by: christian moellinger <ch.moellinger@gmail.com>
* Modified by: Chung-Yeon Lee <cylee@bi.snu.ac.kr> and Beom-Jin Lee <bjlee@bi.snu.ac.kr>
* 03/2011 - 06/2011 Project "InfoVis: Word Tree"
* 11/2013 - 12/2013 Project "InfoVis: Word Tree ++"
*/
#ifndef SEARCHHISTORY_H
#define SEARCHHISTORY_H
#include <QDialog>
#include <map>
class WTVisualizedTree;
class QListWidgetItem;
namespace Ui {
class SearchHistory;
}
class SearchHistory : public QDialog
{
Q_OBJECT
public:
/*! \name Construction / Destruction */
//@{
/// Constructor
explicit SearchHistory(QWidget *parent = 0);
/// Destructor
~SearchHistory();
//@}
/*! \name Methods */
//@{
/// adds a new search to the list and stores the result tree
void AddNewSearch(QString sSearchTerm, QSharedPointer<WTVisualizedTree> spVisualizedTree);
//@}
/*! \name Methods */
//@{
/// returns the last search to the reference parameters and true as retun value if successfull, else false
bool GetLastSearch(std::string &rsSearchPhrase, QSharedPointer<WTVisualizedTree> &rspVisualizedTree);
//@}
signals:
/*! \name Signals */
//@{
/// emitted when a new search is requested (e.g. by clicking on a entry in the search window)
void EmitSearch(QString sSearchTerm);
//@}
private slots:
/*! \name Private slots */
//@{
/// handles the click on an item of the list
void HandleItemClicked(QListWidgetItem * pClickedItem);
/// clears the history
void ClearHistory();
//@}
private:
/*! \name Private members */
//@{
Ui::SearchHistory *ui;
std::string m_sLastSearchPhrase;
QSharedPointer<WTVisualizedTree> m_spLastAddedTree;
std::map<QString, QSharedPointer<WTVisualizedTree> > m_mAlreadyVisualizedTrees;
//@}
};
#endif // SEARCHHISTORY_H