Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3f69d67a7cad
Choose a base ref
...
head repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bd4cef381402
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jun 12, 2020

  1. Copy the full SHA
    bd4cef3 View commit details
Showing with 17 additions and 0 deletions.
  1. +15 −0 glscopeclient/ChannelPropertiesDialog.cpp
  2. +2 −0 glscopeclient/ChannelPropertiesDialog.h
15 changes: 15 additions & 0 deletions glscopeclient/ChannelPropertiesDialog.cpp
Original file line number Diff line number Diff line change
@@ -83,6 +83,18 @@ ChannelPropertiesDialog::ChannelPropertiesDialog(
m_grid.attach_next_to(m_channelColorButton, m_channelColorLabel, Gtk::POS_RIGHT, 1, 1);
m_channelColorButton.set_color(Gdk::Color(chan->m_displaycolor));

//Deskew - only on physical analog channels for now
if(chan->IsPhysicalChannel() && chan->GetType() == (OscilloscopeChannel::CHANNEL_TYPE_ANALOG) )
{
m_grid.attach_next_to(m_deskewLabel, m_channelColorLabel, Gtk::POS_BOTTOM, 1, 1);
m_deskewLabel.set_text("Deskew");
m_deskewLabel.set_halign(Gtk::ALIGN_START);
m_grid.attach_next_to(m_deskewEntry, m_deskewLabel, Gtk::POS_RIGHT, 1, 1);

Unit unit(Unit::UNIT_PS);
m_deskewEntry.set_text(unit.PrettyPrint(chan->GetDeskew()));
}

show_all();
}

@@ -98,6 +110,9 @@ void ChannelPropertiesDialog::ConfigureChannel()
{
m_chan->m_displayname = m_channelDisplayNameEntry.get_text();
m_chan->m_displaycolor = m_channelColorButton.get_color().to_string();

Unit unit(Unit::UNIT_PS);
m_chan->SetDeskew(unit.ParseString(m_deskewEntry.get_text()));
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 changes: 2 additions & 0 deletions glscopeclient/ChannelPropertiesDialog.h
Original file line number Diff line number Diff line change
@@ -57,6 +57,8 @@ class ChannelPropertiesDialog : public Gtk::Dialog
Gtk::Entry m_channelDisplayNameEntry;
Gtk::Label m_channelColorLabel;
Gtk::ColorButton m_channelColorButton;
Gtk::Label m_deskewLabel;
Gtk::Entry m_deskewEntry;

OscilloscopeChannel* m_chan;
};