GUI: Implemented custom callstack view paint function #2341
This commit is contained in:
parent
b48b068976
commit
d39b8211de
|
|
@ -58,6 +58,22 @@ void CallStackView::setupContextMenu()
|
|||
mMenuBuilder->loadFromConfig();
|
||||
}
|
||||
|
||||
QString CallStackView::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h)
|
||||
{
|
||||
if(isSelected(rowBase, rowOffset))
|
||||
painter->fillRect(QRect(x, y, w, h), QBrush(mSelectionColor));
|
||||
|
||||
bool isSpaceRow = !getCellContent(rowBase + rowOffset, ColThread).isEmpty();
|
||||
|
||||
if(col > ColThread && isSpaceRow)
|
||||
{
|
||||
auto mid = h / 2.0;
|
||||
painter->drawLine(QPointF(x, y + mid), QPointF(x + w, y + mid));
|
||||
}
|
||||
|
||||
return getCellContent(rowBase + rowOffset, col);
|
||||
}
|
||||
|
||||
void CallStackView::updateCallStack()
|
||||
{
|
||||
if(!DbgFunctions()->GetCallStackByThread)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ public:
|
|||
explicit CallStackView(StdTable* parent = 0);
|
||||
void setupContextMenu();
|
||||
|
||||
protected:
|
||||
QString paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h) override;
|
||||
|
||||
protected slots:
|
||||
void updateCallStack();
|
||||
void contextMenuSlot(const QPoint pos);
|
||||
|
|
|
|||
Loading…
Reference in New Issue