LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
tagscompleter.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <QCompleter>
12#include "tagsconfig.h"
13
14namespace LC
15{
16 class TagsManager;
17}
18
19namespace LC::Util
20{
21 class TagsLineEdit;
22
38 class TagsCompleter : public QCompleter
39 {
41
42 UTIL_TAGS_API static QAbstractItemModel *CompletionModel_;
43 friend class LC::TagsManager;
44
45 TagsLineEdit *Edit_;
46 public:
55
65 UTIL_TAGS_API void OverrideModel (QAbstractItemModel *model);
66
75 UTIL_TAGS_API QStringList splitPath (const QString& path) const override;
76 protected:
77 static void SetModel (QAbstractItemModel *model)
78 {
79 CompletionModel_ = model;
80 }
81 };
82}
Completer suitable for tag completion.
UTIL_TAGS_API TagsCompleter(TagsLineEdit *line)
Constructs the completer.
UTIL_TAGS_API QStringList splitPath(const QString &path) const override
Path splitter override.
UTIL_TAGS_API void OverrideModel(QAbstractItemModel *model)
Replaces the model this completer works with.
static void SetModel(QAbstractItemModel *model)
friend class LC::TagsManager
A line edit class suitable for use with TagsCompleter.
Container< T > Filter(const Container< T > &c, F f)
Definition prelude.h:118
Definition constants.h:15
#define UTIL_TAGS_API
Definition tagsconfig.h:16