1
0
Fork 0

No popups for some views

This commit is contained in:
torusrxxx 2018-10-13 17:13:00 +08:00
parent 594319a654
commit 64db2ce66b
No known key found for this signature in database
GPG Key ID: A795C73A0F1CFADD
8 changed files with 21 additions and 0 deletions

View File

@ -1002,6 +1002,8 @@ void AbstractStdTable::reloadData()
duint AbstractStdTable::getDisassemblyPopupAddress(int mousex, int mousey)
{
if(bNoDisassemblyPopup) //No disassembly popup is meaningful for this table
return 0;
int c = getColumnIndexFromX(mousex);
int r = getTableOffset() + getIndexOffsetFromY(transY(mousey));
if(r < getRowCount())

View File

@ -68,6 +68,11 @@ public:
bAddressLabel = addressLabel;
}
bool noDisassemblyPopup(bool noPopups = true)
{
return bNoDisassemblyPopup = noPopups;
}
signals:
void selectionChangedSignal(int index);
void keyPressedSignal(QKeyEvent* event);
@ -136,4 +141,5 @@ protected:
QString mHighlightText;
int mAddressColumn = -1;
bool bAddressLabel = true;
bool bNoDisassemblyPopup = false;
};

View File

@ -115,6 +115,12 @@ void StdSearchListView::setSearchStartCol(int col)
mSearchStartCol = col;
}
bool StdSearchListView::noDisassemblyPopup(bool noPopups)
{
stdList()->noDisassemblyPopup(noPopups);
return stdSearchList()->noDisassemblyPopup(noPopups);
}
StdTable* StdSearchListView::stdList()
{
return mSearchListData->mList;

View File

@ -20,6 +20,7 @@ public:
void enableMultiSelection(bool enabled);
void setAddressColumn(int col, bool cipBase = false);
void loadColumnFromConfig(const QString & viewName);
bool noDisassemblyPopup(bool noPopups = true);
public slots:
virtual void setRowCount(dsint count);

View File

@ -17,6 +17,7 @@ HandlesView::HandlesView(QWidget* parent) : QWidget(parent)
mHandlesTable->setInternalTitle("Handles");
mHandlesTable->mSearchStartCol = 0;
mHandlesTable->setDrawDebugOnly(true);
mHandlesTable->noDisassemblyPopup();
int wCharWidth = mHandlesTable->getCharWidth();
mHandlesTable->addColumnAt(8 + 16 * wCharWidth, tr("Type"), true);
mHandlesTable->addColumnAt(8 + 8 * wCharWidth, tr("Type number"), true);
@ -48,6 +49,7 @@ HandlesView::HandlesView(QWidget* parent) : QWidget(parent)
mTcpConnectionsTable->setInternalTitle("TcpConnections");
mTcpConnectionsTable->setSearchStartCol(0);
mTcpConnectionsTable->setDrawDebugOnly(true);
mTcpConnectionsTable->noDisassemblyPopup();
wCharWidth = mTcpConnectionsTable->getCharWidth();
mTcpConnectionsTable->addColumnAt(8 + 64 * wCharWidth, tr("Remote address"), true);
mTcpConnectionsTable->addColumnAt(8 + 64 * wCharWidth, tr("Local address"), true);
@ -67,6 +69,7 @@ HandlesView::HandlesView(QWidget* parent) : QWidget(parent)
mPrivilegesTable = new StdTable(this);
mPrivilegesTable->setWindowTitle("Privileges");
mPrivilegesTable->setDrawDebugOnly(true);
mPrivilegesTable->noDisassemblyPopup();
mPrivilegesTable->setContextMenuPolicy(Qt::CustomContextMenu);
mPrivilegesTable->addColumnAt(8 + 32 * wCharWidth, tr("Privilege"), true);
mPrivilegesTable->addColumnAt(8 + 16 * wCharWidth, tr("State"), true);

View File

@ -20,6 +20,7 @@ MemoryMapView::MemoryMapView(StdTable* parent)
{
setDrawDebugOnly(true);
enableMultiSelection(true);
noDisassemblyPopup();
int charwidth = getCharWidth();

View File

@ -16,6 +16,7 @@ ScriptView::ScriptView(StdTable* parent) : StdTable(parent)
enableMultiSelection(false);
enableColumnSorting(false);
setDrawDebugOnly(false);
noDisassemblyPopup();
int charwidth = getCharWidth();

View File

@ -100,6 +100,7 @@ SymbolView::SymbolView(QWidget* parent) : QWidget(parent), ui(new Ui::SymbolView
mModuleList->setSearchStartCol(0);
mModuleList->enableMultiSelection(true);
mModuleList->setAddressColumn(0, true);
mModuleList->noDisassemblyPopup();
int charwidth = mModuleList->getCharWidth();
mModuleList->addColumnAt(charwidth * 2 * sizeof(dsint) + 8, tr("Base"), true);
mModuleList->addColumnAt(300, tr("Module"), true);