a78b44617f5ee7d4f8db3238045fb366d3362125
[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 <set>
7
8 #include <QTextEdit>
9 #include <QPushButton>
10 #include <QMainWindow>
11 #include <QListWidget>
12 #include <QStackedWidget>
13
14 #include <log4cxx/logger.h>
15
16 #include "disassembler/Disassembler.hxx"
17 #include "widgets/BasicBlockWidget.hxx"
18 #include "widgets/ScriptingDock.hxx"
19 #include "core/InformationManager.hxx"
20
21 class Mainwindow : public QMainWindow {
22 Q_OBJECT
23 public:
24 Mainwindow(InformationManager* mgr);
25
26 private:
27 void addFunction(Function* fun);
28
29 QTextEdit *textEdit;
30 QPushButton *quitButton;
31 QMenu *fileMenu;
32
33 QTabWidget * tabwidget;
34 QListWidget * listWidget;
35 QStackedWidget * stackedWidget;
36 QDockWidget * dockWidget;
37 ScriptingDock * scripting;
38
39 QAction *exitAction;
40 QAction *openAction;
41
42 std::map<uint64_t, BasicBlockWidget*> blocks;
43 std::map<QListWidgetItem*, QWidget*> objects_list;
44 std::map<uint64_t, QListWidgetItem*> objects_list_by_address;
45 std::set<Function*> functions;
46 InformationManager* manager;
47
48 log4cxx::LoggerPtr logger;
49 public Q_SLOTS:
50 void switchMainPlaneToAddress(uint64_t);
51 private Q_SLOTS:
52 void quit();
53 void open();
54 void switchMainPlane(int);
55 void showListContextMenu(const QPoint&);
56 void requestNewFunction();
57 void renameFunction(QListWidgetItem * item);
58 };
59
60 #endif /* INCLUDE__Mainwindow_hxx_ */