Overte C++ Documentation
WebBrowserSuggestionsEngine.h
1 //
2 // WebBrowserSuggestionsEngine.h
3 // interface/src/webbrowser
4 //
5 // Created by Vlad Stelmahovsky on 30/10/17.
6 // Copyright 2017 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef WEBBROWSERSUGGESTIONSENGINE_H
13 #define WEBBROWSERSUGGESTIONSENGINE_H
14 
15 #include <qpair.h>
16 #include <qimage.h>
17 #include <qmap.h>
18 
19 #include <qnetworkaccessmanager.h>
20 #include <qstring.h>
21 #include <qurl.h>
22 
23 class QNetworkReply;
24 
25 class WebBrowserSuggestionsEngine : public QObject {
26  Q_OBJECT
27 
28 public:
29  WebBrowserSuggestionsEngine(QObject* parent = 0);
30  virtual ~WebBrowserSuggestionsEngine();
31 
32 public slots:
33  void querySuggestions(const QString& searchString);
34 
35 signals:
36  void suggestions(const QStringList& suggestions);
37 
38 private slots:
39  void suggestionsFinished(QNetworkReply *reply);
40 private:
41  QNetworkReply* _suggestionsReply;
42  QNetworkAccessManager* _currentNAM;
43 };
44 
45 #endif // WEBBROWSERSUGGESTIONSENGINE_H
46