-
Notifications
You must be signed in to change notification settings - Fork 26
/
mainwindow.h
1096 lines (816 loc) · 27.1 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <Qsci/qsciapis.h>
#include <Qsci/qscilexercoffeescript.h>
#include <Qsci/qscilexercpp.h>
#include <Qsci/qscilexermarkdown.h>
#include <Qsci/qscilexerpython.h>
#include <Qsci/qscilexerverilog.h>
#include <Qsci/qsciscintilla.h>
#include <QApplication>
#include <QClipboard>
#include <QCloseEvent>
#include <QCommandLineOption>
#include <QCommandLineParser>
#include <QCompleter>
#include <QDateTime>
#include <QDebug>
#include <QDesktopServices>
#include <QDesktopWidget>
#include <QDir>
#include <QElapsedTimer>
#include <QFile>
#include <QFileDialog>
#include <QFileInfo>
#include <QFileOpenEvent>
#include <QFileSystemModel>
#include <QFontDialog>
#include <QGridLayout>
#include <QLabel>
#include <QMainWindow>
#include <QMessageBox>
#include <QMetaType>
#include <QMimeData>
#include <QPainter>
#include <QPlainTextEdit>
#include <QProcess>
#include <QSaveFile>
#include <QScreen>
#include <QScrollBar>
#include <QSettings>
#include <QSplitter>
#include <QStandardItem>
#include <QStandardItemModel>
#include <QStyleFactory>
#include <QSyntaxHighlighter>
#include <QTextBlock>
#include <QTextCodec>
#include <QTextStream>
#include <QThread>
#include <QTimer>
#include <QToolButton>
#include <QTranslator>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <QWidget>
#include <QWindow>
#include "autoupdatedialog.h"
#include "dlgdecompile.h"
#include "dlgpreferences.h"
#include "minidialog.h"
#include "recentfiles.h"
#include "ui_dlgdecompile.h"
#include "ui_dlgpreferences.h"
//网络相关头文件
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkRequest>
// JSON相关头文件
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#ifdef Q_OS_WIN32
#include <Shlobj.h>
#include <stdio.h>
#include <windows.h>
#endif
QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
class QPaintEvent;
class QResizeEvent;
class QSize;
class QWidget;
class LineNumberArea;
class QsciScintilla;
class thread_one;
class SearchThread;
class MiniEditor;
class MaxEditor;
class MyWidget;
void refreshTree();
void getMembers(QString str_member, QsciScintilla* textEdit);
void getMemberTree(QsciScintilla* textEdit);
QString findKey(QString str, QString stf_sub, int f_null);
int getBraceScope(int start, int count, QsciScintilla* textEdit);
bool chkMemberName(QString str, QString name);
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget* parent = nullptr);
~MainWindow();
Ui::MainWindow* ui;
QString strIniFile;
QString strAppName = "Xiasl";
QStringList listBookmarks;
static void highlighsearchtext(QString searchText, QsciScintilla* textEdit,
QString file, bool addTreeItem);
static void clearSearchHighlight(QsciScintilla* textEdit);
static void searchInFolders();
SearchThread* mySearchThread;
void dealDone();
void on_StartSearch(QsciScintilla* textEdit, QString file);
QVBoxLayout* hboxLayout;
QTimer* tmrWatchPos;
QMenu* mnuRecentOpenFile;
QStringList recentFileList;
void setRecentFiles(QString fileName);
void addFilesWatch();
void removeFilesWatch();
QString getCurrentFileName(int index);
QString strModiFile;
bool blAutoCheckUpdate = false;
QStringList reLoadByModiList;
dlgPreferences* dlgset;
void set_Font();
void set_wrap();
QLabel* lblEncoding;
int getDockWidth();
int getMiniDockX();
int getTabWidgetEditX();
int getTabWidgetEditW();
int getMainWindowHeight();
QString getTabTitle();
void setMark();
void about();
void getErrorLine(int i);
void loadFile(const QString& fileName, int row, int col);
QsciScintilla* textEdit;
QsciScintilla* getCurrentEditor(int index);
MiniEditor* miniEdit;
void setCurrentFile(const QString& fileName);
void update_ui_tree();
void loadLocal();
QProcess* co;
QProcess* Decompile;
QProcess* pk;
RecentFiles* m_recentFiles;
RecentFiles* m_ssdtFiles;
int current_line = 0;
thread_one* mythread; //线程对象
QSplitter* splitterMain;
void getACPITables(bool ssdt);
void msg(int value);
void msgstr(QString str);
void checkReloadFilesByModi();
void ShowAutoUpdateDlg(bool Database);
AutoUpdateDialog* dlgAutoUpdate;
int deleteDirfile(QString dirName);
QString getUrl(QVariantList list);
bool mac = false;
bool win = false;
bool linuxOS = false;
bool osx1012 = false;
QString getProxy();
QStringList listMd5;
QString getMD5(QString targetFile);
QString getMD5FromList(QString file);
QString treeViewStyleLight =
"QTreeView::branch:hover {background-color:rgba(127,255,0,50)}\
QTreeView::branch:selected {background: rgba(180 ,209 ,255, 255);selection-background-color:rgba(180 ,209 ,255, 255);}\
QTreeView::item:hover{background-color:rgba(127,255,0,50)}\
QTreeView::item:selected{background-color:rgba(180 ,209 ,255, 255); color:rgba(5,5,5,255);}"
"QTreeView::branch:open:has-children:!has-siblings,QTreeView::branch:"
"open:has-children:has-siblings {image: url(:/icon/sub.svg);}"
"QTreeView::branch:has-children:!has-siblings:closed,QTreeView::branch:"
"closed:has-children:has-siblings {image: url(:/icon/main.svg);}";
QString treeViewStyleDark =
"QTreeView::branch:hover {background-color:rgba(127,255,0,50)}\
QTreeView::branch:selected {background: rgba(66 ,92 ,141, 255);selection-background-color:rgba(66 ,92 ,141, 255);}\
QTreeView::item:hover{background-color:rgba(127,255,0,50)}\
QTreeView::item:selected{background-color:rgba(66 ,92 ,141, 255); color:rgba(226,230,237,255);}"
"QTreeView::branch:open:has-children:!has-siblings,QTreeView::branch:"
"open:has-children:has-siblings {image: url(:/icon/sub.svg);}"
"QTreeView::branch:has-children:!has-siblings:closed,QTreeView::branch:"
"closed:has-children:has-siblings {image: url(:/icon/main.svg);}";
QString treeFindStyleLight =
"QTreeView::branch:hover {background-color:rgba(127,255,0,50)}"
"QTreeView::branch:selected {background: rgb(180 ,209 ,255);"
"selection-background-color:rgb(180 ,209 ,255);}"
"QTreeWidget::item:hover{background-color:rgba(127,255,0,50)}"
"QTreeWidget::item:selected{background-color:rgb(180 ,209 ,255); "
"color:rgb(5,5,5);} "
"QTreeView::branch:open:has-children:!has-siblings,QTreeView::branch:"
"open:has-children:has-siblings {image: url(:/icon/sub.svg);}"
"QTreeView::branch:has-children:!has-siblings:closed,QTreeView::branch:"
"closed:has-children:has-siblings {image: url(:/icon/main.svg);}";
QString treeFindStyleDark =
"QTreeView::branch:hover {background-color:rgba(127,255,0,50)}"
"QTreeView::branch:selected {background: rgb(66 ,92 ,141);"
"selection-background-color:rgb(66 ,92 ,141);}"
"QTreeWidget::item:hover{background-color:rgba(127,255,0,50)}"
"QTreeWidget::item:selected{background-color:rgb(66 ,92 ,141); "
"color:rgb(226,230,237);} "
"QTreeView::branch:open:has-children:!has-siblings,QTreeView::branch:"
"open:has-children:has-siblings {image: url(:/icon/sub.svg);}"
"QTreeView::branch:has-children:!has-siblings:closed,QTreeView::branch:"
"closed:has-children:has-siblings {image: url(:/icon/main.svg);}";
QString treeWidgetStyleLight =
"QTreeView::branch:hover {background-color:rgba(127,255,0,50)}"
"QTreeView::branch:selected {background: rgb(180 ,209 ,255);"
"selection-background-color:rgb(180 ,209 ,255);}"
"QTreeWidget::item:hover{background-color:rgba(127,255,0,50)}"
"QTreeWidget::item:selected{background-color:rgb(180 ,209 ,255); "
"color:rgb(5,5,5);} "
"QTreeView::branch:open:has-children:!has-siblings,QTreeView::branch:"
"open:has-children:has-siblings {image: url(:/icon/sub.svg);}"
"QTreeView::branch:has-children:!has-siblings:closed,QTreeView::branch:"
"closed:has-children:has-siblings {image: url(:/icon/main.svg);}"
"QTreeView::branch:has-siblings:!adjoins-item{border-image:url(:/icon/"
"branch-line.png)0;}"
"QTreeView::branch:has-siblings:adjoins-item{border-image:url(:/icon/"
"branch-more.png)0;}"
"QTreeView::branch:!has-children:!has-siblings:adjoins-item{border-image:"
"url(:/icon//branch-end.png)0;}";
QString treeWidgetStyleDark =
"QTreeView::branch:hover {background-color:rgba(127,255,0,50)}"
"QTreeView::branch:selected {background: rgb(66 ,92 ,141);"
"selection-background-color:rgb(66 ,92 ,141);}"
"QTreeWidget::item:hover{background-color:rgba(127,255,0,50)}"
"QTreeWidget::item:selected{background-color:rgb(66 ,92 ,141); "
"color:rgb(226,230,237);} "
"QTreeView::branch:open:has-children:!has-siblings,QTreeView::branch:"
"open:has-children:has-siblings {image: url(:/icon/sub.svg);}"
"QTreeView::branch:has-children:!has-siblings:closed,QTreeView::branch:"
"closed:has-children:has-siblings {image: url(:/icon/main.svg);}"
"QTreeView::branch:has-siblings:!adjoins-item{border-image:url(:/icon/"
"branch-line.png)0;}"
"QTreeView::branch:has-siblings:adjoins-item{border-image:url(:/icon/"
"branch-more.png)0;}"
"QTreeView::branch:!has-children:!has-siblings:adjoins-item{border-image:"
"url(:/icon//branch-end.png)0;}";
QString infoShowStyleLight =
"QListWidget::item::selected:active\
{\
color:black;\
border-width:0;\
background: rgb(180 ,209 ,255);\
}\
QListWidget::item:selected\
{\
color:black;\
border-width:0;\
background: rgb(180 ,209 ,255);\
}";
QString infoShowStyleDark =
"QListWidget::item::selected:active\
{\
color:black;\
border-width:0;\
background: rgb(66 ,92 ,141);\
}\
QListWidget::item:selected\
{\
color:rgb(226,230,237);\
border-width:0;\
background: rgb(66 ,92 ,141);\
}";
QString sbarStyleLight =
"QStatusBar { background: rgb(236, 236, 236);}\
QStatusBar::item {\
border: 0px solid blue;\
border-radius: 3px;}";
QString sbarStyleDark =
"QStatusBar { background: rgb(50, 50, 50);}\
QStatusBar::item {\
border: 0px solid red;\
border-radius: 3px;}";
QString tabStyleLight =
"QTabWidget::pane {\
border: 1px solid gray;\
background: rgb(236, 236, 236);\
}\
QTabBar::scroller {width:0}\
QTabBar::close-button:hover {\
image: url(:/icon/c0.png);\
subcontrol-origin: padding;\
subcontrol-position: bottom right;\
}\
QTabBar::close-button {\
image: url(:/icon/c.png);\
subcontrol-origin: padding;\
subcontrol-position: bottom right;\
} \
QTabWidget::tab-bar:top {\
top: 1px;\
}\
\
QTabWidget::tab-bar:bottom {\
bottom: 1px;\
}\
\
QTabWidget::tab-bar:left {\
right: 1px;\
}\
\
QTabWidget::tab-bar:right {\
left: 1px;\
}\
\
QTabBar::tab {\
border: 1px solid gray;\
}\
\
QTabBar::tab:selected {\
background: rgb(236, 236, 236);\
}\
\
QTabBar::tab:!selected {\
background: lightgray; \
}\
\
QTabBar::tab:!selected:hover {\
background: silver;\
}\
\
QTabBar::tab:top:!selected {\
margin-top: 3px;\
}\
\
QTabBar::tab:bottom:!selected {\
margin-bottom: 3px;\
}\
\
QTabBar::tab:top, QTabBar::tab:bottom {\
min-width: 8ex;\
margin-right: -1px;\
padding: 8px 20px 8px 20px;\
}\
\
QTabBar::tab:top:selected {\
border-bottom-color: none;\
}\
\
QTabBar::tab:bottom:selected {\
border-top-color: none;\
}\
\
QTabBar::tab:top:last, QTabBar::tab:bottom:last,\
QTabBar::tab:top:only-one, QTabBar::tab:bottom:only-one {\
margin-right: 0;\
}\
\
QTabBar::tab:left:!selected {\
margin-right: 3px;\
}\
\
QTabBar::tab:right:!selected {\
margin-left: 3px;\
}\
\
QTabBar::tab:left, QTabBar::tab:right {\
min-height: 8ex;\
margin-bottom: -1px;\
padding: 10px 5px 10px 5px;\
}\
\
QTabBar::tab:left:selected {\
border-left-color: none;\
}\
\
QTabBar::tab:right:selected {\
border-right-color: none;\
}\
\
QTabBar::tab:left:last, QTabBar::tab:right:last,\
QTabBar::tab:left:only-one, QTabBar::tab:right:only-one {\
margin-bottom: 0;\
}";
QString tabStyleDark =
"QTabWidget::pane {\
border: 1px solid gray;\
background: rgb(60, 60, 60);\
}\
QTabBar::scroller {width:0}\
QTabBar::close-button:hover {\
image: url(:/icon/c0.png);\
subcontrol-origin: padding;\
subcontrol-position: bottom right;\
}\
\
QTabBar::close-button {\
image: url(:/icon/c.png);\
subcontrol-origin: padding;\
subcontrol-position: bottom right;\
} \
\
QTabWidget::tab-bar:top {\
top: 1px;\
}\
\
QTabWidget::tab-bar:bottom {\
bottom: 1px;\
}\
\
QTabWidget::tab-bar:left {\
right: 1px;\
}\
\
QTabWidget::tab-bar:right {\
left: 1px;\
}\
\
QTabBar::tab {\
border: 1px solid gray;\
}\
\
QTabBar::tab:selected {\
background: rgb(60, 60, 60);\
}\
\
QTabBar::tab:!selected {\
background: rgb(26.26,26); \
}\
\
QTabBar::tab:!selected:hover {\
/*background: silver;\
color: black;*/\
\
}\
\
QTabBar::tab:top:!selected {\
margin-top: 3px;\
}\
\
QTabBar::tab:bottom:!selected {\
margin-bottom: 3px;\
}\
\
QTabBar::tab:top, QTabBar::tab:bottom {\
min-width: 8ex;\
margin-right: -1px;\
padding: 8px 20px 8px 20px;\
}\
\
QTabBar::tab:top:selected {\
border-bottom-color: none;\
}\
\
QTabBar::tab:bottom:selected {\
border-top-color: none;\
}\
\
QTabBar::tab:top:last, QTabBar::tab:bottom:last,\
QTabBar::tab:top:only-one, QTabBar::tab:bottom:only-one {\
margin-right: 0;\
}\
\
QTabBar::tab:left:!selected {\
margin-right: 3px;\
}\
\
QTabBar::tab:right:!selected {\
margin-left: 3px;\
}\
\
QTabBar::tab:left, QTabBar::tab:right {\
min-height: 8ex;\
margin-bottom: -1px;\
padding: 10px 5px 10px 5px;\
}\
\
QTabBar::tab:left:selected {\
border-left-color: none;\
}\
\
QTabBar::tab:right:selected {\
border-right-color: none;\
}\
\
QTabBar::tab:left:last, QTabBar::tab:right:last,\
QTabBar::tab:left:only-one, QTabBar::tab:right:only-one {\
margin-bottom: 0;\
}";
void init_RecentOpenMenuItem();
void init_MiniEdit();
MiniEditor* getCurrentMiniEditor(int index);
void init_ScrollBox();
bool AddCboxFindItem = false;
static void searchMain(QString file);
void setBookmarks(int linenr);
void getBookmarks();
void init_Bookmarks();
void saveBookmarks();
void refreshItemTip(int currentRow);
QsciLexer* init_Lexer(QString file);
void init_MiniText();
QFont get_Font();
int get_Red();
protected:
void closeEvent(QCloseEvent* event) override;
void dragEnterEvent(QDragEnterEvent* e) override;
void dropEvent(QDropEvent* e) override;
void paintEvent(QPaintEvent* event) override;
void keyPressEvent(QKeyEvent* event) override;
void keyReleaseEvent(QKeyEvent* event) override;
void mousePressEvent(QMouseEvent*) override;
void mouseReleaseEvent(QMouseEvent*) override;
void mouseMoveEvent(QMouseEvent*) override;
void moveEvent(QMoveEvent*) override;
bool event(QEvent* event) override;
void resizeEvent(QResizeEvent* event) override;
public slots:
void Open();
QString openFile(QString fileName);
void dealover(); //处理线程返回的结束信号
bool eventFilter(QObject*, QEvent*) override;
void on_NewWindow();
void on_tabWidget_textEdit_currentChanged(int index);
void on_tabWidget_textEdit_tabBarClicked(int index);
void miniEdit_cursorPositionChanged();
virtual void changeEvent(QEvent* event) override;
void setValue();
void setValue2();
private slots:
void on_actionExpandAll();
void on_actionCollapseAll();
void on_actionOpenDir();
void treeWidgetBack_itemClicked(QTreeWidgetItem* item, int column);
void on_miniMap();
void on_clearFindText();
void ds_Decompile();
void view_info();
void view_mem_list();
void closeTab(int index);
void kextstat();
void on_RefreshTree();
void on_StartRefreshThread();
void timer_linkage();
void readResult(int exitCode);
void readCppResult(int exitCode);
void readCppRunResult(int exitCode);
void readDecompileResult(int exitCode);
void readHelpResult(int exitCode);
void readKextstat();
void recentOpen(QString filename);
void ssdtOpen(QString filename);
void newFile(QString file);
bool Save();
bool SaveAs();
void btnGenerate_clicked();
void btnCompile_clicked();
void textEdit_cursorPositionChanged();
void textEdit_linesChanged();
void textEdit_textChanged();
void on_btnReplace();
void on_btnFindPrevious();
void on_treeWidget_itemClicked(QTreeWidgetItem* item, int column);
void on_editShowMsg_cursorPositionChanged();
void on_PreviousError();
void on_NextError();
void on_editShowMsg_selectionChanged();
void on_editFind_ReturnPressed();
void on_MainWindow_destroyed();
void on_editErrors_cursorPositionChanged();
void on_editWarnings_cursorPositionChanged();
void on_editRemarks_cursorPositionChanged();
void on_editOptimizations_cursorPositionChanged();
void on_btnReplaceFind();
void on_btnCompile();
void on_treeView_doubleClicked(const QModelIndex& index);
void on_btnReturn_clicked();
void on_treeView_expanded(const QModelIndex& index);
void on_treeView_collapsed(const QModelIndex& index);
void iaslUsage();
void replyFinished(QNetworkReply* reply);
void CheckUpdate();
void ReplaceAll();
void on_editFind_editTextChanged(const QString& arg1);
void on_editFind_currentIndexChanged(const QString& arg1);
void on_listWidget_itemSelectionChanged();
void on_tabWidget_misc_currentChanged(int index);
void on_editFind_currentTextChanged(const QString& arg1);
void on_actionQuit_triggered();
void on_actionClose_tab_triggered();
void on_btnNo_clicked();
void on_btnYes_clicked();
void on_actionDownload_Upgrade_Packages_triggered();
void on_actProxy1_triggered();
void on_actProxy2_triggered();
void on_actProxy3_triggered();
void on_actProxy4_triggered();
void on_actProxy5_triggered();
void on_actionPreferences_triggered();
void on_btnNext_clicked();
void on_btnPrevious_clicked();
void on_btnDone_clicked();
void on_btnReplace_clicked();
void on_btnReplaceFind_clicked();
void on_btnReplaceAll_clicked();
void on_btnFind_clicked();
void on_btnCompile_clicked();
void on_btnErrorP_clicked();
void on_btnErrorN_clicked();
void on_btnCaseSensitive_clicked();
void on_btnSave_clicked();
void on_btnNew_clicked();
void on_btnShowRepace_clicked();
void on_actionReporting_Issues_triggered();
void on_actionUser_Guide_triggered();
void on_actionLatest_Release_triggered();
void on_btnTabList_clicked();
void on_actionAutomatic_Line_Feeds_triggered();
void on_btnMiniMap_clicked();
void on_actionNew_triggered();
void on_treeFind_itemClicked(QTreeWidgetItem* item, int column);
void on_btnSearch_clicked();
void on_tabWidget_misc_tabBarClicked(int index);
void on_actionFindNext_triggered();
void on_btnFolder_clicked();
void on_btnExpand_clicked();
void on_actionFindPrevious_triggered();
void on_actionFind_triggered();
void on_chkSubDir_clicked(bool checked);
void on_cboxFindScope_currentIndexChanged(int index);
void on_btnStopFind_clicked();
void on_ShowFindProgress();
void on_cboxFindScope_currentTextChanged(const QString& arg1);
void on_actionSet_Bookmark_triggered();
void on_actionViewBookmarks_triggered();
void on_listBook_itemClicked(QListWidgetItem* item);
void on_btnDelBook_clicked();
void on_textEditNotes_textChanged();
void on_listBook_currentRowChanged(int currentRow);
void on_listBook_itemSelectionChanged();
void on_btnBookmark_clicked();
private:
QMenu* menuTabList;
bool isDrag;
QPoint m_position;
int lblNumber = 2;
int editNumber = 1;
dlgDecompile* dlg;
int index_treeFindChild = 0;
QStringList findTextList;
void init_findTextList();
void forEach(QString str, QString strReplace);
QNetworkAccessManager* manager;
int parse_UpdateJSON(QString str);
void loadTabFiles();
QString shownName;
void set_return_text(QString text);
QString fsm_Filepath;
QModelIndex fsm_Index;
QString getLayerName(QTreeWidgetItem* hItem);
int treeCount(QTreeWidget* tree, QTreeWidgetItem* parent);
int treeCount(QTreeWidget* tree);
bool maybeSave(QString info);
bool find_up;
bool find_down;
QString ver;
QTimer* timer;
QTimer* tmeShowFindProgress;
QTextEdit* textEditTemp;
QLabel* lblMsg;
QLabel* lblLayer;
QLabel* lblCurrentFile = new QLabel;
QLineEdit* editLayer;
QElapsedTimer qTime;
int row = 0;
int row_current = 0;
bool linkage = false;
int preRow = 0;
bool saveFile(const QString& fileName);
void mem_linkage(QTreeWidget* tw, int RowNum);
void init_menu();
void init_Tool_UI();
void init_recentFiles();
void init_info_edit();
void init_Edit();
void init_treeWidget();
void init_statusBar();
QLabel* locationLabel;
void init_filesystem();
QFileSystemModel* model;
void update_ui_tw();
void separ_info(QString str_key, QTextEdit* editInfo);
void set_cursor_line_color(QTextEdit* edit);
void gotoLine(QTextEdit* edit);
void fileAndprog_Linux();
void regACPI_win();
void set_MyStyle(QsciLexer* textLexer, QsciScintilla* textEdit);
void update_member(bool show, QString str_void,
QList<QTreeWidgetItem*> tw_list);
void set_mark(int linenr);
bool DeleteDirectory(const QString& path);
bool enterEdit(QPoint pp, QsciScintilla* btn);
void on_btnNextError();
void on_btnPreviousError();
void goCppPreviousError();
void goCppNextError();
void getCppErrorLine(int i);
void setErrorMarkers(int linenr);
bool InfoWinShow = false;
void setEditFindCompleter();
void loadFindString();
const QString iniFile = QDir::homePath() + "/.config/QtiASL/QtiASL.ini";
#ifndef QT_NO_CONTEXTMENU
void contextMenuEvent(QContextMenuEvent* event) override;
#endif // QT_NO_CONTEXTMENU
void writeINIProxy();
void readINIProxy();
void updateMd5(QString file);
void init_UIStyle();
void setTextModifyMark();
void init_TabList();
void init_fsmSyncOpenedFile(QString OpenedFile);
void init_listForRecentFile(QString fileName);
void setEditFindMarker();
void init_UI_Layout();
void init_Widget();
};
class MiniEditor : public QsciScintilla {
Q_OBJECT
public:
MiniEditor(QWidget* parent = nullptr);
void mouseMoveEvent(QMouseEvent* event) override;
void wheelEvent(QWheelEvent* event) override;
void showZoomWin(int x, int y);
int miniLineNum = 0;
QString currentLineText;
int p0 = 0;
public slots:
bool eventFilter(QObject*, QEvent*) override;
protected:
void mousePressEvent(QMouseEvent* event) override;
// void mouseDoubleClickEvent(QMouseEvent* event) override;
// void mouseMoveEvent(QMouseEvent* event) override;
// void paintEvent(QPaintEvent*);
private slots:
void miniEdit_cursorPositionChanged();
void miniEdit_verticalScrollBarChanged();