-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatortext.h
executable file
·87 lines (79 loc) · 2.34 KB
/
gatortext.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef GATORTEXT_H
#define GATORTEXT_H
#include <QMainWindow>
#include "codeeditor.h"
#include <QMenu>
#include <QToolBar>
#include "highlighter.h"
#include <QString>
#include <QDockWidget>
#include <QSignalMapper>
#include "languagetypes.h"
//#include <QWebEngineView> If i include this in the header file it wont compile. Its such a wear bug. seriously dont touch this shit
//#include <QtWebView/QtWebView>
/*
*header file got GatorText. represents the heart of the program and is the main window.
* childs the main window class
*/
class GatorText: public QMainWindow {
public:
GatorText();
void loadFile(const QString& filename);
bool checkForSave();
bool currentFileExist();
private:
void createActions();
void createMenus();
bool saveFile(const QString& filename);
void setCurrentFile(const QString& filename);
void createWebDock();
void createWordDock();
void updateMasterList();
void updateAdditionalItems();
void changeWebUrl(QString url);
QString mapLanguageToEnum(LanguageType type);
QMenu* fileMenu;
QMenu* editMenu;
QMenu* helpMenu;
QMenu* viewMenu;
QMenu* toolsMenu;
QMenu* optionsMenu;
QMenu* languageMenu;
QToolBar* toolBar;
CodeEditor* editor;
Highlighter* highlighter;
QDockWidget* dock;
QString currentFile = "";
const QString url = "https://devdocs.io/";
QString urlModifier = "cpp"; //default value
//QWebEngineView* webEngine;
LanguageType selectedLanguage;
QStringList* masterListPtr;
QStringList* additionalItemsPtr;
bool codeWordSelected = false;
private slots:
void newFile();
void openFile();
bool save();
bool saveAs();
void cut();
void copy();
void paste();
void find();
void addIndentation();
void changeFont();
void changeFontSize();
void languageChanged(LanguageType type);
void changeTheme(QString theme);
void about();
void commentOutCode();
void unCommentOutCode();
void quitProgram();
void toggleCodeViewer();
void highlightSelectedWord(QListWidgetItem* item);
void unHighlightSelectedWord(QListWidgetItem* item);
void listItemContextSelected(const QPoint &point);
protected:
void closeEvent(QCloseEvent *event) override;
};
#endif // GATORTEXT_H