From e1aa29bd3a7ffa8f2fc2148a6108d31590002de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Fri, 11 Oct 2019 19:50:58 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/libs@618 a8b55f48-bf90-11e4-a774-851b48703e85 --- qglview/qglview.cpp | 15 +++++++++++++++ qglview/qglview.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/qglview/qglview.cpp b/qglview/qglview.cpp index 57c9bd9..81be514 100644 --- a/qglview/qglview.cpp +++ b/qglview/qglview.cpp @@ -825,3 +825,18 @@ void QGLView::restoreCamera(const QByteArray &ba) { camera()->setAngles(ang); } + +QByteArray QGLView::saveFeatures() { + QByteArray ba; + QDataStream ds(&ba, QIODevice::WriteOnly); + ds << features_; +} + + +void QGLView::restoreFeatures(const QByteArray & ba) { + QHash f; + QDataStream ds(ba); + ds >> f; + features_ = f; +} + diff --git a/qglview/qglview.h b/qglview/qglview.h index 03c9bdc..9ebb53b 100644 --- a/qglview/qglview.h +++ b/qglview/qglview.h @@ -174,6 +174,8 @@ public: void glReleaseTextures(int channels = 8); QByteArray saveCamera(); void restoreCamera(const QByteArray & ba); + QByteArray saveFeatures(); + void restoreFeatures(const QByteArray & ba); GLfloat aspect, iaspect;