MCPcopy Create free account
hub / github.com/baldurk/renderdoc / EventBrowser

Method EventBrowser

qrenderdoc/Windows/EventBrowser.cpp:3768–3992  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3766}
3767
3768EventBrowser::EventBrowser(ICaptureContext &ctx, QWidget *parent)
3769 : QFrame(parent), ui(new Ui::EventBrowser), m_Ctx(ctx)
3770{
3771 ui->setupUi(this);
3772
3773 m_ParseError = new ParseErrorTipLabel(ui->filterExpression);
3774 m_ParseTrace = new ParseTrace;
3775
3776 clearBookmarks();
3777
3778 m_Model = new EventItemModel(ui->events, m_Ctx);
3779 m_FilterModel = new EventFilterModel(m_Model, m_Ctx);
3780
3781 ui->events->setModel(m_FilterModel);
3782
3783 m_delegate = new RichTextViewDelegate(ui->events);
3784 ui->events->setItemDelegate(m_delegate);
3785
3786 ui->find->setFont(Formatter::PreferredFont());
3787 ui->events->setFont(Formatter::PreferredFont());
3788
3789 ui->events->setHeader(new RDHeaderView(Qt::Horizontal, this));
3790 ui->events->header()->setStretchLastSection(true);
3791 ui->events->header()->setDefaultAlignment(Qt::AlignLeft | Qt::AlignVCenter);
3792
3793 // we set up the name column as column 0 so that it gets the tree controls.
3794 ui->events->header()->setSectionResizeMode(COL_NAME, QHeaderView::Interactive);
3795 ui->events->header()->setSectionResizeMode(COL_EID, QHeaderView::Interactive);
3796 ui->events->header()->setSectionResizeMode(COL_ACTION, QHeaderView::Interactive);
3797 ui->events->header()->setSectionResizeMode(COL_DURATION, QHeaderView::Interactive);
3798 ui->events->header()->setSectionResizeMode(COL_ANNOTATION, QHeaderView::Interactive);
3799
3800 ui->events->header()->setMinimumSectionSize(40);
3801
3802 ui->events->header()->setSectionsMovable(true);
3803
3804 ui->events->header()->setCascadingSectionResizes(false);
3805
3806 ui->events->setItemVerticalMargin(0);
3807 ui->events->setIgnoreIconSize(true);
3808
3809 ui->events->setColoredTreeLineWidth(3.0f);
3810
3811 // set up default section layout. This will be overridden in restoreState()
3812 ui->events->header()->resizeSection(COL_EID, 80);
3813 ui->events->header()->resizeSection(COL_ACTION, 60);
3814 ui->events->header()->resizeSection(COL_NAME, 200);
3815 ui->events->header()->resizeSection(COL_DURATION, 80);
3816 ui->events->header()->resizeSection(COL_ANNOTATION, 100);
3817
3818 ui->events->header()->hideSection(COL_ACTION);
3819 ui->events->header()->hideSection(COL_DURATION);
3820 ui->events->header()->hideSection(COL_ANNOTATION);
3821
3822 ui->events->header()->moveSection(COL_NAME, 2);
3823
3824 UpdateDurationColumn();
3825

Callers

nothing calls this directly

Calls 15

connectFunction · 0.85
QMarginsClass · 0.85
textEditControlFunction · 0.85
headerMethod · 0.80
setItemVerticalMarginMethod · 0.80
setIgnoreIconSizeMethod · 0.80
resizeSectionMethod · 0.80
hideSectionMethod · 0.80
setSingleShotMethod · 0.80
setSizePolicyMethod · 0.80
RegisterShortcutMethod · 0.80

Tested by

no test coverage detected