From: Soeren Apel Date: Thu, 2 Aug 2018 07:08:57 +0000 (+0200) Subject: Rename create_context_menu() to create_header_context_menu() X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9e773fecf2d4ab8f2fc6e1cc880b9102c22ec228;p=pulseview.git Rename create_context_menu() to create_header_context_menu() --- diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp index 208185ac..9eeea1c2 100644 --- a/pv/views/trace/decodetrace.cpp +++ b/pv/views/trace/decodetrace.cpp @@ -307,9 +307,9 @@ void DecodeTrace::populate_popup_form(QWidget *parent, QFormLayout *form) form->addRow(stack_button_box); } -QMenu* DecodeTrace::create_context_menu(QWidget *parent) +QMenu* DecodeTrace::create_header_context_menu(QWidget *parent) { - QMenu *const menu = Trace::create_context_menu(parent); + QMenu *const menu = Trace::create_header_context_menu(parent); menu->addSeparator(); diff --git a/pv/views/trace/decodetrace.hpp b/pv/views/trace/decodetrace.hpp index deda663e..4d9e59c1 100644 --- a/pv/views/trace/decodetrace.hpp +++ b/pv/views/trace/decodetrace.hpp @@ -118,7 +118,7 @@ public: void populate_popup_form(QWidget *parent, QFormLayout *form); - QMenu* create_context_menu(QWidget *parent); + QMenu* create_header_context_menu(QWidget *parent); void delete_pressed(); diff --git a/pv/views/trace/flag.cpp b/pv/views/trace/flag.cpp index 1cdaea84..64ef1047 100644 --- a/pv/views/trace/flag.cpp +++ b/pv/views/trace/flag.cpp @@ -81,7 +81,7 @@ pv::widgets::Popup* Flag::create_popup(QWidget *parent) return popup; } -QMenu* Flag::create_context_menu(QWidget *parent) +QMenu* Flag::create_header_context_menu(QWidget *parent) { QMenu *const menu = new QMenu(parent); diff --git a/pv/views/trace/flag.hpp b/pv/views/trace/flag.hpp index 150d37e8..4bf6ebd5 100644 --- a/pv/views/trace/flag.hpp +++ b/pv/views/trace/flag.hpp @@ -69,7 +69,7 @@ public: pv::widgets::Popup* create_popup(QWidget *parent); - QMenu* create_context_menu(QWidget *parent); + QMenu* create_header_context_menu(QWidget *parent); void delete_pressed(); diff --git a/pv/views/trace/header.cpp b/pv/views/trace/header.cpp index 10fc7eb9..c5510fcb 100644 --- a/pv/views/trace/header.cpp +++ b/pv/views/trace/header.cpp @@ -125,7 +125,7 @@ void Header::contextMenuEvent(QContextMenuEvent *event) if (!r) return; - QMenu *menu = r->create_context_menu(this); + QMenu *menu = r->create_header_context_menu(this); if (!menu) menu = new QMenu(this); diff --git a/pv/views/trace/marginwidget.cpp b/pv/views/trace/marginwidget.cpp index fa12c2b5..7b750357 100644 --- a/pv/views/trace/marginwidget.cpp +++ b/pv/views/trace/marginwidget.cpp @@ -57,7 +57,7 @@ void MarginWidget::contextMenuEvent(QContextMenuEvent *event) if (!r) return; - QMenu *menu = r->create_context_menu(this); + QMenu *menu = r->create_header_context_menu(this); if (menu) menu->exec(event->globalPos()); } diff --git a/pv/views/trace/signal.cpp b/pv/views/trace/signal.cpp index d9a7a084..0c0cde05 100644 --- a/pv/views/trace/signal.cpp +++ b/pv/views/trace/signal.cpp @@ -130,9 +130,9 @@ void Signal::populate_popup_form(QWidget *parent, QFormLayout *form) add_color_option(parent, form); } -QMenu* Signal::create_context_menu(QWidget *parent) +QMenu* Signal::create_header_context_menu(QWidget *parent) { - QMenu *const menu = Trace::create_context_menu(parent); + QMenu *const menu = Trace::create_header_context_menu(parent); menu->addSeparator(); diff --git a/pv/views/trace/signal.hpp b/pv/views/trace/signal.hpp index 7f88720f..1c53d8b2 100644 --- a/pv/views/trace/signal.hpp +++ b/pv/views/trace/signal.hpp @@ -83,7 +83,7 @@ public: virtual void populate_popup_form(QWidget *parent, QFormLayout *form); - QMenu* create_context_menu(QWidget *parent); + QMenu* create_header_context_menu(QWidget *parent); void delete_pressed(); diff --git a/pv/views/trace/trace.cpp b/pv/views/trace/trace.cpp index 3b79dcd9..8c450a08 100644 --- a/pv/views/trace/trace.cpp +++ b/pv/views/trace/trace.cpp @@ -149,9 +149,9 @@ void Trace::paint_label(QPainter &p, const QRect &rect, bool hover) Qt::AlignCenter | Qt::AlignVCenter, base_->name()); } -QMenu* Trace::create_context_menu(QWidget *parent) +QMenu* Trace::create_header_context_menu(QWidget *parent) { - QMenu *const menu = ViewItem::create_context_menu(parent); + QMenu *const menu = ViewItem::create_header_context_menu(parent); return menu; } diff --git a/pv/views/trace/trace.hpp b/pv/views/trace/trace.hpp index bc97736c..0c493d72 100644 --- a/pv/views/trace/trace.hpp +++ b/pv/views/trace/trace.hpp @@ -117,7 +117,7 @@ public: */ virtual void paint_label(QPainter &p, const QRect &rect, bool hover); - virtual QMenu* create_context_menu(QWidget *parent); + virtual QMenu* create_header_context_menu(QWidget *parent); pv::widgets::Popup* create_popup(QWidget *parent); diff --git a/pv/views/trace/tracegroup.cpp b/pv/views/trace/tracegroup.cpp index 6df8f650..a639ce9c 100644 --- a/pv/views/trace/tracegroup.cpp +++ b/pv/views/trace/tracegroup.cpp @@ -133,7 +133,7 @@ bool TraceGroup::pt_in_label_rect(int left, int right, const QPoint &point) return false; } -QMenu* TraceGroup::create_context_menu(QWidget *parent) +QMenu* TraceGroup::create_header_context_menu(QWidget *parent) { QMenu *const menu = new QMenu(parent); diff --git a/pv/views/trace/tracegroup.hpp b/pv/views/trace/tracegroup.hpp index a1cc6fdc..4a793665 100644 --- a/pv/views/trace/tracegroup.hpp +++ b/pv/views/trace/tracegroup.hpp @@ -102,7 +102,7 @@ public: */ bool pt_in_label_rect(int left, int right, const QPoint &point); - QMenu* create_context_menu(QWidget *parent); + QMenu* create_header_context_menu(QWidget *parent); pv::widgets::Popup* create_popup(QWidget *parent); diff --git a/pv/views/trace/viewitem.cpp b/pv/views/trace/viewitem.cpp index 7c1fae73..ee0720ea 100644 --- a/pv/views/trace/viewitem.cpp +++ b/pv/views/trace/viewitem.cpp @@ -82,7 +82,7 @@ QRectF ViewItem::hit_box_rect(const ViewItemPaintParams &pp) const return QRectF(); } -QMenu* ViewItem::create_context_menu(QWidget *parent) +QMenu* ViewItem::create_header_context_menu(QWidget *parent) { context_parent_ = parent; return new QMenu(parent); diff --git a/pv/views/trace/viewitem.hpp b/pv/views/trace/viewitem.hpp index 91242f57..e07b26b8 100644 --- a/pv/views/trace/viewitem.hpp +++ b/pv/views/trace/viewitem.hpp @@ -155,7 +155,7 @@ public: static QColor select_text_color(QColor background); public: - virtual QMenu* create_context_menu(QWidget *parent); + virtual QMenu* create_header_context_menu(QWidget *parent); virtual QMenu* create_view_context_menu(QWidget *parent);