1
0
Fork 0

GUI: updated reference view

This commit is contained in:
Mr. eXoDia 2014-07-05 17:11:01 +02:00
parent 5bb9801527
commit 64c2acd392
2 changed files with 17 additions and 1 deletions

View File

@ -24,7 +24,7 @@ ReferenceView::ReferenceView()
connect(Bridge::getBridge(), SIGNAL(referenceSetProgress(int)), mSearchProgress, SLOT(setValue(int)));
connect(Bridge::getBridge(), SIGNAL(referenceSetSearchStartCol(int)), this, SLOT(setSearchStartCol(int)));
connect(this, SIGNAL(listContextMenuSignal(QMenu*)), this, SLOT(referenceContextMenu(QMenu*)));
connect(this, SIGNAL(enterPressedSignal()), this, SLOT(followAddress()));
connect(this, SIGNAL(enterPressedSignal()), this, SLOT(followGenericAddress()));
setupContextMenu();
}
@ -49,6 +49,11 @@ void ReferenceView::addColumnAt(int width, QString title)
else
width=0;
mSearchBox->setText("");
if(title.toLower() == "&data&")
{
mFollowDumpDefault=true;
title="Data";
}
mList->addColumnAt(width, title, true);
mSearchList->addColumnAt(width, title, true);
}
@ -71,6 +76,7 @@ void ReferenceView::deleteAllColumns()
mSearchList->deleteAllColumns();
mSearchList->reloadData();
mSearchStartCol = 1;
mFollowDumpDefault = false;
}
void ReferenceView::setCellContent(int r, int c, QString s)
@ -124,3 +130,11 @@ void ReferenceView::followDumpAddress()
DbgCmdExecDirect(QString("dump " + this->mCurList->getCellContent(this->mCurList->getInitialSelection(), 0)).toUtf8().constData());
emit showCpu();
}
void ReferenceView::followGenericAddress()
{
if(mFollowDumpDefault)
followDumpAddress();
else
followAddress();
}

View File

@ -26,6 +26,7 @@ private slots:
void referenceContextMenu(QMenu* wMenu);
void followAddress();
void followDumpAddress();
void followGenericAddress();
signals:
void showCpu();
@ -34,6 +35,7 @@ private:
QProgressBar* mSearchProgress;
QAction* mFollowAddress;
QAction* mFollowDumpAddress;
bool mFollowDumpDefault;
};
#endif // REFERENCEVIEW_H