From: Joel Holdsworth Date: Sat, 5 Oct 2013 12:07:56 +0000 (+0100) Subject: Removed Name and Colour dialogs from context menu X-Git-Tag: pulseview-0.2.0~261 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bda016e024cb6785fc4d0b49e60aa7bcbd7fba95;p=pulseview.git Removed Name and Colour dialogs from context menu --- diff --git a/pv/view/trace.cpp b/pv/view/trace.cpp index de036a94..19fea812 100644 --- a/pv/view/trace.cpp +++ b/pv/view/trace.cpp @@ -23,9 +23,6 @@ #include #include -#include -#include - #include "trace.h" #include "tracepalette.h" #include "view.h" @@ -173,16 +170,6 @@ QMenu* Trace::create_context_menu(QWidget *parent) { QMenu *const menu = SelectableItem::create_context_menu(parent); - QAction *const set_name = new QAction(tr("Set &Name..."), this); - connect(set_name, SIGNAL(triggered()), - this, SLOT(on_action_set_name_triggered())); - menu->addAction(set_name); - - QAction *const set_colour = new QAction(tr("Set &Colour..."), this); - connect(set_colour, SIGNAL(triggered()), - this, SLOT(on_action_set_colour_triggered())); - menu->addAction(set_colour); - return menu; } @@ -260,27 +247,6 @@ QRectF Trace::get_label_rect(int right) label_size.width(), label_size.height()); } -void Trace::on_action_set_name_triggered() -{ - bool ok = false; - - const QString new_label = QInputDialog::getText(_context_parent, - tr("Set Name"), tr("Name"), QLineEdit::Normal, get_name(), - &ok); - - if (ok) - set_name(new_label); -} - -void Trace::on_action_set_colour_triggered() -{ - const QColor new_colour = QColorDialog::getColor( - get_colour(), _context_parent, tr("Set Colour")); - - if (new_colour.isValid()) - set_colour(new_colour); -} - void Trace::on_text_changed(const QString &text) { set_name(text); diff --git a/pv/view/trace.h b/pv/view/trace.h index 0b9c509a..05adf6cf 100644 --- a/pv/view/trace.h +++ b/pv/view/trace.h @@ -179,10 +179,6 @@ private: QRectF get_label_rect(int right); private slots: - void on_action_set_name_triggered(); - - void on_action_set_colour_triggered(); - void on_text_changed(const QString &text); void on_colour_changed(const QColor &colour);