shared_ptr<data::SignalBase> channel) :
Trace(channel),
session_(session),
- name_widget_(nullptr),
- current_segment_(0)
+ name_widget_(nullptr)
{
assert(base_);
return base_;
}
-void Signal::set_current_segment(const int segment)
-{
- current_segment_ = segment;
-}
-
-int Signal::get_current_segment() const
-{
- return current_segment_;
-}
-
void Signal::save_settings(QSettings &settings) const
{
(void)settings;
shared_ptr<data::SignalBase> base() const;
- void set_current_segment(const int segment);
-
- int get_current_segment() const;
-
virtual void save_settings(QSettings &settings) const;
virtual void restore_settings(QSettings &settings);
pv::Session &session_;
QComboBox *name_widget_;
-
- /// The ID of the currently displayed segment
- int current_segment_;
};
} // namespace trace
base_(channel),
axis_pen_(AxisPen),
segment_display_mode_(ShowLastSegmentOnly), // Will be overwritten by View
+ current_segment_(0),
popup_(nullptr),
popup_form_(nullptr)
{
label_size.height());
}
+void Trace::set_current_segment(const int segment)
+{
+ current_segment_ = segment;
+}
+
+int Trace::get_current_segment() const
+{
+ return current_segment_;
+}
+
void Trace::paint_back(QPainter &p, ViewItemPaintParams &pp)
{
const View *view = owner_->view();
*/
QRectF label_rect(const QRectF &rect) const;
+ void set_current_segment(const int segment);
+
+ int get_current_segment() const;
+
protected:
/**
* Paints the background layer of the signal with a QPainter.
SegmentDisplayMode segment_display_mode_;
+ /// The ID of the currently displayed segment
+ int current_segment_;
+
private:
pv::widgets::Popup *popup_;
QFormLayout *popup_form_;