]> git.siccegge.de Git - frida/frida.git/blob - src/gui/Mainwindow.hxx
Officially support LLVM-3.6
[frida/frida.git] / src / gui / Mainwindow.hxx
1 #ifndef INCLUDE__Mainwindow_hxx_
2 #define INCLUDE__Mainwindow_hxx_
3
4 #include <memory>
5 #include <map>
6 #include <vector>
7 #include <string>
8
9 #include <QTextEdit>
10 #include <QPushButton>
11 #include <QMainWindow>
12 #include <QTreeWidget>
13 #include <QStackedWidget>
14
15 #include <log4cxx/logger.h>
16
17 class Disassembler;
18 class Function;
19 class InformationManager;
20 class FunctionWidget;
21 class BasicBlockWidget;
22 class FridaDock;
23
24 class Mainwindow : public QMainWindow {
25 Q_OBJECT
26 public:
27 Mainwindow(InformationManager* mgr);
28
29 public Q_SLOTS:
30 void switchMainPlaneToAddress(uint64_t);
31 void requestNewFunctionByAddress(uint64_t address);
32
33 private:
34 void addFunction(Function* fun);
35 void setGlobalHotkeys();
36
37 QTextEdit *textEdit;
38 QPushButton *quitButton;
39 QMenu *fileMenu;
40
41 QTabWidget * tabwidget;
42 QTreeWidget * listWidget;
43 QStackedWidget * stackedWidget;
44 QDockWidget * dockWidget;
45 FridaDock * fdock;
46
47 QAction *exitAction;
48 QAction *openAction;
49 QAction *loadAction;
50 QAction *saveAction;
51
52 std::map<uint64_t, BasicBlockWidget*> blocks;
53 std::map<uint64_t, Function*> functions;
54 std::map<QTreeWidgetItem*, FunctionWidget*> objects_list;
55 std::map<uint64_t, QTreeWidgetItem*> objects_list_by_address;
56 std::vector<QTreeWidgetItem*> group_list;
57
58 InformationManager* manager;
59 log4cxx::LoggerPtr logger;
60
61 private Q_SLOTS:
62 void quit();
63 void open();
64 void load();
65 void save();
66 void switchMainPlane(QTreeWidgetItem* item);
67 void showListContextMenu(const QPoint&);
68 void requestNewFunction();
69 void requestNewGroup();
70 void renameFunction(Function* function);
71 void renameGroup(QTreeWidgetItem* item);
72 };
73
74 #endif /* INCLUDE__Mainwindow_hxx_ */