Falkon Develop
Cross-platform Qt-based web browser
locationcompleterview.h
Go to the documentation of this file.
1/* ============================================================
2* Falkon - Qt web browser
3* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
4*
5* This program is free software: you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation, either version 3 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17* ============================================================ */
18#ifndef LOCATIONCOMPLETERVIEW_H
19#define LOCATIONCOMPLETERVIEW_H
20
21#include <QListView>
22
23#include "qzcommon.h"
24
25class LoadRequest;
27
28class QTimer;
29class QHBoxLayout;
30
32{
33 Q_OBJECT
34public:
35 explicit LocationCompleterView();
36
37 QAbstractItemModel *model() const;
38 void setModel(QAbstractItemModel *model);
39
40 QItemSelectionModel *selectionModel() const;
41
42 QModelIndex currentIndex() const;
43 void setCurrentIndex(const QModelIndex &index);
44
45 void adjustSize();
46
47 bool eventFilter(QObject* object, QEvent* event) override;
48
49Q_SIGNALS:
50 void closed();
52 void loadRequested(const LoadRequest &request);
53
54 void indexActivated(const QModelIndex &index);
55 void indexCtrlActivated(const QModelIndex &index);
56 void indexShiftActivated(const QModelIndex &index);
57 void indexDeleteRequested(const QModelIndex &index);
58
59public Q_SLOTS:
60 void close();
61
62private:
63 void setupSearchEngines();
64 void openSearchEnginesDialog();
65
66 QListView *m_view;
67 LocationCompleterDelegate *m_delegate;
68 QHBoxLayout *m_searchEnginesLayout;
69};
70
71#endif // LOCATIONCOMPLETERVIEW_H
void indexCtrlActivated(const QModelIndex &index)
void indexShiftActivated(const QModelIndex &index)
void indexDeleteRequested(const QModelIndex &index)
void searchEnginesDialogRequested()
void indexActivated(const QModelIndex &index)
void loadRequested(const LoadRequest &request)
#define FALKON_EXPORT
Definition: qzcommon.h:28