]> sigrok.org Git - pulseview.git/blame - pv/dialogs/storeprogress.hpp
TraceView: Center traces more than once
[pulseview.git] / pv / dialogs / storeprogress.hpp
CommitLineData
0fbda3c2
JH
1/*
2 * This file is part of the PulseView project.
3 *
4 * Copyright (C) 2014 Joel Holdsworth <joel@airwebreathe.org.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
efdec55a 17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
0fbda3c2
JH
18 */
19
7a01bd36
JH
20#ifndef PULSEVIEW_PV_DIALOGS_SAVEPROGRESS_HPP
21#define PULSEVIEW_PV_DIALOGS_SAVEPROGRESS_HPP
0fbda3c2 22
f9abf97e 23#include <memory>
0fbda3c2
JH
24#include <set>
25
0fbda3c2
JH
26#include <QProgressDialog>
27
2acdb232 28#include <pv/storesession.hpp>
0fbda3c2
JH
29
30namespace pv {
31
2b81ae46 32class Session;
0fbda3c2
JH
33
34namespace dialogs {
35
36class StoreProgress : public QProgressDialog
37{
38 Q_OBJECT
39
40public:
4764bc4d
JH
41 StoreProgress(const QString &file_name,
42 const std::shared_ptr<sigrok::OutputFormat> output_format,
e93f5538 43 const std::map<std::string, Glib::VariantBase> &options,
d2fc6be9
SA
44 const std::pair<uint64_t, uint64_t> sample_range,
45 const Session &session,
46 QWidget *parent = 0);
0fbda3c2
JH
47
48 virtual ~StoreProgress();
49
50 void run();
51
52private:
53 void show_error();
54
55 void closeEvent(QCloseEvent*);
56
e9213170 57private Q_SLOTS:
0fbda3c2
JH
58 void on_progress_updated();
59
60private:
8dbbc7f0 61 pv::StoreSession session_;
0fbda3c2
JH
62};
63
64} // dialogs
65} // pv
66
7a01bd36 67#endif // PULSEVIEW_PV_DIALOGS_SAVEPROGRESS_HPP