31 using sigrok::InputFormat;
34 using std::out_of_range;
36 using std::shared_ptr;
37 using std::streamsize;
52 const string &file_name,
53 shared_ptr<sigrok::InputFormat>
format,
54 const map<string, Glib::VariantBase> &
options) :
69 file_name_ = settings.value(
"filename").toString().toStdString();
71 QString format_name = settings.value(
"format").toString();
74 const map<string, shared_ptr<InputFormat> > formats = context->input_formats();
77 format_ = formats.at(format_name.toStdString());
80 int options = settings.value(
"options").toInt();
82 for (
int i = 0; i <
options; i++) {
83 settings.beginGroup(
"option" + QString::number(i));
84 QString name = settings.value(
"name").toString();
89 }
catch (out_of_range&) {
90 qWarning() <<
"Could not find input format" << format_name <<
91 "needed to restore session input file";
97 settings.setValue(
"filename", QString::fromStdString(
file_name_));
99 settings.setValue(
"format", QString::fromStdString(
format_->name()));
101 settings.setValue(
"options", (
int)
options_.size());
104 for (
const pair<const string, Glib::VariantBase>&
option :
options_) {
105 settings.beginGroup(
"option" + QString::number(i));
106 settings.setValue(
"name", QString::fromStdString(
option.first));
126 throw QString(
"Failed to create input");
135 const streamsize size =
f->gcount();
138 throw QString(
"Failed to read file");
140 input_->send(buffer.data(), size);
144 }
catch (sigrok::Error&
e) {
177 const streamsize size =
f->gcount();
181 input_->send(buffer.data(), size);
libsigrok allows users to import and export data from files in various formats some of them as generic as others very specific For a list and make sure to check not so common and outright exotic ways to represent data and sigrok tries to suit as many needs as it can To see which formats your version of PulseView just click on the small arrow next to the _Open_ PulseView will ask for the file name to open Once you picked the you may be asked to specify the details of the format
CMake option(DISABLE_WERROR"Build without -Werror"TRUE) option(ENABLE_SIGNALS"Build with UNIX signals"TRUE) option(ENABLE_STACKTRACE"Enable stack trace when crashing"FALSE) option(ENABLE_DECODE"Build with libsigrokdecode"TRUE) option(ENABLE_FLOW"Build with libsigrokflow"FALSE) option(ENABLE_TESTS"Enable unit tests"FALSE) option(STATIC_PKGDEPS_LIBS"Statically link to (pkg-config) libraries"FALSE) option(ENABLE_TS_UPDATE"Update .ts source files (Qt l10n)"FALSE) if(WIN32) set(STATIC_PKGDEPS_LIBS TRUE) set(ENABLE_SIGNALS FALSE) endif() if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING"Choose the type of build (None
Mac OS X or Android For some we provide binary for others we provide installers and for others we provide AppImage containers that you can run without the need to install anything Check the the usual way to install PulseView is to install the packages provided by your distro s package manager sometimes only outdated packages are made available to you In that you have two options
shared_ptr< sigrok::Session > session_
static Glib::VariantBase restore_variantbase(QSettings &settings)
shared_ptr< sigrok::Device > device_
static void store_variantbase(QSettings &settings, Glib::VariantBase v)