-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathPythonCompleter.h
40 lines (30 loc) · 1.14 KB
/
PythonCompleter.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
/*! \file PythonCompleter.h
* \brief defined PythonCompleter
* \author "Melven Zoellner" <[email protected]>
*
*/
// include
#ifndef PYTHONCOMPLETER_H
#define PYTHONCOMPLETER_H
// PythonQt-includes
#include <PythonQt.h>
// Qt-includes
#include <QCompleter>
// forward declarations
class SimpleConsole;
//! a completer for python, using pygments in the background
class PythonCompleter : public QCompleter
{
Q_OBJECT
public:
explicit PythonCompleter(SimpleConsole *parent,
PythonQtObjectPtr context);
protected slots:
void updateCompletions(); //!< dynamically updates possible completion strings
void popupAboutToShow(); //!< sets up dynamic updates of possible completions
void popupAboutToHide(); //!< stops dynamic updates of possible completions
protected:
PythonQtObjectPtr _context; //!< python context to run the completer
PythonQtObjectPtr _parentContext; //!< python context to complete
};
#endif /* PYTHONCOMPLETER_H */