class SignalBase : public QObject, public enable_shared_from_this<SignalBase>
{
Q_OBJECT
- Q_PROPERTY(QString error_message READ get_error_message)
+ Q_PROPERTY(QString error_message READ get_error_message NOTIFY error_message_changed)
public:
enum ChannelType {
void enabled_changed(const bool &value);
void name_changed(const QString &name);
void color_changed(const QColor &color);
- void error_message_changed(const QString &msg);
+ void error_message_changed(QString msg);
void conversion_type_changed(const ConversionType t);
void samples_cleared();
const QModelIndex& previous)
{
QTreeView::currentChanged(current, previous);
- currentChanged(current);
+
+ current_changed(current);
}
connect(filter, SIGNAL(returnPressed()),
this, SLOT(on_filter_return_pressed()));
- connect(tree_view_, SIGNAL(currentChanged(const QModelIndex&)),
+ connect(tree_view_, SIGNAL(current_changed(const QModelIndex&)),
this, SLOT(on_item_changed(const QModelIndex&)));
connect(tree_view_, SIGNAL(activated(const QModelIndex&)),
this, SLOT(on_item_activated(const QModelIndex&)));
void currentChanged(const QModelIndex& current, const QModelIndex& previous);
Q_SIGNALS:
- void currentChanged(const QModelIndex& current);
+ void current_changed(const QModelIndex& current);
};
class SubWindow : public SubWindowBase
return;
}
- for (const shared_ptr<Decoder>& dec : signal_->decoder_stack())
- disconnect(dec.get(), nullptr, this, SLOT(on_annotation_visibility_changed()));
+ if (signal_)
+ for (const shared_ptr<Decoder>& dec : signal_->decoder_stack())
+ disconnect(dec.get(), nullptr, this, SLOT(on_annotation_visibility_changed()));
all_annotations_ = signal->get_all_annotations_by_segment(current_segment);
signal_ = signal;
if (signals_.size() == 0)
return make_pair(0, 0);
- for (shared_ptr<Signal> s : signals_)
+ for (const shared_ptr<Signal>& s : signals_)
if (s->base()->data() && (s->base()->data()->segments().size() > 0))
data.push_back(s->base()->data());