147 #ifndef QT_NO_COMPLETER 149 #include "QtGui/qscrollbar.h" 150 #include "QtGui/qstringlistmodel.h" 151 #include "QtGui/qdirmodel.h" 152 #include "QtGui/qfilesystemmodel.h" 153 #include "QtGui/qheaderview.h" 154 #include "QtGui/qlistview.h" 155 #include "QtGui/qapplication.h" 156 #include "QtGui/qevent.h" 157 #include "QtGui/qheaderview.h" 158 #include "QtGui/qdesktopwidget.h" 159 #include "QtGui/qlineedit.h" 173 return d->model->columnCount();
202 bool sortedEngine =
false;
205 sortedEngine =
false;
234 if (index.
row() < rootIndices.count()) {
235 row = rootIndices[index.
row()];
286 if (row < 0 || !engine->matchCount())
431 for (
int i = 0; i < piList.
size(); i++)
442 if (curParts.isEmpty())
448 historyMatch = filterHistory();
454 for (
int i = 0; i < curParts.count() - 1; i++) {
456 int emi =
filter(part, parent, -1).exactMatchIndex;
465 if (curParts.last().isEmpty())
468 curMatch =
filter(curParts.last(), curParent, 1);
469 curRow = curMatch.isValid() ? 0 : -1;
477 bool isDirModel =
false;
478 bool isFsModel =
false;
481 #ifndef QT_NO_DIRMODEL 484 #ifndef QT_NO_FILESYSTEMMODEL 491 for (
int i = 0; i < source->
rowCount(); i++) {
494 #if (!defined(Q_OS_WIN) || defined(Q_OS_WINCE)) && !defined(Q_OS_SYMBIAN) 539 if (cost *
sizeof(
int) > 1024 * 1024) {
541 while (it1 != cache.
end()) {
543 int sz = ci.
count()/2;
546 while (it2 != ci.
end() && i < sz) {
547 cost -= it2.
value().indices.cost();
551 if (ci.
count() == 0) {
552 it1 = cache.
erase(it1);
575 int to = model->
rowCount(parent) - 1;
595 if (value.
isValid() && !it2.key().startsWith(part)) {
625 if (lookupCache(part, parent, &hint))
631 if (matchHint(part, parent, &hint)) {
636 indices = indexHint(part, parent, order);
640 int high = indices.
to() + 1;
641 int low = indices.
from() - 1;
646 while (high - low > 1)
648 probe = (high + low) / 2;
680 high = indices.
to() + 1;
684 low = indices.
from() - 1;
688 while (high - low > 1)
690 probe = (high + low) / 2;
703 saveInCache(part, parent, m);
716 for (i = 0; i < indices.
count() && count != n; ++i) {
735 if (!curMatch.partial)
739 int lastRow = model->
rowCount(curParent) - 1;
741 int lastIndex = buildIndices(curParts.last(), curParent, n, im, &curMatch);
742 curMatch.partial = (lastRow != lastIndex);
743 saveInCache(curParts.last(), curParent, curMatch);
755 bool foundInCache = lookupCache(part, parent, &m);
758 if (matchHint(part, parent, &hint) && !hint.
isValid())
762 if (!foundInCache && !hint.
isValid()) {
763 const int lastRow = model->
rowCount(parent) - 1;
765 int lastIndex = buildIndices(part, parent, n, all, &m);
766 m.
partial = (lastIndex != lastRow);
774 const int lastRow = model->
rowCount(parent) - 1;
777 int lastIndex = buildIndices(part, parent, want, rest, &m);
778 m.
partial = (lastRow != lastIndex);
782 saveInCache(part, parent, m);
789 maxVisibleItems(7), sorting(
QCompleter::UnsortedModel), wrap(true), eatFocusOut(true),
790 hiddenBecauseNoMatch(false)
800 #ifdef QT_NO_LISTVIEW 804 #endif // QT_NO_LISTVIEW 849 completion = q->pathFromIndex(si);
850 #ifndef QT_NO_DIRMODEL 857 #ifndef QT_NO_FILESYSTEMMODEL 867 emit q->highlighted(index);
868 emit q->highlighted(completion);
870 emit q->activated(index);
871 emit q->activated(completion);
903 if (w > screen.
width())
905 if ((pos.
x() + w) > (screen.
x() + screen.
width()))
907 if (pos.
x() < screen.
x())
908 pos.
setX(screen.
x());
910 int top = pos.
y() - rh - screen.
top() + 2;
911 int bottom = screen.
bottom() - pos.
y();
917 pos.
setY(pos.
y() - h - rh + 2);
960 #ifndef QT_NO_STRINGLISTMODEL 971 #endif // QT_NO_STRINGLISTMODEL 993 d->widget->removeEventFilter(
this);
996 d->widget->installEventFilter(
this);
999 d->popup->setFocusProxy(
d->widget);
1029 d->proxy->setSourceModel(model);
1032 if (oldModel && oldModel->QObject::parent() ==
this)
1034 #ifndef QT_NO_DIRMODEL 1035 if (qobject_cast<QDirModel *>(model)) {
1036 #if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) 1042 #endif // QT_NO_DIRMODEL 1043 #ifndef QT_NO_FILESYSTEMMODEL 1046 #if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) 1054 #endif // QT_NO_FILESYSTEMMODEL 1065 return d->proxy->sourceModel();
1100 d->widget->removeEventFilter(
this);
1102 d->popup->deleteLater();
1107 d->widget->installEventFilter(
this);
1140 if (
d->popup != popup)
1142 if (popup->
model() !=
d->proxy)
1144 #if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA) 1152 origPolicy =
d->widget->focusPolicy();
1156 d->widget->setFocusPolicy(origPolicy);
1161 #ifndef QT_NO_LISTVIEW 1162 if (
QListView *listView = qobject_cast<QListView *>(popup)) {
1163 listView->setModelColumn(
d->column);
1170 popup,
SLOT(hide()));
1185 #ifndef QT_NO_LISTVIEW 1196 #endif // QT_NO_LISTVIEW 1216 d->hiddenBecauseNoMatch =
false;
1217 if (
d->popup &&
d->popup->isVisible())
1224 switch (e->
type()) {
1231 const int key = ke->
key();
1235 d->setCurrentIndex(curIndex);
1250 int rowCount =
d->proxy->rowCount();
1251 QModelIndex lastIndex =
d->proxy->index(rowCount - 1,
d->column);
1252 d->setCurrentIndex(lastIndex);
1254 }
else if (curIndex.
row() == 0) {
1264 d->setCurrentIndex(firstIndex);
1266 }
else if (curIndex.
row() ==
d->proxy->rowCount() - 1) {
1280 d->eatFocusOut =
false;
1281 (
static_cast<QObject *
>(
d->widget))->event(ke);
1282 d->eatFocusOut =
true;
1283 if (!
d->widget || e->
isAccepted() || !
d->popup->isVisible()) {
1285 if (
d->widget && (!
d->widget->hasFocus()
1286 #ifdef QT_KEYPAD_NAVIGATION 1287 || (QApplication::keypadNavigationEnabled() && !
d->widget->hasEditFocus())
1297 #ifdef QT_KEYPAD_NAVIGATION 1299 if (!QApplication::keypadNavigationEnabled())
1307 d->_q_complete(curIndex);
1327 #ifdef QT_KEYPAD_NAVIGATION 1330 if (QApplication::keypadNavigationEnabled() && ke->
key() ==
Qt::Key_Back) {
1337 d->eatFocusOut =
false;
1339 d->eatFocusOut =
true;
1346 #ifdef QT_KEYPAD_NAVIGATION 1347 if (QApplication::keypadNavigationEnabled()) {
1353 if (target && (
d->widget->isAncestorOf(target) ||
1354 target ==
d->widget)) {
1355 d->eatFocusOut =
false;
1357 d->eatFocusOut =
true;
1363 if (!
d->popup->underMouse()) {
1395 d->hiddenBecauseNoMatch =
false;
1398 d->_q_complete(idx,
true);
1407 d->hiddenBecauseNoMatch =
true;
1413 d->setCurrentIndex(idx,
false);
1416 d->popupRect = rect;
1431 return d->proxy->setCurrentRow(row);
1442 return d->proxy->currentRow();
1453 return d->proxy->completionCount();
1499 if (
d->sorting == sorting)
1501 d->sorting = sorting;
1502 d->proxy->createEngine();
1503 d->proxy->invalidate();
1529 if (
d->column == column)
1531 #ifndef QT_NO_LISTVIEW 1532 if (
QListView *listView = qobject_cast<QListView *>(
d->popup))
1533 listView->setModelColumn(column);
1536 d->proxy->invalidate();
1559 if (
d->role == role)
1562 d->proxy->invalidate();
1584 if (
d->wrap == wrap)
1608 return d->maxVisibleItems;
1615 qWarning(
"QCompleter::setMaxVisibleItems: " 1616 "Invalid max visible items (%d) must be >= 0", maxItems);
1619 d->maxVisibleItems = maxItems;
1639 d->proxy->createEngine();
1640 d->proxy->invalidate();
1680 return d->proxy->currentIndex(
false);
1733 bool isDirModel =
false;
1734 bool isFsModel =
false;
1735 #ifndef QT_NO_DIRMODEL 1738 #ifndef QT_NO_FILESYSTEMMODEL 1741 if (!isDirModel && !isFsModel)
1750 #ifndef QT_NO_FILESYSTEMMODEL 1759 #if (!defined(Q_OS_WIN) || defined(Q_OS_WINCE)) && !defined(Q_OS_SYMBIAN) 1760 if (list.
count() == 1)
1782 bool isDirModel =
false;
1783 bool isFsModel =
false;
1784 #ifndef QT_NO_DIRMODEL 1788 #ifndef QT_NO_FILESYSTEMMODEL 1789 #ifdef QT_NO_DIRMODEL 1795 if ((!isDirModel && !isFsModel) || path.
isEmpty())
1800 #if defined(Q_OS_SYMBIAN) 1803 #elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) 1808 pathCopy = pathCopy.
mid(2);
1810 doubleSlash.
clear();
1816 #if defined(Q_OS_SYMBIAN) 1818 #elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) 1820 parts[0].prepend(doubleSlash);
1822 if (pathCopy[0] == sep[0])
1877 #include "moc_qcompleter.cpp" 1879 #endif // QT_NO_COMPLETER The QVariant class acts like a union for the most common Qt data types.
ModelSorting modelSorting() const
CompletionMode
This enum specifies how completions are provided to the user.
void setSelectionMode(QAbstractItemView::SelectionMode mode)
The QKeyEvent class describes a key event.
The QFileSystemModel class provides a data model for the local filesystem.
virtual void clear()
Clears the selection model.
QModelIndexList persistentIndexList() const
Returns the list of indexes stored as persistent indexes in the model.
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
void setMaxVisibleItems(int maxItems)
void setPopup(QAbstractItemView *popup)
Sets the popup used to display completions to popup.
QPointer< QWidget > widget
void setCompletionColumn(int column)
void setSourceModel(QAbstractItemModel *sourceModel)
Sets the given sourceModel to be processed by the proxy model.
The QRegExp class provides pattern matching using regular expressions.
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index.
~QCompleter()
Destroys the completer object.
QModelIndex sibling(int row, int column) const
Returns the sibling at row and column.
QAbstractItemModel * completionModel() const
Returns the completion model.
void setCurrentIndex(QModelIndex, bool=true)
#define it(className, varName)
QString currentCompletion() const
Returns the current completion string.
Qt::CaseSensitivity caseSensitivity() const
QString completionPrefix() const
QCompleter::CompletionMode mode
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
void chop(int n)
Removes n characters from the end of the string.
QPointer< QWidget > widget
virtual void setSourceModel(QAbstractItemModel *sourceModel)
Sets the given sourceModel to be processed by the proxy model.
void setEditTriggers(EditTriggers triggers)
int count(const Key &key) const
Returns the number of items associated with key key.
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
void columnsInserted(const QModelIndex &parent, int first, int last)
This signal is emitted after columns have been inserted into the model.
QModelIndex createIndex(int row, int column, void *data=0) const
Creates a model index for the given row and column with the internal pointer ptr. ...
int width() const
Returns the width of the rectangle.
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
The QCompleter class provides completions based on an item model.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int count(const T &t) const
Returns the number of occurrences of value in the list.
int height() const
Returns the height of the rectangle.
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
The QString class provides a Unicode character string.
T * qobject_cast(QObject *object)
The QStringListModel class provides a model that supplies strings to views.
The QObject class is the base class of all Qt objects.
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
QMatchData filterHistory()
void filter(const QStringList &parts)
static QChar separator()
Returns the native directory separator: "/" under Unix (including Mac OS X) and "\\" under Windows...
bool matchHint(QString, const QModelIndex &, QMatchData *)
void _q_fileSystemModelDirectoryLoaded(const QString &path)
QModelIndex parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
virtual QString pathFromIndex(const QModelIndex &index) const
Returns the path for the given index.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
QModelIndex mapToSource(const QModelIndex &proxyIndex) const
Reimplement this function to return the model index in the source model that corresponds to the proxy...
int maxVisibleItems() const
void changePersistentIndexList(const QModelIndexList &from, const QModelIndexList &to)
Changes the QPersistentModelIndexes that is equal to the indexes in the given from model index list t...
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
QIndexMapper indexHint(QString, const QModelIndex &, Qt::SortOrder)
bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
T & value() const
Returns a modifiable reference to the current item's value.
void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
Sets the model item index to be the current item, and emits currentChanged().
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Returns the item flags for the given index.
virtual void setModel(QAbstractItemModel *model)
Sets the model for the view to present.
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
Returns the index of the item in the model specified by the given row, column and parent index...
static QWidget * widgetAt(const QPoint &p)
Returns the widget at global screen position point, or 0 if there is no Qt widget there...
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately after the event occurred.
ModelSorting
This enum specifies how the items in the model are sorted.
int key() const
Returns the code of the key that was pressed or released.
static QString toString(Register *reg, int type, bool *ok=0)
void append(const T &t)
Inserts value at the end of the list.
bool setCurrentRow(int row)
Sets the current row to the row specified.
#define QT_BEGIN_NAMESPACE
This macro expands to.
int columnCount(const QModelIndex &index=QModelIndex()) const
Returns the number of columns for the children of the given parent.
QModelIndex index(int row, int column, const QModelIndex &=QModelIndex()) const
Returns the index of the item in the model specified by the given row, column and parent index...
void destroyed(QObject *=0)
This signal is emitted immediately before the object obj is destroyed, and can not be blocked...
QPoint bottomRight() const
Returns the position of the rectangle's bottom-right corner.
bool isDir() const
Returns true if this object points to a directory or to a symbolic link to a directory; otherwise ret...
virtual QStringList splitPath(const QString &path) const
Splits the given path into strings that are used to match at each level in the model().
int completionColumn() const
void layoutAboutToBeChanged()
This signal is emitted just before the layout of a model is changed.
QAbstractItemModel * sourceModel() const
Returns the model that contains the data that is available through the proxy model.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
virtual void filterOnDemand(int)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QItemSelectionModel * selectionModel() const
Returns the current selection model.
virtual void scrollTo(const QModelIndex &index, ScrollHint hint=EnsureVisible)=0
Scrolls the view if necessary to ensure that the item at index is visible.
int row() const
Returns the row this model index refers to.
const T value(const Key &key) const
Returns the value associated with the key key.
void prepend(const T &t)
Inserts value at the beginning of the list.
void _q_complete(QModelIndex, bool=false)
The QStringList class provides a list of strings.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Reimplemented Function
QAbstractItemModel * model() const
Returns the model that provides completion strings.
Q_CORE_EXPORT void qWarning(const char *,...)
void setCompletionPrefix(const QString &prefix)
int currentRow() const
Returns the current row.
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
void init(QAbstractItemModel *model=0)
QAbstractItemView * popup
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const =0
Returns the data stored under the given role for the item referred to by the index.
void setModelSorting(ModelSorting sorting)
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const
Reimplement this function to return the model index in the proxy model that corresponds to the source...
void clear()
Removes all items from the list.
void layoutChanged()
This signal is emitted whenever the layout of items exposed by the model has changed; for example...
QModelIndex currentIndex() const
Returns the model item index for the current item, or an invalid index if there is no current item...
static int cmp(const ushort *s1, const ushort *s2, size_t len)
void setCompletionMode(CompletionMode mode)
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the map.
void setModelColumn(int column)
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
QModelIndex currentIndex(bool) const
void reset(T *other=0)
Deletes the existing object it is pointing to if any, and sets its pointer to other.
void scrollToTop()
Scrolls the view to the top.
virtual bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
The QAbstractItemModel class provides the abstract interface for item model classes.
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting...
Qt::ItemFlags flags() const
Returns the flags for the item referred to by the index.
QCompletionModel(QCompleterPrivate *c, QObject *parent)
iterator begin()
Returns an STL-style iterator pointing to the first item in the map.
static QDesktopWidget * desktop()
Returns the desktop widget (also called the root window).
CompletionMode completionMode() const
T & first()
Returns a reference to the first item in the list.
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
QString join(const QString &sep) const
Joins all the string list's strings into a single string with each element separated by the given sep...
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
The QAbstractItemView class provides the basic functionality for item view classes.
The QMap::const_iterator class provides an STL-style const iterator for QMap and QMultiMap.
void saveInCache(QString, const QModelIndex &, const QMatchData &)
void setY(int y)
Sets the y coordinate of this point to the given y coordinate.
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the map...
int top() const
Returns the y-coordinate of the rectangle's top edge.
The QItemSelection class manages information about selected items in a model.
bool eventFilter(QObject *o, QEvent *e)
Reimplemented Function
The QListView class provides a list or icon view onto a model.
int compare(const QString &s) const
QPoint bottomLeft() const
Returns the position of the rectangle's bottom-left corner.
The QMap::iterator class provides an STL-style non-const iterator for QMap and QMultiMap.
void clear()
Clears the contents of the string and makes it empty.
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the map...
void activated(const QString &text)
This signal is sent when an item in the popup() is activated by the user (by clicking or pressing ret...
void setWidget(QWidget *widget)
Sets the widget for which completion are provided for to widget.
int x() const
Returns the x-coordinate of the rectangle's left edge.
QObject * parent() const
Returns a pointer to the parent object.
The QPoint class defines a point in the plane using integer precision.
QString toLower() const Q_REQUIRED_RESULT
Returns a lowercase copy of the string.
void installEventFilter(QObject *)
Installs an event filter filterObj on this object.
void complete(const QRect &rect=QRect())
For QCompleter::PopupCompletion and QCompletion::UnfilteredPopupCompletion modes, calling this functi...
The QModelIndex class is used to locate data in a data model.
int size() const
Returns the number of items in the list.
void showPopup(const QRect &)
void modelReset()
This signal is emitted when reset() is called, after the model's internal state (e.
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
This signal is emitted whenever the data in an existing item changes.
int height() const
Returns the height.
if(void) toggleToolbarShown
The QRect class defines a rectangle in the plane using integer precision.
bool contains(const Key &key) const
Returns true if the map contains an item with key key; otherwise returns false.
int completionCount() const
Returns the number of completions for the current prefix.
bool event(QEvent *)
Reimplemented Function
void setModel(QAbstractItemModel *c)
Sets the model which provides completions to model.
int y() const
Returns the y coordinate of this point.
QMatchData filter(const QString &, const QModelIndex &, int)
iterator erase(iterator it)
Removes the (key, value) pair pointed to by the iterator pos from the map, and returns an iterator to...
void filter(const QStringList &parts)
int buildIndices(const QString &str, const QModelIndex &parent, int n, const QIndexMapper &iv, QMatchData *m)
Qt::SortOrder sortOrder(const QModelIndex &) const
void _q_autoResizePopup()
QCompleter(QObject *parent=0)
Constructs a completer object with the given parent.
QFuture< T > filtered(const Sequence &sequence, FilterFunction filterFunction)
int rowCount(const QModelIndex &index=QModelIndex()) const
Returns the number of rows under the given parent.
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
void setItemDelegate(QAbstractItemDelegate *delegate)
Sets the item delegate for this view and its model to delegate.
QScopedPointer< QCompletionEngine > engine
void setCompletionRole(int role)
iterator lowerBound(const Key &key)
Returns an iterator pointing to the first item with key key in the map.
int x() const
Returns the x coordinate of this point.
int completionCount() const
static QString fromNativeSeparators(const QString &pathName)
Returns pathName using '/' as file separator.
QModelIndexList indexes() const
Returns a list of model indexes that correspond to the selected items.
void setWrapAround(bool wrap)
void _q_completionSelected(const QItemSelection &)
QCompleter::ModelSorting sorting
bool setCurrentRow(int row)
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
The QFileInfo class provides system-independent file information.
int completionRole() const
QAbstractItemModel * model() const
Returns the model that this view is presenting.
void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity)
static QString toNativeSeparators(const QString &pathName)
Returns pathName with the '/' separators converted to separators that are appropriate for the underly...
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
void setX(int x)
Sets the x coordinate of this point to the given x coordinate.
bool hiddenBecauseNoMatch
void rowsRemoved(const QModelIndex &parent, int first, int last)
This signal is emitted after rows have been removed from the model.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
The QDirModel class provides a data model for the local filesystem.
void columnsRemoved(const QModelIndex &parent, int first, int last)
This signal is emitted after columns have been removed from the model.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
QWidget * widget() const
Returns the widget for which the completer object is providing completions.
virtual int sizeHintForRow(int row) const
Returns the height size hint for the specified row or -1 if there is no model.
void clear()
Removes all items from the map.
QAbstractItemView * popup() const
Returns the popup used to display completions.
QModelIndex currentIndex() const
Returns the model index of the current completion in the completionModel().
The QMap class is a template class that provides a skip-list-based dictionary.
void reset()
Resets the model to its original state in any attached views.
int column() const
Returns the column this model index refers to.
static QString escape(const QString &str)
Returns the string str with every regexp special character escaped with a backslash.
QMatchData filter(const QString &, const QModelIndex &, int)
bool lookupCache(QString part, const QModelIndex &parent, QMatchData *m)