PythonQtWrapper_QCompleter.h
90 lines
| 4.4 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QCOMPLETER_H | ||
#define PYTHONQTWRAPPER_QCOMPLETER_H | ||||
#include <qcompleter.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #include <QVariant> | ||
#include <qabstractitemmodel.h> | ||||
#include <qabstractitemview.h> | ||||
#include <qbytearray.h> | ||||
#include <qcompleter.h> | ||||
#include <qcoreevent.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
#include <qrect.h> | ||||
#include <qstringlist.h> | ||||
#include <qwidget.h> | ||||
florianlink
|
r24 | class PythonQtShell_QCompleter : public QCompleter | ||
{ | ||||
public: | ||||
PythonQtShell_QCompleter(QAbstractItemModel* model, QObject* parent = 0):QCompleter(model, parent),_wrapper(NULL) {}; | ||||
PythonQtShell_QCompleter(QObject* parent = 0):QCompleter(parent),_wrapper(NULL) {}; | ||||
PythonQtShell_QCompleter(const QStringList& completions, QObject* parent = 0):QCompleter(completions, parent),_wrapper(NULL) {}; | ||||
virtual void childEvent(QChildEvent* arg__1); | ||||
virtual void customEvent(QEvent* arg__1); | ||||
virtual bool event(QEvent* arg__1); | ||||
virtual bool eventFilter(QObject* o, QEvent* e); | ||||
virtual QString pathFromIndex(const QModelIndex& index) const; | ||||
virtual QStringList splitPath(const QString& path) const; | ||||
virtual void timerEvent(QTimerEvent* arg__1); | ||||
PythonQtInstanceWrapper* _wrapper; | ||||
}; | ||||
class PythonQtPublicPromoter_QCompleter : public QCompleter | ||||
{ public: | ||||
florianlink
|
r28 | inline QStringList promoted_splitPath(const QString& path) const { return QCompleter::splitPath(path); } | ||
inline bool promoted_event(QEvent* arg__1) { return QCompleter::event(arg__1); } | ||||
inline QString promoted_pathFromIndex(const QModelIndex& index) const { return QCompleter::pathFromIndex(index); } | ||||
inline bool promoted_eventFilter(QObject* o, QEvent* e) { return QCompleter::eventFilter(o, e); } | ||||
florianlink
|
r24 | }; | ||
florianlink
|
r13 | class PythonQtWrapper_QCompleter : public QObject | ||
{ Q_OBJECT | ||||
public: | ||||
Q_ENUMS(ModelSorting CompletionMode ) | ||||
enum ModelSorting{ | ||||
UnsortedModel = QCompleter::UnsortedModel, CaseSensitivelySortedModel = QCompleter::CaseSensitivelySortedModel, CaseInsensitivelySortedModel = QCompleter::CaseInsensitivelySortedModel}; | ||||
enum CompletionMode{ | ||||
PopupCompletion = QCompleter::PopupCompletion, UnfilteredPopupCompletion = QCompleter::UnfilteredPopupCompletion, InlineCompletion = QCompleter::InlineCompletion}; | ||||
public slots: | ||||
QCompleter* new_QCompleter(QAbstractItemModel* model, QObject* parent = 0); | ||||
QCompleter* new_QCompleter(QObject* parent = 0); | ||||
QCompleter* new_QCompleter(const QStringList& completions, QObject* parent = 0); | ||||
void delete_QCompleter(QCompleter* obj) { delete obj; } | ||||
florianlink
|
r28 | QAbstractItemView* popup(QCompleter* theWrappedObject) const; | ||
florianlink
|
r24 | QStringList splitPath(QCompleter* theWrappedObject, const QString& path) const; | ||
florianlink
|
r28 | Qt::CaseSensitivity caseSensitivity(QCompleter* theWrappedObject) const; | ||
void setModelSorting(QCompleter* theWrappedObject, QCompleter::ModelSorting sorting); | ||||
int completionColumn(QCompleter* theWrappedObject) const; | ||||
void setWidget(QCompleter* theWrappedObject, QWidget* widget); | ||||
QString completionPrefix(QCompleter* theWrappedObject) const; | ||||
int currentRow(QCompleter* theWrappedObject) const; | ||||
int completionRole(QCompleter* theWrappedObject) const; | ||||
bool setCurrentRow(QCompleter* theWrappedObject, int row); | ||||
void setPopup(QCompleter* theWrappedObject, QAbstractItemView* popup); | ||||
bool wrapAround(QCompleter* theWrappedObject) const; | ||||
QAbstractItemModel* model(QCompleter* theWrappedObject) const; | ||||
QWidget* widget(QCompleter* theWrappedObject) const; | ||||
florianlink
|
r24 | bool event(QCompleter* theWrappedObject, QEvent* arg__1); | ||
QCompleter::CompletionMode completionMode(QCompleter* theWrappedObject) const; | ||||
QModelIndex currentIndex(QCompleter* theWrappedObject) const; | ||||
florianlink
|
r13 | void setCompletionRole(QCompleter* theWrappedObject, int role); | ||
florianlink
|
r28 | QString currentCompletion(QCompleter* theWrappedObject) const; | ||
florianlink
|
r24 | void setCaseSensitivity(QCompleter* theWrappedObject, Qt::CaseSensitivity caseSensitivity); | ||
QString pathFromIndex(QCompleter* theWrappedObject, const QModelIndex& index) const; | ||||
florianlink
|
r28 | void setCompletionMode(QCompleter* theWrappedObject, QCompleter::CompletionMode mode); | ||
florianlink
|
r13 | void setModel(QCompleter* theWrappedObject, QAbstractItemModel* c); | ||
florianlink
|
r24 | void setCompletionColumn(QCompleter* theWrappedObject, int column); | ||
florianlink
|
r28 | int completionCount(QCompleter* theWrappedObject) const; | ||
florianlink
|
r24 | QAbstractItemModel* completionModel(QCompleter* theWrappedObject) const; | ||
bool eventFilter(QCompleter* theWrappedObject, QObject* o, QEvent* e); | ||||
QCompleter::ModelSorting modelSorting(QCompleter* theWrappedObject) const; | ||||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QCOMPLETER_H | ||||