Debian Codegraph @

sourcecodepane.cpp

raw symbols SCIP
1 // File: sourcecodepane.cppcxx . . $ `<file>/sourcecodepane.cpp`/
2 /*
3 Pep8-1 is a virtual machine for writing machine language and assembly
4 language programs.
5
6 Copyright (C) 2009 J. Stanley Warford, Pepperdine University
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #include <QList>
23 #include <QStringList>
24 #include <QTextCursor>
25 #include <QPalette>
26 #include <QSyntaxHighlighter>
27 #include <QFontDialog>
28 #include <QKeyEvent>
29 #include "sourcecodepane.h"cxx . . $ `<file>/sourcecodepane.h`/
30 #include "ui_sourcecodepane.h"cxx . . $ `<file>/ui_sourcecodepane.h`/
31 #include "code.h"cxx . . $ `<file>/code.h`/
32 #include "sim.h"cxx . . $ `<file>/sim.h`/
33 #include "pep.h"cxx . . $ `<file>/pep.h`/
34
35 // #include <QDebug>
36
37 SourceCodePanecxx . . $ SourceCodePane#::SourceCodePanecxx . . $ SourceCodePane#SourceCodePane(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# *parent) :
38 QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).(parent),
39 uicxx . . $ SourceCodePane#ui.(new Uicxx . . $ Ui/::SourceCodePanecxx . . $ Ui/SourceCodePane#)
40 {
41 uicxx . . $ SourceCodePane#ui.->setupUicxx . . $ Ui_SourceCodePane#setupUi(108f35f7aa7f3cf9).(this);
42
43 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).(), SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(modificationChanged(bool)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(setLabelToModified(bool)));
44
45 pepHighlightercxx . . $ SourceCodePane#pepHighlighter. = new PepHighlightercxx . . $ PepHighlighter#(uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).());
46
47 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(undoAvailable(bool)), this, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(undoAvailable(bool)));
48 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(redoAvailable(bool)), this, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(redoAvailable(bool)));
49
50 uicxx . . $ SourceCodePane#ui.->labelcxx . . $ Ui_SourceCodePane#label.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(QFontcxx . . $ QFont#QFont(7ae16150a604556).(Pepcxx . . $ Pep#::labelFontcxx . . $ Pep#labelFont., Pepcxx . . $ Pep#::labelFontSizecxx . . $ Pep#labelFontSize.));
51 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(QFontcxx . . $ QFont#QFont(7ae16150a604556).(Pepcxx . . $ Pep#::codeFontcxx . . $ Pep#codeFont., Pepcxx . . $ Pep#::codeFontSizecxx . . $ Pep#codeFontSize.));
52 }
53
54 SourceCodePanecxx . . $ SourceCodePane#::~cxx . . $ SourceCodePane#`~SourceCodePane`(ced63f7c635d850d).SourceCodePanecxx . . $ SourceCodePane#()
55 {
56 delete uicxx . . $ SourceCodePane#ui.;
57 }
58
59 bool SourceCodePanecxx . . $ SourceCodePane#::assemblecxx . . $ SourceCodePane#assemble(c9857a73d68e59ba).()
60 {
61 QStringcxx . . $ QString# sourceLinecxx . . $ QString#QString(ced63f7c635d850d).;
62 QStringcxx . . $ QString# errorStringcxx . . $ QString#QString(ced63f7c635d850d).;
63 QStringListcxx . . $ QStringList# sourceCodeListcxx . . $ QStringList#QStringList(ced63f7c635d850d).;
64 Codecxx . . $ Code# *code;
65 int lineNum = 0;
66 bool dotEndDetected = false;
67
68 removeErrorMessagescxx . . $ SourceCodePane#removeErrorMessages(49f6e7a06ebc5aa8).();
69 Asmcxx . . $ Asm#::listOfReferencedSymbolscxx . . $ Asm#listOfReferencedSymbols..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
70 Asmcxx . . $ Asm#::listOfReferencedSymbolLineNumscxx . . $ Asm#listOfReferencedSymbolLineNums..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
71 Pepcxx . . $ Pep#::memAddrssToAssemblerListingcxx . . $ Pep#memAddrssToAssemblerListing.->clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
72 Pepcxx . . $ Pep#::symbolTablecxx . . $ Pep#symbolTable..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
73 Pepcxx . . $ Pep#::adjustSymbolValueForBurncxx . . $ Pep#adjustSymbolValueForBurn..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
74 Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
75 Pepcxx . . $ Pep#::symbolFormatMultipliercxx . . $ Pep#symbolFormatMultiplier..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();;
76 Pepcxx . . $ Pep#::symbolTraceListcxx . . $ Pep#symbolTraceList..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).(); // Does this clear the lists within the map?
77 Pepcxx . . $ Pep#::globalStructSymbolscxx . . $ Pep#globalStructSymbols..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
78 Pepcxx . . $ Pep#::blockSymbolscxx . . $ Pep#blockSymbols..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
79 Pepcxx . . $ Pep#::equateSymbolscxx . . $ Pep#equateSymbols..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
80 while (!codeListcxx . . $ SourceCodePane#codeList..isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) {
81 delete codeListcxx . . $ SourceCodePane#codeList..takeFirstcxx . . $ QList#takeFirst(5f357b03ed472e5e).();
82 }
83 QStringcxx . . $ QString# sourceCode = uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->toPlainTextcxx . . $ QTextEdit#toPlainText(6ef7b6c27b00b43d).();
84 sourceCodeList =cxx . . $ QStringList#`operator=`(335bb966c1744308). sourceCode.splitcxx . . $ QString#split(92030b8bf74e4227).('\n'cxx . . $ QChar#QChar(f349c77f591a7878).);
85 Pepcxx . . $ Pep#::byteCountcxx . . $ Pep#byteCount. = 0;
86 Pepcxx . . $ Pep#::burnCountcxx . . $ Pep#burnCount. = 0;
87 while (lineNum < sourceCodeList.sizecxx . . $ QList#size(ea6fe5115c70a13f).() && !dotEndDetected) {
88 sourceLine =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). sourceCodeList[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).lineNum];
89 if (!Asmcxx . . $ Asm#::processSourceLinecxx . . $ Asm#processSourceLine(3c7c08c96e7ded6c).(sourceLinecxx . . $ QString#QString(132dd6869045752b)., lineNum, code, errorString, dotEndDetected)) {
90 appendMessageInSourceCodePaneAtcxx . . $ SourceCodePane#appendMessageInSourceCodePaneAt(909c33aa10af95dd).(lineNum, errorStringcxx . . $ QString#QString(132dd6869045752b).);
91 return false;
92 }
93 codeListcxx . . $ SourceCodePane#codeList..appendcxx . . $ QList#append(77d9f17553126ecb).(code);
94 lineNum++;
95 }
96 if (!dotEndDetected) {
97 errorString =cxx . . $ QString#`operator=`(d02845eef0c33901). ";ERROR: Missing .END sentinel.";
98 appendMessageInSourceCodePaneAtcxx . . $ SourceCodePane#appendMessageInSourceCodePaneAt(909c33aa10af95dd).(0, errorStringcxx . . $ QString#QString(132dd6869045752b).);
99 return false;
100 }
101 if (Pepcxx . . $ Pep#::byteCountcxx . . $ Pep#byteCount. > 65535) {
102 errorString =cxx . . $ QString#`operator=`(d02845eef0c33901). ";ERROR: Object code size too large to fit into memory.";
103 appendMessageInSourceCodePaneAtcxx . . $ SourceCodePane#appendMessageInSourceCodePaneAt(909c33aa10af95dd).(0, errorStringcxx . . $ QString#QString(132dd6869045752b).);
104 return false;
105 }
106 for (int i = 0; i < Asmcxx . . $ Asm#::listOfReferencedSymbolscxx . . $ Asm#listOfReferencedSymbols..lengthcxx . . $ QList#length(455f465bc33b4cdf).(); i++) {
107 if (!Pepcxx . . $ Pep#::symbolTablecxx . . $ Pep#symbolTable..containscxx . . $ QMap#contains(8877ebe272b9620d).(Asmcxx . . $ Asm#::listOfReferencedSymbolscxx . . $ Asm#listOfReferencedSymbols.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i])) {
108 errorString =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). ";ERROR: Symbol " +cxx . . $ operator+(c75c3ae4eb9af1a8). Asmcxx . . $ Asm#::listOfReferencedSymbolscxx . . $ Asm#listOfReferencedSymbols.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i] +cxx . . $ operator+(3d22f08efddf8107). " is used but not defined.";
109 appendMessageInSourceCodePaneAtcxx . . $ SourceCodePane#appendMessageInSourceCodePaneAt(909c33aa10af95dd).(Asmcxx . . $ Asm#::listOfReferencedSymbolLineNumscxx . . $ Asm#listOfReferencedSymbolLineNums.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i], errorStringcxx . . $ QString#QString(132dd6869045752b).);
110 return false;
111 }
112 }
113 Pepcxx . . $ Pep#::traceTagWarningcxx . . $ Pep#traceTagWarning. = false;
114 for (int i = 0; i < codeListcxx . . $ SourceCodePane#codeList..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
115 if (!codeListcxx . . $ SourceCodePane#codeList.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i]->processFormatTraceTagscxx . . $ Code#processFormatTraceTags(4a42edfa3626ccba).(lineNum, errorString)) {
116 appendMessageInSourceCodePaneAtcxx . . $ SourceCodePane#appendMessageInSourceCodePaneAt(909c33aa10af95dd).(lineNum, errorStringcxx . . $ QString#QString(132dd6869045752b).);
117 Pepcxx . . $ Pep#::traceTagWarningcxx . . $ Pep#traceTagWarning. = true;
118 }
119 }
120 if (!Pepcxx . . $ Pep#::traceTagWarningcxx . . $ Pep#traceTagWarning. && !(Pepcxx . . $ Pep#::blockSymbolscxx . . $ Pep#blockSymbols..isEmptycxx . . $ QList#isEmpty(3482b152b9333168).() && Pepcxx . . $ Pep#::equateSymbolscxx . . $ Pep#equateSymbols..isEmptycxx . . $ QList#isEmpty(3482b152b9333168).())) {
121 for (int i = 0; i < codeListcxx . . $ SourceCodePane#codeList..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
122 if (!codeListcxx . . $ SourceCodePane#codeList.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i]->processSymbolTraceTagscxx . . $ Code#processSymbolTraceTags(4a42edfa3626ccba).(lineNum, errorString)) {
123 appendMessageInSourceCodePaneAtcxx . . $ SourceCodePane#appendMessageInSourceCodePaneAt(909c33aa10af95dd).(lineNum, errorStringcxx . . $ QString#QString(132dd6869045752b).);
124 Pepcxx . . $ Pep#::traceTagWarningcxx . . $ Pep#traceTagWarning. = true;
125 }
126 }
127 }
128 return true;
129 }
130
131 QListcxx . . $ QList#<int> SourceCodePanecxx . . $ SourceCodePane#::getObjectCodecxx . . $ SourceCodePane#getObjectCode(9be6d6d0db5cf9a9).()
132 {
133 objectCodecxx . . $ SourceCodePane#objectCode..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
134 for (int i = 0; i < codeListcxx . . $ SourceCodePane#codeList..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); ++i) {
135 codeListcxx . . $ SourceCodePane#codeList..atcxx . . $ QList#at(e2681f9bb6b2f357).(i)->appendObjectCodecxx . . $ Code#appendObjectCode(e6c29c96e1964fe3).(objectCodecxx . . $ SourceCodePane#objectCode.);
136 }
137 return objectCodecxx . . $ QList#QList(3d2301cfd89f773a).;
138 }
139
140 QStringListcxx . . $ QStringList# SourceCodePanecxx . . $ SourceCodePane#::getAssemblerListingListcxx . . $ SourceCodePane#getAssemblerListingList(669a05bc42dd57cc).()
141 {
142 assemblerListingListcxx . . $ SourceCodePane#assemblerListingList..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
143 listingTraceListcxx . . $ SourceCodePane#listingTraceList..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
144 hasCheckBoxcxx . . $ SourceCodePane#hasCheckBox..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
145 for (int i = 0; i < codeListcxx . . $ SourceCodePane#codeList..lengthcxx . . $ QList#length(455f465bc33b4cdf).(); i++) {
146 codeListcxx . . $ SourceCodePane#codeList.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i]->appendSourceLinecxx . . $ Code#appendSourceLine(de6f90c2c92a4f05).(assemblerListingListcxx . . $ SourceCodePane#assemblerListingList., listingTraceListcxx . . $ SourceCodePane#listingTraceList., hasCheckBoxcxx . . $ SourceCodePane#hasCheckBox.);
147 }
148 return assemblerListingListcxx . . $ SourceCodePane#assemblerListingList.;
149 }
150
151 QStringListcxx . . $ QStringList# SourceCodePanecxx . . $ SourceCodePane#::getListingTraceListcxx . . $ SourceCodePane#getListingTraceList(669a05bc42dd57cc).()
152 {
153 return listingTraceListcxx . . $ SourceCodePane#listingTraceList.;
154 }
155
156 QListcxx . . $ QList#<bool> SourceCodePanecxx . . $ SourceCodePane#::getHasCheckBoxcxx . . $ SourceCodePane#getHasCheckBox(901f99b7efa3626e).()
157 {
158 return hasCheckBoxcxx . . $ QList#QList(3d2301cfd89f773a).;
159 }
160
161 void SourceCodePanecxx . . $ SourceCodePane#::adjustCodeListcxx . . $ SourceCodePane#adjustCodeList(d4f767463ce0a6b3).(int addressDelta)
162 {
163 for (int i = 0; i < codeListcxx . . $ SourceCodePane#codeList..lengthcxx . . $ QList#length(455f465bc33b4cdf).(); i++) {
164 codeListcxx . . $ SourceCodePane#codeList.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i]->adjustMemAddresscxx . . $ Code#adjustMemAddress(d4f767463ce0a6b3).(addressDelta);
165 }
166 }
167
168 void SourceCodePanecxx . . $ SourceCodePane#::installOScxx . . $ SourceCodePane#installOS(49f6e7a06ebc5aa8).()
169 {
170 for (int i = 0; i < 65536; i++) {
171 Simcxx . . $ Sim#::Memcxx . . $ Sim#Mem.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i] = 0;
172 }
173 int j = Pepcxx . . $ Pep#::romStartAddresscxx . . $ Pep#romStartAddress.;
174 for (int i = 0; i < objectCodecxx . . $ SourceCodePane#objectCode..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
175 Simcxx . . $ Sim#::Memcxx . . $ Sim#Mem.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).j++] = objectCodecxx . . $ SourceCodePane#objectCode.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i];
176 }
177 }
178
179 bool SourceCodePanecxx . . $ SourceCodePane#::installDefaultOscxx . . $ SourceCodePane#installDefaultOs(c9857a73d68e59ba).()
180 {
181 QStringcxx . . $ QString# sourceLinecxx . . $ QString#QString(ced63f7c635d850d).;
182 QStringcxx . . $ QString# errorStringcxx . . $ QString#QString(ced63f7c635d850d).;
183 QStringListcxx . . $ QStringList# sourceCodeListcxx . . $ QStringList#QStringList(ced63f7c635d850d).;
184 Codecxx . . $ Code# *code;
185 int lineNum = 0;
186 bool dotEndDetected = false;
187
188 Asmcxx . . $ Asm#::listOfReferencedSymbolscxx . . $ Asm#listOfReferencedSymbols..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
189 Pepcxx . . $ Pep#::memAddrssToAssemblerListingcxx . . $ Pep#memAddrssToAssemblerListing.->clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
190 Pepcxx . . $ Pep#::symbolTablecxx . . $ Pep#symbolTable..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
191 Pepcxx . . $ Pep#::adjustSymbolValueForBurncxx . . $ Pep#adjustSymbolValueForBurn..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
192 while (!codeListcxx . . $ SourceCodePane#codeList..isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) {
193 delete codeListcxx . . $ SourceCodePane#codeList..takeFirstcxx . . $ QList#takeFirst(5f357b03ed472e5e).();
194 }
195 QStringcxx . . $ QString# sourceCode = Pepcxx . . $ Pep#::resToStringcxx . . $ Pep#resToString(f7f320d754b8fd09).(":/help/figures/pep8os.pep"cxx . . $ QString#QString(85c52e162fed56f9).);
196 sourceCodeList =cxx . . $ QStringList#`operator=`(335bb966c1744308). sourceCode.splitcxx . . $ QString#split(92030b8bf74e4227).('\n'cxx . . $ QChar#QChar(f349c77f591a7878).);
197 Pepcxx . . $ Pep#::byteCountcxx . . $ Pep#byteCount. = 0;
198 Pepcxx . . $ Pep#::burnCountcxx . . $ Pep#burnCount. = 0;
199 while (lineNum < sourceCodeList.sizecxx . . $ QList#size(ea6fe5115c70a13f).() && !dotEndDetected) {
200 sourceLine =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). sourceCodeList[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).lineNum];
201 if (!Asmcxx . . $ Asm#::processSourceLinecxx . . $ Asm#processSourceLine(3c7c08c96e7ded6c).(sourceLinecxx . . $ QString#QString(132dd6869045752b)., lineNum, code, errorString, dotEndDetected)) {
202 return false;
203 }
204 codeListcxx . . $ SourceCodePane#codeList..appendcxx . . $ QList#append(77d9f17553126ecb).(code);
205 lineNum++;
206 }
207 if (!dotEndDetected) {
208 return false;
209 }
210 if (Pepcxx . . $ Pep#::byteCountcxx . . $ Pep#byteCount. > 65535) {
211 return false;
212 }
213 for (int i = 0; i < Asmcxx . . $ Asm#::listOfReferencedSymbolscxx . . $ Asm#listOfReferencedSymbols..lengthcxx . . $ QList#length(455f465bc33b4cdf).(); i++) {
214 if (!Pepcxx . . $ Pep#::symbolTablecxx . . $ Pep#symbolTable..containscxx . . $ QMap#contains(8877ebe272b9620d).(Asmcxx . . $ Asm#::listOfReferencedSymbolscxx . . $ Asm#listOfReferencedSymbols.[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).i])) {
215 return false;
216 }
217 }
218
219 if (Pepcxx . . $ Pep#::burnCountcxx . . $ Pep#burnCount. != 1) {
220 return false;
221 }
222
223 // Adjust for .BURN
224 int addressDelta = Pepcxx . . $ Pep#::dotBurnArgumentcxx . . $ Pep#dotBurnArgument. - Pepcxx . . $ Pep#::byteCountcxx . . $ Pep#byteCount. + 1;
225 QMutableMapIteratorcxx . . $ QMutableMapIterator# <QStringcxx . . $ QString#, int> icxx . . $ QMutableMapIterator#QMutableMapIterator(881fa6995fc49359).(Pepcxx . . $ Pep#::symbolTablecxx . . $ Pep#symbolTable.);
226 while (i.hasNextcxx . . $ QMutableMapIterator#hasNext(50ce9a9e25b4a850).()) {
227 i.nextcxx . . $ QMutableMapIterator#next(18bea9d7d3fabb8c).();
228 if (Pepcxx . . $ Pep#::adjustSymbolValueForBurncxx . . $ Pep#adjustSymbolValueForBurn..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(i.keycxx . . $ QMutableMapIterator#key(ea465e50d690edfe).())) {
229 i.setValuecxx . . $ QMutableMapIterator#setValue(3496de05b827211c).(i.valuecxx . . $ QMutableMapIterator#value(bef0f7a998e0139b).() + addressDelta);
230 }
231 }
232
233 adjustCodeListcxx . . $ SourceCodePane#adjustCodeList(d4f767463ce0a6b3).(addressDelta);
234 Pepcxx . . $ Pep#::romStartAddresscxx . . $ Pep#romStartAddress. += addressDelta;
235 getObjectCodecxx . . $ SourceCodePane#getObjectCode(9be6d6d0db5cf9a9).();
236 installOScxx . . $ SourceCodePane#installOS(49f6e7a06ebc5aa8).();
237
238 return true;
239 }
240
241 void SourceCodePanecxx . . $ SourceCodePane#::removeErrorMessagescxx . . $ SourceCodePane#removeErrorMessages(49f6e7a06ebc5aa8).()
242 {
243 QTextCursorcxx . . $ QTextCursor# cursor(uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).()->findcxx . . $ QTextDocument#find(b3b8ab911d2b8080).(";ERROR:"cxx . . $ QString#QString(85c52e162fed56f9).));
244 while (!cursor.isNullcxx . . $ QTextCursor#isNull(50ce9a9e25b4a850).()) {
245 cursor.movePositioncxx . . $ QTextCursor#movePosition(e5e992d8a5d1c17e).(QTextCursorcxx . . $ QTextCursor#::EndOfLinecxx . . $ QTextCursor#EndOfLine., QTextCursorcxx . . $ QTextCursor#::KeepAnchorcxx . . $ QTextCursor#KeepAnchor.);
246 cursor.removeSelectedTextcxx . . $ QTextCursor#removeSelectedText(49f6e7a06ebc5aa8).();
247 cursor =cxx . . $ QTextCursor#`operator=`(bcabffbdd456d2f). uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).()->findcxx . . $ QTextDocument#find(9eb78c354e90353a).(";ERROR:"cxx . . $ QString#QString(85c52e162fed56f9)., cursor);
248 }
249 cursor =cxx . . $ QTextCursor#`operator=`(bcabffbdd456d2f). uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).()->findcxx . . $ QTextDocument#find(b3b8ab911d2b8080).(";WARNING:"cxx . . $ QString#QString(85c52e162fed56f9).);
250 while (!cursor.isNullcxx . . $ QTextCursor#isNull(50ce9a9e25b4a850).()) {
251 cursor.movePositioncxx . . $ QTextCursor#movePosition(e5e992d8a5d1c17e).(QTextCursorcxx . . $ QTextCursor#::EndOfLinecxx . . $ QTextCursor#EndOfLine., QTextCursorcxx . . $ QTextCursor#::KeepAnchorcxx . . $ QTextCursor#KeepAnchor.);
252 cursor.removeSelectedTextcxx . . $ QTextCursor#removeSelectedText(49f6e7a06ebc5aa8).();
253 cursor =cxx . . $ QTextCursor#`operator=`(bcabffbdd456d2f). uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).()->findcxx . . $ QTextDocument#find(9eb78c354e90353a).(";WARNING:"cxx . . $ QString#QString(85c52e162fed56f9)., cursor);
254 }
255 }
256
257 void SourceCodePanecxx . . $ SourceCodePane#::appendMessageInSourceCodePaneAtcxx . . $ SourceCodePane#appendMessageInSourceCodePaneAt(909c33aa10af95dd).(int lineNumber, QStringcxx . . $ QString# message)
258 {
259 QTextCursorcxx . . $ QTextCursor# cursorcxx . . $ QTextCursor#QTextCursor(68d7deb16251beb9).(uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).());
260 cursor.setPositioncxx . . $ QTextCursor#setPosition(f2a23d9eedd3abdd).(0);
261 for (int i = 0; i < lineNumber; i++) {
262 cursor.movePositioncxx . . $ QTextCursor#movePosition(e5e992d8a5d1c17e).(QTextCursorcxx . . $ QTextCursor#::NextBlockcxx . . $ QTextCursor#NextBlock.);
263 }
264 cursor.movePositioncxx . . $ QTextCursor#movePosition(e5e992d8a5d1c17e).(QTextCursorcxx . . $ QTextCursor#::EndOfLinecxx . . $ QTextCursor#EndOfLine.);
265 cursor.movePositioncxx . . $ QTextCursor#movePosition(e5e992d8a5d1c17e).(QTextCursorcxx . . $ QTextCursor#::Leftcxx . . $ QTextCursor#Left., QTextCursorcxx . . $ QTextCursor#::KeepAnchorcxx . . $ QTextCursor#KeepAnchor., 1);
266 if (cursor.selectedTextcxx . . $ QTextCursor#selectedText(6ef7b6c27b00b43d).() ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). " ") {
267 cursor.setPositioncxx . . $ QTextCursor#setPosition(f2a23d9eedd3abdd).(cursor.anchorcxx . . $ QTextCursor#anchor(455f465bc33b4cdf).());
268 }
269 else {
270 cursor.setPositioncxx . . $ QTextCursor#setPosition(f2a23d9eedd3abdd).(cursor.anchorcxx . . $ QTextCursor#anchor(455f465bc33b4cdf).());
271 cursor.insertTextcxx . . $ QTextCursor#insertText(3520e46b33348bf6).(" "cxx . . $ QString#QString(85c52e162fed56f9).);
272 }
273 cursor.insertTextcxx . . $ QTextCursor#insertText(3520e46b33348bf6).(message);
274 }
275
276 void SourceCodePanecxx . . $ SourceCodePane#::setSourceCodePaneTextcxx . . $ SourceCodePane#setSourceCodePaneText(7df51288a9ebd664).(QStringcxx . . $ QString# string)
277 {
278 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(string);
279 }
280
281 void SourceCodePanecxx . . $ SourceCodePane#::clearSourceCodecxx . . $ SourceCodePane#clearSourceCode(49f6e7a06ebc5aa8).()
282 {
283 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->clearcxx . . $ QTextEdit#clear(49f6e7a06ebc5aa8).();
284 codeListcxx . . $ SourceCodePane#codeList..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); // This may cause issues with "format from listing" - but this needs to be cleared regardless.
285 }
286
287 bool SourceCodePanecxx . . $ SourceCodePane#::isModifiedcxx . . $ SourceCodePane#isModified(c9857a73d68e59ba).()
288 {
289 return uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).()->isModifiedcxx . . $ QTextDocument#isModified(50ce9a9e25b4a850).();
290 }
291
292 void SourceCodePanecxx . . $ SourceCodePane#::setModifiedFalsecxx . . $ SourceCodePane#setModifiedFalse(49f6e7a06ebc5aa8).()
293 {
294 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).()->setModifiedcxx . . $ QTextDocument#setModified(b45ddcbc8423892c).(false);
295 }
296
297 QStringcxx . . $ QString# SourceCodePanecxx . . $ SourceCodePane#::toPlainTextcxx . . $ SourceCodePane#toPlainText(4365c3963150523e).()
298 {
299 return uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->toPlainTextcxx . . $ QTextEdit#toPlainText(6ef7b6c27b00b43d).();
300 }
301
302 void SourceCodePanecxx . . $ SourceCodePane#::setCurrentFilecxx . . $ SourceCodePane#setCurrentFile(7df51288a9ebd664).(QStringcxx . . $ QString# string)
303 {
304 uicxx . . $ SourceCodePane#ui.->labelcxx . . $ Ui_SourceCodePane#label.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("Source Code - " +cxx . . $ operator+(c75c3ae4eb9af1a8). string);
305 }
306
307 void SourceCodePanecxx . . $ SourceCodePane#::highlightOnFocuscxx . . $ SourceCodePane#highlightOnFocus(49f6e7a06ebc5aa8).()
308 {
309 if (uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->hasFocuscxx . . $ QWidget#hasFocus(50ce9a9e25b4a850).()) {
310 uicxx . . $ SourceCodePane#ui.->labelcxx . . $ Ui_SourceCodePane#label.->setAutoFillBackgroundcxx . . $ QWidget#setAutoFillBackground(b45ddcbc8423892c).(true);
311 }
312 else {
313 uicxx . . $ SourceCodePane#ui.->labelcxx . . $ Ui_SourceCodePane#label.->setAutoFillBackgroundcxx . . $ QWidget#setAutoFillBackground(b45ddcbc8423892c).(false);
314 }
315 }
316
317 bool SourceCodePanecxx . . $ SourceCodePane#::hasFocuscxx . . $ SourceCodePane#hasFocus(c9857a73d68e59ba).()
318 {
319 return uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->hasFocuscxx . . $ QWidget#hasFocus(50ce9a9e25b4a850).();
320 }
321
322 void SourceCodePanecxx . . $ SourceCodePane#::undocxx . . $ SourceCodePane#undo(49f6e7a06ebc5aa8).()
323 {
324 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->undocxx . . $ QTextEdit#undo(49f6e7a06ebc5aa8).();
325 }
326
327 void SourceCodePanecxx . . $ SourceCodePane#::redocxx . . $ SourceCodePane#redo(49f6e7a06ebc5aa8).()
328 {
329 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->redocxx . . $ QTextEdit#redo(49f6e7a06ebc5aa8).();
330 }
331
332 bool SourceCodePanecxx . . $ SourceCodePane#::isUndoablecxx . . $ SourceCodePane#isUndoable(c9857a73d68e59ba).()
333 {
334 return uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).()->isUndoAvailablecxx . . $ QTextDocument#isUndoAvailable(50ce9a9e25b4a850).();
335 }
336
337 bool SourceCodePanecxx . . $ SourceCodePane#::isRedoablecxx . . $ SourceCodePane#isRedoable(c9857a73d68e59ba).()
338 {
339 return uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->documentcxx . . $ QTextEdit#document(f21741221844491e).()->isRedoAvailablecxx . . $ QTextDocument#isRedoAvailable(50ce9a9e25b4a850).();
340 }
341
342 void SourceCodePanecxx . . $ SourceCodePane#::cutcxx . . $ SourceCodePane#cut(49f6e7a06ebc5aa8).()
343 {
344 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->cutcxx . . $ QTextEdit#cut(49f6e7a06ebc5aa8).();
345 }
346
347 void SourceCodePanecxx . . $ SourceCodePane#::copycxx . . $ SourceCodePane#copy(49f6e7a06ebc5aa8).()
348 {
349 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->copycxx . . $ QTextEdit#copy(49f6e7a06ebc5aa8).();
350 }
351
352 void SourceCodePanecxx . . $ SourceCodePane#::pastecxx . . $ SourceCodePane#paste(49f6e7a06ebc5aa8).()
353 {
354 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->pastecxx . . $ QTextEdit#paste(49f6e7a06ebc5aa8).();
355 }
356
357 void SourceCodePanecxx . . $ SourceCodePane#::setReadOnlycxx . . $ SourceCodePane#setReadOnly(b45ddcbc8423892c).(bool b)
358 {
359 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->setReadOnlycxx . . $ QTextEdit#setReadOnly(b45ddcbc8423892c).(b);
360 }
361
362 void SourceCodePanecxx . . $ SourceCodePane#::tabcxx . . $ SourceCodePane#tab(49f6e7a06ebc5aa8).()
363 {
364 if (!uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->isReadOnlycxx . . $ QTextEdit#isReadOnly(50ce9a9e25b4a850).()) {
365 QTextCursorcxx . . $ QTextCursor# cursor = uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->textCursorcxx . . $ QTextEdit#textCursor(878247cba2fd3c00).();
366 cursor.movePositioncxx . . $ QTextCursor#movePosition(e5e992d8a5d1c17e).(QTextCursorcxx . . $ QTextCursor#::StartOfLinecxx . . $ QTextCursor#StartOfLine.);
367 QStringcxx . . $ QString# stringcxx . . $ QString#QString(ced63f7c635d850d).;
368 int curLinePos = uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->textCursorcxx . . $ QTextEdit#textCursor(878247cba2fd3c00).().positioncxx . . $ QTextCursor#position(455f465bc33b4cdf).() - cursor.positioncxx . . $ QTextCursor#position(455f465bc33b4cdf).();
369 int spaces;
370 if (curLinePos < 9) {
371 spaces = 9 - curLinePos;
372 }
373 else if (curLinePos < 17) {
374 spaces = 17 - curLinePos;
375 }
376 else if (curLinePos < 29) {
377 spaces = 29 - curLinePos;
378 }
379 else if (curLinePos == 29) {
380 spaces = 5;
381 }
382 else {
383 spaces = 4 - ((curLinePos - 30) % 4);
384 }
385
386 for (int i = 0; i < spaces; i++) {
387 string.appendcxx . . $ QString#append(d02845eef0c33901).(" ");
388 }
389
390 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->insertPlainTextcxx . . $ QTextEdit#insertPlainText(3520e46b33348bf6).(string);
391 }
392 }
393
394 void SourceCodePanecxx . . $ SourceCodePane#::onFontChangedcxx . . $ SourceCodePane#onFontChanged(19c44da831d1de49).(QFontcxx . . $ QFont# font)
395 {
396 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(font);
397 }
398
399 void SourceCodePanecxx . . $ SourceCodePane#::mouseReleaseEventcxx . . $ SourceCodePane#mouseReleaseEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent# *)
400 {
401 uicxx . . $ SourceCodePane#ui.->textEditcxx . . $ Ui_SourceCodePane#textEdit.->setFocuscxx . . $ QWidget#setFocus(49f6e7a06ebc5aa8).();
402 }
403
404 void SourceCodePanecxx . . $ SourceCodePane#::mouseDoubleClickEventcxx . . $ SourceCodePane#mouseDoubleClickEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent# *)
405 {
406 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! labelDoubleClickedcxx . . $ SourceCodePane#labelDoubleClicked(d9b7ee7ebef3c77).(Enucxx . . $ Enu/::ESourcecxx . . $ Enu/ESource.);
407 }
408
409 void SourceCodePanecxx . . $ SourceCodePane#::setLabelToModifiedcxx . . $ SourceCodePane#setLabelToModified(b45ddcbc8423892c).(bool modified)
410 {
411 QStringcxx . . $ QString# temp = uicxx . . $ SourceCodePane#ui.->labelcxx . . $ Ui_SourceCodePane#label.->textcxx . . $ QLabel#text(6ef7b6c27b00b43d).();
412 if (modified) {
413 uicxx . . $ SourceCodePane#ui.->labelcxx . . $ Ui_SourceCodePane#label.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(temp.appendcxx . . $ QString#append(d02845eef0c33901).(temp.endsWithcxx . . $ QString#endsWith(7cf081d1b6a1defd).(QCharcxx . . $ QChar#('*')) ? "" : "*"));
414 }
415 else if (temp.endsWithcxx . . $ QString#endsWith(7cf081d1b6a1defd).(QCharcxx . . $ QChar#('*'))) {
416 temp.chopcxx . . $ QString#chop(d4f767463ce0a6b3).(1);
417 uicxx . . $ SourceCodePane#ui.->labelcxx . . $ Ui_SourceCodePane#label.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(temp);
418 }
419 }
420
421