-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathlistwidgetcomplete.h
More file actions
56 lines (40 loc) · 1.21 KB
/
listwidgetcomplete.h
File metadata and controls
56 lines (40 loc) · 1.21 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
/*
Jentos IDE.
Copyright 2014, Evgeniy Goroshkin.
See LICENSE.TXT for licensing terms.
*/
#ifndef LISTWIDGETCOMPLETE_H
#define LISTWIDGETCOMPLETE_H
#include "std.h"
class CodeItem;
class ListWidgetComplete : public QListWidget {
Q_OBJECT
public:
ListWidgetComplete(QWidget *parent = 0);
void selectNear(int dir);
void setIsForInheritance(bool value) { _isForInheritance = value; }
bool isForInheritance() { return _isForInheritance; }
//void addItem(const QString &label);
void addWidgetForItem(QListWidgetItem *item);
signals:
void activated(CodeItem *item);
void focusOut();
protected:
void keyPressEvent(QKeyEvent *event);
void focusOutEvent(QFocusEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
void show();
private:
bool _isForInheritance;
void updateItem(QListWidgetItem *item);
};
class ListWidgetCompleteItem : public QListWidgetItem {
//Q_OBJECT
public:
ListWidgetCompleteItem(const QIcon &icon, const QString &text, CodeItem *code, QListWidget *parent = 0);
CodeItem* codeItem(){ return _codeItem; }
void setCodeItem(CodeItem *code){ _codeItem = code; }
private:
CodeItem *_codeItem;
};
#endif // LISTWIDGETCOMPLETE_H