X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fgui%2FMainwindow.cxx;h=859311032c79c45a49e1721d97ab32b1c67e61a6;hp=2036c486b705bb872ba51e037deeb3bb1cfb649b;hb=9b99fc5856d5fe88bb1d2aad4d2ee7cd86b5be57;hpb=b99a252c3503b095b6111b59b11a6659e42205c8 diff --git a/src/gui/Mainwindow.cxx b/src/gui/Mainwindow.cxx index 2036c48..8593110 100644 --- a/src/gui/Mainwindow.cxx +++ b/src/gui/Mainwindow.cxx @@ -6,6 +6,9 @@ #include "core/BasicBlock.hxx" #include "core/InformationManager.hxx" #include "core/events/RenameFunctionEvent.hxx" + +#include "widgets/FridaDock.hxx" +#include "widgets/LogDock.hxx" #include "widgets/ScriptingDock.hxx" #include "widgets/CFGScene.hxx" #include "widgets/FunctionWidget.hxx" @@ -16,7 +19,7 @@ Mainwindow::Mainwindow(InformationManager* mgr) : manager(mgr) - , logger(log4cxx::Logger::getLogger("Mainwindow")) { + , logger(log4cxx::Logger::getLogger("gui.Mainwindow")) { openAction = new QAction(tr("&Open"), this); loadAction = new QAction(tr("&Load"), this); saveAction = new QAction(tr("&Save"), this); @@ -40,23 +43,23 @@ Mainwindow::Mainwindow(InformationManager* mgr) QMenu* interpretermenu = menuBar()->addMenu(tr("&Interpreter")); - QPluginLoader* loader = new QPluginLoader("libguilePlugin", this); - if (!loader->load()) - LOG4CXX_ERROR(logger, "Loading plugin failed: " << loader->errorString().toStdString()); - interpreter["GUILE"] = qobject_cast(loader->instance()); - scripting = new ScriptingDock(interpreter["GUILE"], tr("Scripting"), this); - scripting->setAllowedAreas(Qt::BottomDockWidgetArea); - addDockWidget(Qt::BottomDockWidgetArea, scripting); + fdock = new FridaDock(tr("Frida Dock"), this); + + fdock->addTab(new LogDock(fdock), "Log"); + + fdock->addTab(new ScriptingDock(manager->getInterpreter("GUILE"), fdock), "guile"); + fdock->setAllowedAreas(Qt::BottomDockWidgetArea); + addDockWidget(Qt::BottomDockWidgetArea, fdock); QAction* guileLoad = new QAction(tr("&GUILE"), this); interpretermenu->addAction(guileLoad); connect(guileLoad, &QAction::triggered, [&]() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open Script"), "", tr("Binaries") + " (*." + - interpreter["GUILE"]->fileExtension().c_str() + ")"); + manager->getInterpreter("GUILE")->fileExtension().c_str() + ")"); std::stringstream a, b; std::string c; - interpreter["GUILE"]->loadFile(fileName.toStdString(), a, b, c); + manager->getInterpreter("GUILE")->loadFile(fileName.toStdString(), a, b, c); }); listWidget = new QTreeWidget();