void TIA::createConnections() { // connections from widgets ... connect(wDisassembly,SIGNAL(onDisassemblyViewReady()),this,SLOT(onDissassemblyViewReady())); connect(wFunctions,SIGNAL(gotoAddress(address_t)),wDisassembly,SLOT(onGotoAddress(address_t))); connect(wBreakpoints,SIGNAL(gotoAddress(address_t)),wDisassembly,SLOT(onGotoAddress(address_t))); // connections from main dialog ... connect(m_ActionOpen,SIGNAL(triggered()),this,SLOT(onMenuActionOpen())); connect(this,SIGNAL(newFileOpen(QString)),this,SLOT(onMenuActionOpenFile(QString))); connect(m_ActionAbout,SIGNAL(triggered()),this,SLOT(onMenuActionAbout())); connect(m_ActionDebuggerStart, SIGNAL(triggered()),this,SLOT(onMenuActionDebuggerStart())); connect(m_ActionDebuggerStop, SIGNAL(triggered()),this,SLOT(onMenuActionDebuggerStop())); // internal connections connect(m_Target,SIGNAL(targetLoaded()),this,SLOT(onTargetLoaded())); connect(m_Target,SIGNAL(targetUnloaded()),this,SLOT(onTargetUnloaded())); connect(m_StaticDisasm,SIGNAL(DisassemblyError(QString,QString,QString)),this,SLOT(onDisassemblyError(QString,QString,QString))); connect(this,SIGNAL(instructionAnalyticsFinish()),wDisassembly,SLOT(insertContent())); connect(this,SIGNAL(instructionAnalyticsFinish()),this,SLOT(onInstructionAnalyticsFinish())); connect(this,SIGNAL(log(QString)),m_VLog,SLOT(log(QString))); connect(m_VLog,SIGNAL(onLogViewReady()),this,SLOT(onLogViewReady())); connect(m_StaticDisasm,SIGNAL(fullStaticDisassembly()),this,SLOT(onFullStaticDisassembly())); }
void QMemoryView::contextMenuEvent(QContextMenuEvent *event) { QMenu menu(this); menu.addAction("Go to Address...", this, SLOT(gotoAddress())); menu.addSeparator(); menu.addAction("Words / Bytes", this, SLOT(changeWordByteMode())); menu.exec(event->globalPos()); }
void Manager::gotoStackAddress(uint32_t address) { auto stackWindow = reinterpret_cast<StackWindow *>(getWindow(WindowID::StackWindow)); if (stackWindow) { stackWindow->gotoAddress(address); stackWindow->bringToFront(); } }
void Manager::gotoMemoryAddress(uint32_t address) { auto window = reinterpret_cast<MemoryWindow *>(getWindow(WindowID::MemoryWindow)); if (window) { window->gotoAddress(address); window->bringToFront(); } }
void Manager::gotoDisassemblyAddress(uint32_t address) { auto disassemblyWindow = reinterpret_cast<DisassemblyWindow *>(getWindow(WindowID::DisassemblyWindow)); if (disassemblyWindow) { disassemblyWindow->gotoAddress(address); disassemblyWindow->bringToFront(); } }
HomeView::HomeView(QWidget *parent) : QWidget(parent) , m_addressBar(0) { m_addressBar = new AddressBar(parent); connect(m_addressBar, SIGNAL(addressEntered(QString)), SLOT(gotoAddress(QString))); m_bookmarks = new BookmarksView(parent); connect(m_bookmarks, SIGNAL(urlSelected(QUrl)), SIGNAL(urlActivated(QUrl))); QVBoxLayout *layout = new QVBoxLayout(this); layout->setMargin(4); layout->setSpacing(4); layout->addWidget(m_addressBar); layout->addWidget(m_bookmarks); }
BrowserWindow::BrowserWindow() : m_slidingSurface(new QWidget(this)) , m_homeView(new HomeView(m_slidingSurface)) , m_browserView(new BrowserView(m_slidingSurface)) , m_animation(new QPropertyAnimation(this, "slideValue")) { m_slidingSurface->setAutoFillBackground(true); m_homeView->resize(size()); m_browserView->resize(size()); connect(m_homeView, SIGNAL(addressEntered(QString)), SLOT(gotoAddress(QString))); connect(m_homeView, SIGNAL(urlActivated(QUrl)), SLOT(navigate(QUrl))); connect(m_browserView, SIGNAL(menuButtonClicked()), SLOT(showHomeView())); m_animation->setDuration(200); connect(m_animation, SIGNAL(finished()), SLOT(animationFinished())); setSlideValue(0.0f); }
void BrowserWindow::initialize() { m_homeView = new HomeView(this); m_browserView = new BrowserView(this); m_homeView->hide(); m_homeView->resize(size()); m_homeView->move(0, 0); m_browserView->hide(); m_browserView->resize(size()); m_browserView->move(0, 0); connect(m_homeView, SIGNAL(addressEntered(QString)), SLOT(gotoAddress(QString))); connect(m_homeView, SIGNAL(urlActivated(QUrl)), SLOT(navigate(QUrl))); connect(m_browserView, SIGNAL(menuButtonClicked()), SLOT(showHomeView())); m_homeView->setVisible(false); m_browserView->setVisible(false); slide(0); connect(m_timeLine, SIGNAL(frameChanged(int)), SLOT(slide(int))); }
void MainWindow::initialize() { MyPreferences::m_prefInstance = new MyPreferences(this); SEMPERMERK_PREFS->hide(); SEMPERMERK_PREFS->resize(size()); SEMPERMERK_PREFS->move(0, 0); m_controlStrip = new ControlStrip(this); m_controlStrip->resizeBar(size(), true); m_controlStrip->show(); m_homeView = new HomeView(this); m_mapView = new MapView(this); m_mapView->show(); m_mapView->resize(QSize(width(), height())); loadTemplateDocument(":/doc/initial.mdc"); m_mapView->setDocument(m_document); // ImageMapLayer* ilayer = m_document->addImageLayer(); // ilayer->setMapAdapter(TMS_ADAPTER_UUID, "OSM Mapnik"); // ilayer->setVisible(true); M_PREFS->initialPosition(m_mapView); m_mapView->launch(new EditInteraction(m_mapView)); m_mapView->invalidate(true, true); m_homeView->resize(QSize(width(), height())); m_homeView->move(width(), m_homeView->y()); m_homeView->show(); m_gpsview = new QGPS(this); #if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR) QGPSMobileDevice* aGps = new QGPSMobileDevice(); if (aGps->openDevice()) { connect(aGps, SIGNAL(updatePosition(qreal, qreal, QDateTime, qreal, qreal, qreal)), this, SLOT(updateGpsPosition(qreal, qreal, QDateTime, qreal, qreal, qreal))); // ui->gpsConnectAction->setEnabled(false); // ui->gpsReplayAction->setEnabled(false); // ui->gpsDisconnectAction->setEnabled(true); // ui->gpsRecordAction->setEnabled(true); // ui->gpsPauseAction->setEnabled(true); m_gpsview->setGpsDevice(aGps); m_gpsview->resetGpsStatus(); m_gpsview->startGps(); } #elif defined(Q_WS_SIMULATOR) QGPSFileDevice* aGps = new QGPSFileDevice(":/test/test.nma"); if (aGps->openDevice()) { connect(aGps, SIGNAL(updatePosition(qreal, qreal, QDateTime, qreal, qreal, qreal)), this, SLOT(updateGpsPosition(qreal, qreal, QDateTime, qreal, qreal, qreal))); // ui->gpsConnectAction->setEnabled(false); // ui->gpsReplayAction->setEnabled(false); // ui->gpsDisconnectAction->setEnabled(true); // ui->gpsRecordAction->setEnabled(true); // ui->gpsPauseAction->setEnabled(true); m_gpsview->setGpsDevice(aGps); m_gpsview->resetGpsStatus(); m_gpsview->startGps(); } #endif m_gpsview->resize(QSize(width(), height())); m_gpsview->move(width(), m_gpsview->y()); m_gpsview->show(); SEMPERMERK_PREFS->show(); m_controlStrip->raise(); connect(m_homeView, SIGNAL(addressEntered(QString)), SLOT(gotoAddress(QString))); // connect(m_mapView, SIGNAL(menuButtonClicked()), SLOT(showHomeView())); // connect(m_controlStrip, SIGNAL(backClicked()), m_mapView, SLOT(backView())); // connect(m_controlStrip, SIGNAL(forwardClicked()), m_mapView, SLOT(fwdView())); // connect(m_controlStrip, SIGNAL(stopClicked()), m_mapView, SLOT(stop())); // connect(m_controlStrip, SIGNAL(zoomBestClicked()), m_mapView, SLOT(zoomBest())); // connect(m_controlStrip, SIGNAL(refreshClicked()), m_mapView, SLOT(reload())); // connect(m_controlStrip, SIGNAL(bookmarkClicked()), m_mapView, SIGNAL(menuButtonClicked())); connect(m_controlStrip, SIGNAL(zoomInClicked()), m_mapView, SLOT(zoomIn())); connect(m_controlStrip, SIGNAL(zoomOutClicked()), m_mapView, SLOT(zoomOut())); connect(m_controlStrip, SIGNAL(prefClicked()), SLOT(showPreferencesView())); connect(m_controlStrip, SIGNAL(menuClicked()), SLOT(showMenu())); // m_controlStrip->bookmarkBt->show(); // m_controlStrip->searchBt->show(); // m_controlStrip->editBt->hide(); downSlide(0); // QTimer::singleShot(2000, this, SLOT(showHomeView())); }
DisassemblerView::DisassemblerView(DisassemblerDefinition *disassemblerdefinition, bool canloaddatabase, QHexEditData *hexeditdata, const QString &loadedfile, QLabel *labelinfo, QWidget *parent): AbstractView(hexeditdata, loadedfile, labelinfo, parent), ui(new Ui::DisassemblerView), _worker(nullptr), _listing(nullptr), _stringsymbols(nullptr), _disassembler(disassemblerdefinition), _canloaddatabase(canloaddatabase) { ui->setupUi(this); ui->hSplitter->setStretchFactor(0, 1); ui->functionList->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); ui->functionList->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); ui->tvVariables->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); ui->tvVariables->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); ui->tvStrings->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); ui->tvStrings->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); this->_toolbar = new QToolBar(); this->_toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); this->_toolbar->setEnabled(false); ui->verticalLayout->insertWidget(0, this->_toolbar); this->_actback = this->_toolbar->addAction(QIcon(":/action_icons/res/back.png"), "Back"); this->_actforward = this->_toolbar->addAction(QIcon(":/action_icons/res/forward.png"), "Forward"); this->_actgoto = this->_toolbar->addAction(QIcon(":/action_icons/res/goto.png"), "Goto"); this->_toolbar->addSeparator(); this->_actentrypoints = this->_toolbar->addAction(QIcon(":/action_icons/res/entry.png"), "Entry Points"); this->_actsegments = this->_toolbar->addAction(QIcon(":/action_icons/res/segments.png"), "Segments"); this->_actbookmarks = this->_toolbar->addAction(QIcon(":/action_icons/res/bookmark.png"), "Bookmarks"); this->_actloaddatabase = this->_toolbar->addAction(QIcon(":/signature_database/res/database.png"), "Load Database"); this->_actback->setEnabled(false); this->_actforward->setEnabled(false); this->_actbookmarks->setEnabled(false); this->_actback->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Left)); this->_actforward->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Right)); this->_actgoto->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_G)); this->_actentrypoints->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_E)); this->_actsegments->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_S)); this->_actbookmarks->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_B)); this->createListingMenu(); this->createFunctionsMenu(); this->createVariablesMenu(); this->createStringsMenu(); connect(this->_actback, SIGNAL(triggered()), ui->disassemblerWidget, SLOT(back())); connect(this->_actforward, SIGNAL(triggered()), ui->disassemblerWidget, SLOT(forward())); connect(this->_actgoto, SIGNAL(triggered()), ui->gotoWidget, SLOT(show())); connect(this->_actentrypoints, SIGNAL(triggered()), this, SLOT(showEntryPoints())); connect(this->_actsegments, SIGNAL(triggered()), this, SLOT(showSegments())); connect(this->_actbookmarks, SIGNAL(triggered()), this, SLOT(showBookmarks())); connect(this->_actloaddatabase, SIGNAL(triggered()), this, SLOT(loadDatabase())); connect(ui->gotoWidget, SIGNAL(addressRequested(PrefSDK::DataValue)), this, SLOT(gotoAddress(PrefSDK::DataValue))); connect(ui->bookmarkWidget, SIGNAL(saveBookmarkRequested(Block*,QString)), this, SLOT(onSaveBookmarkRequested(Block*,QString))); connect(ui->renameWidget, SIGNAL(renameRequested(Block*,QString)), this, SLOT(onRenameSymbolRequested(Block*,QString))); connect(ui->disassemblerWidget, SIGNAL(backAvailable(bool)), this->_actback, SLOT(setEnabled(bool))); connect(ui->disassemblerWidget, SIGNAL(forwardAvailable(bool)), this->_actforward, SLOT(setEnabled(bool))); connect(ui->disassemblerWidget, SIGNAL(renameRequested(Block*)), this, SLOT(renameBlock(Block*))); connect(ui->disassemblerWidget, SIGNAL(crossReferenceRequested(Block*)), this, SLOT(showCrossReference(Block*))); connect(ui->disassemblerWidget, SIGNAL(jumpToRequested()), ui->gotoWidget, SLOT(show())); }