// qcompleter.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtGui Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %If (Qt_4_2_0 -) class QCompleter : QObject { %TypeHeaderCode #include %End public: enum CompletionMode { PopupCompletion, UnfilteredPopupCompletion, InlineCompletion, }; enum ModelSorting { UnsortedModel, CaseSensitivelySortedModel, CaseInsensitivelySortedModel, }; QCompleter(QObject *parent /TransferBack/ = 0); QCompleter(QAbstractItemModel *model, QObject *parent /TransferThis/ = 0); QCompleter(const QStringList &completions, QObject *parent /TransferThis/ = 0); virtual ~QCompleter(); void setWidget(QWidget *widget /Transfer/); QWidget *widget() const; void setModel(QAbstractItemModel *c); QAbstractItemModel *model() const; void setCompletionMode(QCompleter::CompletionMode mode); QCompleter::CompletionMode completionMode() const; QAbstractItemView *popup() const; void setPopup(QAbstractItemView *popup /Transfer/); void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity); Qt::CaseSensitivity caseSensitivity() const; void setModelSorting(QCompleter::ModelSorting sorting); QCompleter::ModelSorting modelSorting() const; void setCompletionColumn(int column); int completionColumn() const; void setCompletionRole(int role); int completionRole() const; int completionCount() const; bool setCurrentRow(int row); int currentRow() const; QModelIndex currentIndex() const; QString currentCompletion() const; QAbstractItemModel *completionModel() const; QString completionPrefix() const; virtual QString pathFromIndex(const QModelIndex &index) const; virtual QStringList splitPath(const QString &path) const; %If (Qt_4_3_0 -) bool wrapAround() const; %End public slots: void complete(const QRect &rect = QRect()); void setCompletionPrefix(const QString &prefix); %If (Qt_4_3_0 -) void setWrapAround(bool wrap); %End protected: virtual bool eventFilter(QObject *o, QEvent *e); virtual bool event(QEvent *); signals: void activated(const QString &text); void activated(const QModelIndex &index); void highlighted(const QString &text); void highlighted(const QModelIndex &index); }; %End