32 using std::shared_ptr;
53 [](
const shared_ptr<ViewItem> &r) {
return r->enabled(); });
92 const QPointF points[] = {
102 Qt::SolidLine, Qt::SquareCap, Qt::RoundJoin));
103 p.setBrush(Qt::transparent);
104 p.drawPolyline(points,
countof(points));
108 Qt::SolidLine, Qt::SquareCap, Qt::RoundJoin));
109 p.drawPolyline(points,
countof(points));
113 p.drawPolyline(points,
countof(points));
119 for (
const shared_ptr<ViewItem>& r :
child_items())
120 if (r && r->enabled())
121 child_rect = child_rect.united(r->label_rect(rect));
123 return QRectF(child_rect.x() -
Width -
Padding, child_rect.y(),
124 Width, child_rect.height());
138 QMenu *
const menu =
new QMenu(parent);
140 QAction *
const ungroup =
new QAction(tr(
"Ungroup"),
this);
141 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 142 ungroup->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_U));
144 ungroup->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_U));
146 connect(ungroup, SIGNAL(triggered()),
this, SLOT(
on_ungroup()));
147 menu->addAction(ungroup);
173 for (
const shared_ptr<TraceTreeItem>& r : items)
int owner_visual_v_offset() const
vector< shared_ptr< TraceTreeItem > > trace_tree_child_items() const
pair< int, int > v_extents() const
void row_item_appearance_changed(bool label, bool content)
TraceTreeItemOwner * owner_
virtual void extents_changed(bool horz, bool vert)=0
void remove_child_item(shared_ptr< TraceTreeItem > item)
virtual Session & session()=0
pv::widgets::Popup * create_popup(QWidget *parent)
QRectF label_rect(const QRectF &rect) const
virtual int owner_visual_v_offset() const =0
int visual_v_offset() const
void add_child_item(shared_ptr< TraceTreeItem > item)
unsigned int depth() const
static QPen highlight_pen()
void extents_changed(bool horz, bool vert)
QMenu * create_header_context_menu(QWidget *parent)
static const int LineThickness
virtual const item_list & child_items() const
bool pt_in_label_rect(int left, int right, const QPoint &point)
virtual unsigned int depth() const =0
pair< int, int > v_extents() const
static const QColor LineColor
void paint_label(QPainter &p, const QRect &rect, bool hover)
virtual void row_item_appearance_changed(bool label, bool content)=0