X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fanalogsignal.cpp;h=3291c1615f4fb253048ae36468fc191a04c3840a;hp=fbffb2ebb0061b7a05af272d5647fe45c37b229b;hb=efdec55aec1a137460fa362a381ed1904182bfed;hpb=cbd2a2de848f957507096785d3be1cc97d30df9a
diff --git a/pv/view/analogsignal.cpp b/pv/view/analogsignal.cpp
index fbffb2e..3291c16 100644
--- a/pv/view/analogsignal.cpp
+++ b/pv/view/analogsignal.cpp
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
#include
@@ -48,7 +47,8 @@ using std::shared_ptr;
using std::deque;
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
const QColor AnalogSignal::SignalColours[4] = {
QColor(0xC4, 0xA0, 0x00), // Yellow
@@ -88,6 +88,23 @@ shared_ptr AnalogSignal::data() const
return base_->analog_data();
}
+void AnalogSignal::save_settings(QSettings &settings) const
+{
+ settings.setValue("vdivs", vdivs_);
+ settings.setValue("scale_index", scale_index_);
+}
+
+void AnalogSignal::restore_settings(QSettings &settings)
+{
+ if (settings.contains("vdivs"))
+ vdivs_ = settings.value("vdivs").toInt();
+
+ if (settings.contains("scale_index")) {
+ scale_index_ = settings.value("scale_index").toInt();
+ update_scale();
+ }
+}
+
std::pair AnalogSignal::v_extents() const
{
const int h = vdivs_ * div_height_;
@@ -368,5 +385,6 @@ void AnalogSignal::on_resolution_changed(int index)
owner_->row_item_appearance_changed(false, true);
}
-} // namespace view
+} // namespace TraceView
+} // namespace views
} // namespace pv