Merge branch 'develop'
[clinton/Virtual-Jaguar-Rx.git] / src / debugger / localbrowser.h
index dc732fd..249350f 100644 (file)
@@ -1,5 +1,5 @@
 //\r
-// localbrowser.h: All Watch\r
+// localbrowser.h: Local variables\r
 //\r
 // by Jean-Paul Mari\r
 //\r
@@ -7,51 +7,50 @@
 #ifndef __LOCALBROWSER_H__\r
 #define __LOCALBROWSER_H__\r
 \r
-#include <QtWidgets>\r
-#include <stdint.h>\r
+//#define LOCAL_FONTS                                                          // Support for fonts modifications\r
 \r
+#include <QtWidgets/QtWidgets>\r
+#include <stdint.h>\r
+
+// Error code definitions\r
+#define        LOCAL_NOERROR           0x00\r
+#define        LOCAL_WARNING           0x40\r
+#define        LOCAL_ERROR                     0x80
+#define        LOCAL_NOLOCALS          (0x01 | LOCAL_WARNING)\r
+\r
+// \r
 class LocalBrowserWindow: public QWidget\r
 {\r
        Q_OBJECT\r
 \r
        //\r
-       struct WatchInfo\r
+       typedef struct LocalInfo\r
        {\r
-               //size_t TypeEncoding;\r
-               //size_t TypeByteSize;\r
-               size_t Op;\r
                size_t Adr;\r
-               int Offset;\r
-               size_t TypeTag;\r
-               size_t TypeEncoding;\r
-               size_t TypeByteSize;\r
-               char *PtrVariableName;\r
-               char *PtrVariableBaseTypeName;\r
-       }S_WatchInfo;\r
+               char *PtrCPURegisterName;\r
+               void *PtrVariable;\r
+       }\r
+       S_LocalInfo;\r
 \r
        public:\r
                LocalBrowserWindow(QWidget *parent = 0);\r
                ~LocalBrowserWindow(void);\r
 \r
        public slots:\r
-//             void DefineAllKeys(void);\r
                void RefreshContents(void);\r
                bool UpdateInfos(void);\r
-//             void GoToAddress(void);\r
 \r
        protected:\r
-//             void keyPressEvent(QKeyEvent *);\r
+               QList<QStandardItem *> prepareRow(void* Info);\r
+               void setValueRow(QStandardItem *Row, size_t Adr, char* Value, void* Info);\r
+               void keyPressEvent(QKeyEvent *);\r
 \r
        private:\r
                QVBoxLayout *layout;\r
-//             QTextBrowser * text;\r
-//             QLabel *text;\r
-               QTextBrowser *text;\r
-//             QPushButton *refresh;\r
-//             QLineEdit *address;\r
-//             QPushButton *go;\r
-               WatchInfo *LocalInfo;\r
-//             int32_t memBase;\r
+               QTreeView *TableView;\r
+               QStandardItemModel *model;\r
+               S_LocalInfo *LocalInfo;\r
+               QStatusBar *statusbar;\r
                size_t NbLocal;\r
                char *FuncName;\r
 };\r