26 #include <QApplication>
27 #include <QFormLayout>
32 #include <libsigrokcxx/libsigrokcxx.hpp>
37 using std::shared_ptr;
38 using std::make_shared;
40 using sigrok::Channel;
63 std::shared_ptr<sigrok::Channel> channel) :
64 Trace(QString::fromUtf8(channel->name().c_str())),
83 channel_->set_name(name.toUtf8().constData());
121 for (
unsigned int i = 0; i <
countof(ChannelNames); i++)
133 connect(
name_widget_, SIGNAL(editTextChanged(
const QString&)),
145 menu->addSeparator();
147 QAction *
const disable =
new QAction(tr(
"Disable"),
this);
148 disable->setShortcuts(QKeySequence::Delete);
149 connect(disable, SIGNAL(triggered()),
this, SLOT(
on_disable()));
150 menu->addAction(disable);
std::vector< std::shared_ptr< ViewItem > > item_list
virtual QMenu * create_context_menu(QWidget *parent)
std::shared_ptr< sigrok::Channel > channel() const
void paint_back(QPainter &p, const ViewItemPaintParams &pp)
Signal(pv::Session &session, std::shared_ptr< sigrok::Channel > channel)
QMenu * create_context_menu(QWidget *parent)
virtual void extents_changed(bool horz, bool vert)=0
void set_name(QString name)
virtual void set_name(QString name)
virtual void populate_popup_form(QWidget *parent, QFormLayout *form)
std::shared_ptr< sigrok::Channel > channel_
const char *const ChannelNames[]
const item_list & child_items() const
void add_colour_option(QWidget *parent, QFormLayout *form)
void on_text_changed(const QString &text)
const std::shared_ptr< SignalScaleHandle > scale_handle_
TraceTreeItemOwner * owner_
virtual void paint_back(QPainter &p, const ViewItemPaintParams &pp)
void enable(bool enable=true)