-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhelpdialog.h
132 lines (112 loc) · 3.35 KB
/
helpdialog.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
// File: helpdialog.h
/*
Pep8-1 is a virtual machine for writing machine language and assembly
language programs.
Copyright (C) 2009 J. Stanley Warford, Pepperdine University
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef HELPDIALOG_H
#define HELPDIALOG_H
#include <QDialog>
#include <QTreeWidgetItem>
#include "pephighlighter.h" // For syntax highlighting
#include "cpphighlighter.h"
#include "enu.h"
namespace Ui {
class HelpDialog;
}
class HelpDialog : public QDialog {
Q_OBJECT
Q_DISABLE_COPY(HelpDialog)
public:
explicit HelpDialog(QWidget *parent = 0);
virtual ~HelpDialog();
void machineLanguageClicked();
void assemblyLanguageClicked();
void debuggingProgramsClicked();
void writingTrapHandlersClicked();
void pep8ReferenceClicked();
void examplesClicked();
void operatingSystemClicked();
QString getCode(Enu::EPane &destPane, Enu::EPane &inputDest, QString &input);
bool hasFocus();
// Post: returns true if either of the text edits have focus
void copy();
// Post: the text edit that has focus has the copy() operation performed
void setCopyButtonDisabled(bool b);
// Post: the enabled state of the copy to source/object code button is set to b
private:
Ui::HelpDialog *ui;
void selectItem(QString string);
PepHighlighter *leftHighlighter;
CppHighlighter *rightCppHighlighter;
PepHighlighter *rightPepHighlighter;
enum Row {
eWRITING = 0,
eDEBUGGING = 1,
eTRAP = 2,
eREFERENCE = 3,
eEXAMPLES = 4,
eOS = 5,
eASSEMBLY = 1,
eMACHINE = 0,
eFIG432 = 0,
eFIG434 = 1,
eFIG435 = 2,
eFIG436 = 3,
eFIG503 = 4,
eFIG506 = 5,
eFIG507 = 6,
eFIG510 = 7,
eFIG511 = 8,
eFIG512 = 9,
eFIG513 = 10,
eFIG514a= 11,
eFIG514b= 12,
eFIG515 = 13,
eFIG516 = 14,
eFIG518 = 15,
eFIG521 = 16,
eFIG526 = 17,
eFIG601 = 18,
eFIG604 = 19,
eFIG606 = 20,
eFIG608 = 21,
eFIG610 = 22,
eFIG612 = 23,
eFIG614 = 24,
eFIG616 = 25,
eFIG618 = 26,
eFIG621 = 27,
eFIG623 = 28,
eFIG625 = 29,
eFIG627 = 30, // Interactive input
eFIG629 = 31, // Interactive input
eFIG632 = 32,
eFIG634 = 33,
eFIG636 = 34,
eFIG638 = 35,
eFIG640 = 36, // Interactive input
eFIG641 = 37,
eFIG643 = 38,
eFIG645 = 39,
eFIG647 = 40,
eEXER804 = 41,
ePROB829 = 42,
ePROB832 = 43,
};
private slots:
void onCurrentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*);
signals:
void clicked();
};
#endif // HELPDIALOG_H