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

View File

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