Debian Codegraph @

listingtracepane.h

raw symbols SCIP
1 // File: listingtracepane.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 LISTINGTRACEPANE_H
23 #define LISTINGTRACEPANE_H
24
25 #include <QWidget>
26 #include <QTableWidgetItem>
27 #include "enu.h"
28
29 namespace Ui {
30 class ListingTracePane;
31 }
32
33 class ListingTracePane : public QWidget {
34 Q_OBJECT
35 Q_DISABLE_COPY(ListingTracePane)
36 public:
37 explicit ListingTracePane(QWidget *parent = 0);
38 virtual ~ListingTracePane();
39
40 void setListingTrace(QStringList listingTraceList, QList<bool> hasCheckBox);
41 // Post: Populate listingTraceTable from assemblerListingList and hasCheckBox
42
43 void clearListingTrace();
44
45 void updateListingTrace();
46 // Post: the listing trace pane selection is updated
47
48 void setDebuggingState(bool b);
49 // Post: resume and single step buttons clickability is set to b
50 // Also clears the selection
51
52 void showAssemblerListing();
53 // Post: The tableWidget containing the assembler listing is shown
54 // and the OS tableWidget is hidden
55
56 void highlightOnFocus();
57 // Post: Highlights the label based on the label window color saved in the UI file
58
59 bool hasFocus();
60 // Post: returns if the pane has focus
61
62 void setFocus();
63 // Post: gives the text edit focus
64
65 // void resizeDocWidth();
66 // Post: the document widths of the trace panes are set
67 // This is commented, but preserved in case we want to bring back the resizing of the document width to the width of the window.
68
69 public slots:
70 void onFontChanged(QFont font);
71
72 private:
73 Ui::ListingTracePane *ui;
74
75 void mouseReleaseEvent(QMouseEvent *);
76
77 QList<QTableWidgetItem *> highlightedItemList;
78
79 // int programDocWidth;
80 // int osDocWidth;
81 // These are commented, but preserved in case we want to bring back the resizing of the document width to the width of the window.
82 void mouseDoubleClickEvent(QMouseEvent *);
83
84 private slots:
85 void updateIsCheckedTable(QTableWidgetItem *item);
86
87 signals:
88 void labelDoubleClicked(Enu::EPane pane);
89
90 };
91
92 #endif // LISTINGTRACEPANE_H