]> sigrok.org Git - pulseview.git/blobdiff - pv/devices/inputfile.hpp
Fix a few #include guard inconsistencies.
[pulseview.git] / pv / devices / inputfile.hpp
index 41698e6d6be45638b7d00f24cb139deb9f2c6f6a..165010f717f3cffe067eac15c7a50bcd11d4aa1f 100644 (file)
@@ -17,8 +17,8 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef PULSEVIEW_PV_DEVICE_INPUTFILE_HPP
-#define PULSEVIEW_PV_DEVICE_INPUTFILE_HPP
+#ifndef PULSEVIEW_PV_DEVICES_INPUTFILE_HPP
+#define PULSEVIEW_PV_DEVICES_INPUTFILE_HPP
 
 #include <atomic>
 
@@ -26,6 +26,8 @@
 
 #include "file.hpp"
 
+#include <QSettings>
+
 using std::atomic;
 using std::ifstream;
 using std::map;
@@ -47,6 +49,15 @@ public:
                shared_ptr<sigrok::InputFormat> format,
                const map<string, Glib::VariantBase> &options);
 
+       /**
+        * Constructor that loads a file using the metadata saved by
+        * save_meta_to_settings() before.
+        */
+       InputFile(const shared_ptr<sigrok::Context> &context,
+               QSettings &settings);
+
+       void save_meta_to_settings(QSettings &settings);
+
        void open();
 
        void close();
@@ -59,8 +70,8 @@ public:
 
 private:
        const shared_ptr<sigrok::Context> context_;
-       const shared_ptr<sigrok::InputFormat> format_;
-       const map<string, Glib::VariantBase> options_;
+       shared_ptr<sigrok::InputFormat> format_;
+       map<string, Glib::VariantBase> options_;
        shared_ptr<sigrok::Input> input_;
 
        ifstream *f;
@@ -70,5 +81,5 @@ private:
 } // namespace devices
 } // namespace pv
 
-#endif // PULSEVIEW_PV_SESSIONS_INPUTFILE_HPP
+#endif // PULSEVIEW_PV_DEVICES_INPUTFILE_HPP