forked from SmartisanTech/Wrench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dialoggetentry.h
50 lines (39 loc) · 1.25 KB
/
dialoggetentry.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
#ifndef DIALOGGETENTRY_H
#define DIALOGGETENTRY_H
#include <QDialog>
#include "filteringmodel.h"
namespace Ui {
class DialogGetEntry;
}
class DialogGetEntry : public QDialog
{
Q_OBJECT
public:
explicit DialogGetEntry(FilteringModel*, const QString&, QWidget *parent = 0, bool allowSelectAll = false);
~DialogGetEntry();
void setHint(const QString& hint);
QString mSelectedEntry;
void setOneShot(bool oneShot = true) {
mIsOneShot = oneShot;
};
private:
bool mIsOneShot;
private slots:
void on_entryFilter_textChanged();
void refreshFilter();
void on_filteringListView_doubleClicked(const QModelIndex &index);
void selectedCurrentEntryNoHistory(const QModelIndex &index);
void on_entrySelected(const QString& entry);
void on_currentTextSelected(const QString& text);
void on_filteringListView_pressed(const QModelIndex &index);
signals:
void entrySelected(const QString&);
void entrySelectedWithDisplayText(const QString&, const QString&);
void entrySelectedWithRawData(const QMap<QString, QString>&);
void selectRawData(const QMap<QString, QString>&);
private:
Ui::DialogGetEntry *ui;
FilteringModel * mEntryModel;
bool updateEntryHistory;
};
#endif // DIALOGGETENTRY_H