bool Grid::isCellOccupied(TileOfCell *cell) { if (cell) { return ( getCellContent(cell)!= nullptr); }else { return false; } }
void CallStackView::setupContextMenu() { mMenuBuilder = new MenuBuilder(this, [](QMenu*) { return DbgIsDebugging(); }); QIcon icon = DIcon(ArchValue("processor32.png", "processor64.png")); mMenuBuilder->addAction(makeAction(icon, tr("Follow &Address"), SLOT(followAddress()))); QAction* mFollowTo = mMenuBuilder->addAction(makeAction(icon, tr("Follow &To"), SLOT(followTo()))); mFollowTo->setShortcutContext(Qt::WidgetShortcut); mFollowTo->setShortcut(QKeySequence("enter")); connect(this, SIGNAL(enterPressedSignal()), this, SLOT(followTo())); mMenuBuilder->addAction(makeAction(icon, tr("Follow &From"), SLOT(followFrom())), [this](QMenu*) { return !getCellContent(getInitialSelection(), 2).isEmpty(); }); MenuBuilder* mCopyMenu = new MenuBuilder(this); setupCopyMenu(mCopyMenu); // Column count cannot be zero mMenuBuilder->addSeparator(); mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), mCopyMenu); mMenuBuilder->loadFromConfig(); }
void CallStackView::followFrom() { QString addrText = getCellContent(getInitialSelection(), 2); DbgCmdExecDirect(QString("disasm " + addrText).toUtf8().constData()); }
void CallStackView::followAddress() { QString addrText = getCellContent(getInitialSelection(), 0); DbgCmdExecDirect(QString("sdump " + addrText).toUtf8().constData()); }
bool Grid::isCellOccupied(int x, int y) { return (getCellContent(x,y)!=nullptr); }