]> sigrok.org Git - pulseview.git/commitdiff
Removed Name and Colour dialogs from context menu
authorJoel Holdsworth <redacted>
Sat, 5 Oct 2013 12:07:56 +0000 (13:07 +0100)
committerJoel Holdsworth <redacted>
Sun, 13 Oct 2013 10:05:23 +0000 (11:05 +0100)
pv/view/trace.cpp
pv/view/trace.h

index de036a941820dd256a1429f1545175cada6058de..19fea812dcf7bf03d1cc336218664ded24b51476 100644 (file)
@@ -23,9 +23,6 @@
 #include <assert.h>
 #include <math.h>
 
-#include <QColorDialog>
-#include <QInputDialog>
-
 #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);
index 0b9c509aeda37e2f7e017ec1ffda7d0c7e1d6131..05adf6cf58b1b579d9b5e969bef33bb1175c8e21 100644 (file)
@@ -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);