| 1 | // File: memorydumppane.hcxx . . $ `<file>/memorydumppane.h`/ |
| 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 | #ifndef MEMORYDUMPPANE_H |
| 23 | #define MEMORYDUMPPANE_Hcxx . . $ `memorydumppane.h:23:9`! |
| 24 | |
| 25 | #include <QWidget> |
| 26 | #include <QScrollBar> |
| 27 | #include <QSet> |
| 28 | |
| 29 | namespace Uicxx . . $ Ui/ { |
| 30 | class MemoryDumpPanecxx . . $ Ui/MemoryDumpPane#; |
| 31 | } |
| 32 | |
| 33 | class MemoryDumpPanecxx . . $ MemoryDumpPane# : public QWidgetcxx . . $ QWidget# { |
| 34 | Q_OBJECTcxx . . $ MemoryDumpPane#tr(75d9f1c324b4579d). |
| 35 | Q_DISABLE_COPYcxx . . $ `<external>/15045578679651060896/qglobal.h:444:9`!(MemoryDumpPane) |
| 36 | public: |
| 37 | explicit MemoryDumpPanecxx . . $ MemoryDumpPane#MemoryDumpPane(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# *parent = 0); |
| 38 | virtual ~cxx . . $ MemoryDumpPane#`~MemoryDumpPane`(ced63f7c635d850d).MemoryDumpPanecxx . . $ MemoryDumpPane#(); |
| 39 | |
| 40 | void refreshMemorycxx . . $ MemoryDumpPane#refreshMemory(49f6e7a06ebc5aa8).(); |
| 41 | // Post: the entire memory pane is refreshed |
| 42 | |
| 43 | void refreshMemoryLinescxx . . $ MemoryDumpPane#refreshMemoryLines(3e454b8ccf442868).(int firstByte, int lastByte); |
| 44 | // Post: The memory dump is refresed from the line containing startByte to the line |
| 45 | // containing endByte. Called by load(). |
| 46 | |
| 47 | void highlightMemorycxx . . $ MemoryDumpPane#highlightMemory(b45ddcbc8423892c).(bool b); |
| 48 | // Post: Everything is unhighlighted. If b, current program counter is highlighted. |
| 49 | |
| 50 | void cacheModifiedBytescxx . . $ MemoryDumpPane#cacheModifiedBytes(49f6e7a06ebc5aa8).(); |
| 51 | // Post: Changed bytes from Sim are added to the QSet modifiedBytes |
| 52 | |
| 53 | void updateMemorycxx . . $ MemoryDumpPane#updateMemory(49f6e7a06ebc5aa8).(); |
| 54 | // Post: Memory displays are updated using the changedMemoryAddrss qlist in sim |
| 55 | |
| 56 | void scrollToTopcxx . . $ MemoryDumpPane#scrollToTop(49f6e7a06ebc5aa8).(); |
| 57 | // Post: Memory dump is scrolled to the top left corner |
| 58 | |
| 59 | void highlightOnFocuscxx . . $ MemoryDumpPane#highlightOnFocus(49f6e7a06ebc5aa8).(); |
| 60 | // Post: Highlights the label based on the label window color saved in the UI file |
| 61 | |
| 62 | bool hasFocuscxx . . $ MemoryDumpPane#hasFocus(c9857a73d68e59ba).(); |
| 63 | // Post: returns if the pane has focus |
| 64 | |
| 65 | void copycxx . . $ MemoryDumpPane#copy(49f6e7a06ebc5aa8).(); |
| 66 | // Post: selected text in the text edit is copied to the clipboard |
| 67 | |
| 68 | int memoryDumpWidthcxx . . $ MemoryDumpPane#memoryDumpWidth(b126dc7c1de90089).(); |
| 69 | // Post: the width of the memory dump text edit document is returned |
| 70 | |
| 71 | public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 72 | void onFontChangedcxx . . $ MemoryDumpPane#onFontChanged(19c44da831d1de49).(QFontcxx . . $ QFont# font); |
| 73 | |
| 74 | private: |
| 75 | Uicxx . . $ Ui/::MemoryDumpPanecxx . . $ Ui/MemoryDumpPane# *uicxx . . $ MemoryDumpPane#ui.; |
| 76 | |
| 77 | void highlightBytecxx . . $ MemoryDumpPane#highlightByte(6f91d3f73a5b9054).(int memAddr, QColorcxx . . $ QColor# foreground, QColorcxx . . $ QColor# background); |
| 78 | // Used to highlight/unhighlight individual bytes. |
| 79 | |
| 80 | void mouseReleaseEventcxx . . $ MemoryDumpPane#mouseReleaseEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent# *); |
| 81 | |
| 82 | QListcxx . . $ QList#<int> highlightedDatacxx . . $ MemoryDumpPane#highlightedData.; |
| 83 | // This is a list of bytes that are currently highlighted. |
| 84 | |
| 85 | QSetcxx . . $ QSet#<int> modifiedBytescxx . . $ MemoryDumpPane#modifiedBytes.; |
| 86 | // This is a list of bytes that were modified since the last update. This is cached for a convenient time to update |
| 87 | // such as when we hit a breakpoint, the program finishes, or the end of the single step. |
| 88 | |
| 89 | QListcxx . . $ QList#<int> bytesWrittenLastStepcxx . . $ MemoryDumpPane#bytesWrittenLastStep.; |
| 90 | // This is a list of bytes written last step, which is used to highlight recently modified bytes |
| 91 | |
| 92 | bool delayLastStepClearcxx . . $ MemoryDumpPane#delayLastStepClear.; |
| 93 | // This is used to delay a clear of the QList bytesWrittenLastStep when leaving a trap that modifies bytes |
| 94 | // to allow highlighting of modified bytes in trap instructions. |
| 95 | |
| 96 | void scrollToBytecxx . . $ MemoryDumpPane#scrollToByte(d4f767463ce0a6b3).(int byte); |
| 97 | |
| 98 | private slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 99 | void scrollToPCcxx . . $ MemoryDumpPane#scrollToPC(49f6e7a06ebc5aa8).(); |
| 100 | void scrollToSPcxx . . $ MemoryDumpPane#scrollToSP(49f6e7a06ebc5aa8).(); |
| 101 | void scrollToAddresscxx . . $ MemoryDumpPane#scrollToAddress(7df51288a9ebd664).(QStringcxx . . $ QString# string); |
| 102 | }; |
| 103 | |
| 104 | #endif // MEMORYDUMPPANE_H |