-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
82 lines (76 loc) · 1.82 KB
/
mainwindow.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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "editor.h"
#include"tabeditor.h"
#include<QLabel>
#include"finddialog.h"
class MarkdownEditor;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
Editor *editor;
QLabel* languageLabel;
QLabel* wordCountLabel;
QLabel* charCountLabel;
QStatusBar* statusBar;
QLabel* wordLabel;
QLabel* charLabel;
QAction *pStatus;
bool MarkdownDispalyState=false;
void toggle_undo(bool);
void toggle_redo(bool);
void toggle_copyCut(bool);
~MainWindow();
private:
Ui::MainWindow *ui;
tabEditor *tab;
void initStatusBar();
QMap<QAction*,QString> langMap;
void initLangMap();
QAction *pLangPython;
QAction *pLangCpp;
QAction *pLangJava;
QAction *pLangC;
QAction* pIndent;
QAction* pWrap;
QAction *pUndo;
QAction *pRedo;
QAction *pCut;
QAction *pCopy;
QAction *pLangMarkdown;
QAction* pLangTest;
QAction* pMarkdown;
FindDialog* findDialog;
MarkdownEditor* meditor;
public slots:
void on_textChanged(Editor*);
private slots:
void newFile();
void open();
void fontChoose();
void on_statusBarTrigger();
void on_langSelected(QAction*);
void on_indentTrigger();
void on_wrapTrigger();
void on_redoTrigger();
void on_undoTrigger();
void on_copyTrigger();
void on_cutTrigger();
void on_pasteTrigger();
void on_findTrigger();
void on_startFindTrigger(QString,bool,bool);
void on_startReplaceTrigger(QString,QString,bool,bool);
void on_startReplaceAllTrigger(QString,QString,bool,bool);
void on_markdownTrigger();
// void save();
// void saveAs();
// void print();
// void exit();
};
#endif // MAINWINDOW_H