diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-05-01 15:54:49 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-05-01 15:54:49 +0200 |
commit | 1ee841364215042f1f284e692ae191ebf7a64156 (patch) | |
tree | 48c1f49e29fe6b13cef68cd73dd2cab039fea822 /lib/addressbar/completer.h | |
parent | Window::session (diff) | |
download | smolbote-1ee841364215042f1f284e692ae191ebf7a64156.tar.xz |
Split off addressbar into lib/
Diffstat (limited to 'lib/addressbar/completer.h')
-rw-r--r-- | lib/addressbar/completer.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/addressbar/completer.h b/lib/addressbar/completer.h new file mode 100644 index 0000000..03ff317 --- /dev/null +++ b/lib/addressbar/completer.h @@ -0,0 +1,32 @@ +/* + * This file is part of smolbote. It's copyrighted by the contributors recorded + * in the version control history of the file, available from its original + * location: https://neueland.iserlohn-fortress.net/smolbote.hg + * + * SPDX-License-Identifier: GPL-3.0 + */ + +#ifndef SMOLBOTE_COMPLETER_H +#define SMOLBOTE_COMPLETER_H + +#include <QListView> +#include <QStringListModel> +#include <QTreeWidgetItem> + +class Completer : public QListView +{ + + Q_OBJECT + +public: + explicit Completer(QWidget *parent = nullptr); + + bool updateItems(const QStringList &list); + + bool keyPressed(QKeyEvent *event); + +private: + QStringListModel *completionModel = nullptr; +}; + +#endif //SMOLBOTE_COMPLETER_H |