-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewrequestscreen.h
52 lines (46 loc) · 1.56 KB
/
newrequestscreen.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
#ifndef NEWREQUESTSCREEN_H
#define NEWREQUESTSCREEN_H
#include "edittext.h"
#include "highlighter.h"
#include <httprequest.h>
#include <QWidget>
#include "httpresponse.h"
#include "requestscreencontroller.h"
#include "responseheaders.h"
#include "responsecookies.h"
#include "httpheadersscreen.h"
namespace Ui {
class NewRequestScreen;
}
class NewRequestScreen : public QWidget
{
Q_OBJECT
public:
explicit NewRequestScreen(QWidget *parent = nullptr);
~NewRequestScreen();
void onHttpResponseRecieved(HttpResponse response);
QMap<QString, QString>* getRequestHeaders();
QUrlQuery* getQueryParams();
private slots:
void on_urlTextEdit_textChanged();
void on_requestTypeComboBox_currentIndexChanged(int index);
void on_requestTypeComboBox_currentTextChanged(const QString &arg1);
void setupTabs();
void on_sendButton_clicked();
private:
Ui::NewRequestScreen *ui;
void init();
void populateComboxBoxForRequestTypeMethods();
EditText *bodyEditText = nullptr;
EditText *responseEditText = nullptr;
Highlighter *responseEditTextHighlighter = nullptr;
Highlighter *bodyEditTextHighlighter = nullptr;
RequestScreenController *controller = nullptr;
ResponseHeaders *responseHeadersScreen = nullptr;
ResponseCookies *responseCookiesScreen = nullptr;
HttpHeadersScreen *requestHeaderScreen = nullptr;
HttpHeadersScreen *requestParamScreen = nullptr;
QMap<QString, QString>* keyValuePairsFromParamsAndRequestHeadersScreens(int type);
void prepareDataAndMakeRequest();
};
#endif // NEWREQUESTSCREEN_H