-
Notifications
You must be signed in to change notification settings - Fork 0
/
RobloxContextualHelp.h
73 lines (52 loc) · 1.31 KB
/
RobloxContextualHelp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* RobloxContextualHelp.h
* Copyright (c) 2013 ROBLOX Corp. All Rights Reserved.
*/
#pragma once
#include "RobloxBrowser.h"
#include "RobloxWebPage.h"
#include <QWidget>
class RobloxContextualHelpService : public QObject
{
Q_OBJECT
public:
RobloxContextualHelpService();
static RobloxContextualHelpService& singleton();
public Q_SLOTS:
void onHelpTopicChanged(const QString& helpTopic);
Q_SIGNALS:
void helpTopicChanged(const QString&);
private:
QString m_helpTopic;
};
class RobloxContextualHelp;
class RobloxHelpWebView : public RobloxBrowser
{
Q_OBJECT
public:
RobloxHelpWebView(RobloxContextualHelp* widget);
protected:
void paintEvent(QPaintEvent* event);
private Q_SLOTS:
void loadProgress(int);
private:
RobloxContextualHelp* m_contextualHelpWidget;
};
class RobloxContextualHelp : public QWidget
{
Q_OBJECT
public:
RobloxContextualHelp();
void updateURL();
public Q_SLOTS:
void onAuthenticationChanged(bool isAuthenticated);
void onHelpTopicChanged(const QString& helpTopic);
private Q_SLOTS:
void linkClicked(const QUrl& url);
private:
void setupWebView();
RobloxHelpWebView* m_pWebView;
RobloxWebPage* m_pWebPage;
QString m_urlString;
bool m_urlDirty;
};