]> sigrok.org Git - pulseview.git/blobdiff - pv/session.hpp
Session: Save meta objs for all views
[pulseview.git] / pv / session.hpp
index 345baea49d52b566fe8aaa920f347b8938118982..8af833cd6d84f8acf224480af84040f8296ac5af 100644 (file)
@@ -38,6 +38,7 @@
 #include <QObject>
 #include <QSettings>
 #include <QString>
+#include <QElapsedTimer>
 
 #ifdef ENABLE_FLOW
 #include <gstreamermm.h>
@@ -49,7 +50,6 @@
 
 
 using std::function;
-using std::list;
 using std::map;
 using std::mutex;
 using std::recursive_mutex;
@@ -138,7 +138,7 @@ public:
 
        void set_name(QString name);
 
-       const list< shared_ptr<views::ViewBase> > views() const;
+       const vector< shared_ptr<views::ViewBase> > views() const;
 
        shared_ptr<views::ViewBase> main_view() const;
 
@@ -171,9 +171,12 @@ public:
 
        void set_default_device();
 
-       void load_init_file(const string &file_name, const string &format);
+       bool using_file_device() const;
 
-       void load_file(QString file_name,
+       void load_init_file(const string &file_name, const string &format,
+               const string &setup_file_name);
+
+       void load_file(QString file_name, QString setup_file_name = QString(),
                shared_ptr<sigrok::InputFormat> format = nullptr,
                const map<string, Glib::VariantBase> &options =
                        map<string, Glib::VariantBase>());
@@ -262,8 +265,7 @@ Q_SIGNALS:
 
        void data_received();
 
-       void add_view(const QString &title, views::ViewType type,
-               Session *session);
+       void add_view(views::ViewType type, Session *session);
 
 public Q_SLOTS:
        void on_data_saved();
@@ -277,7 +279,7 @@ private:
        shared_ptr<devices::Device> device_;
        QString default_name_, name_;
 
-       list< shared_ptr<views::ViewBase> > views_;
+       vector< shared_ptr<views::ViewBase> > views_;
        shared_ptr<pv::views::ViewBase> main_view_;
 
        shared_ptr<pv::toolbars::MainBar> main_bar_;
@@ -305,6 +307,8 @@ private:
        bool data_saved_;
        bool frame_began_;
 
+       QElapsedTimer acq_time_;
+
 #ifdef ENABLE_FLOW
        RefPtr<Pipeline> pipeline_;
        RefPtr<Element> source_;