PulseView  unreleased development snapshot
A Qt-based sigrok GUI
pv::Logging Class Reference

#include <logging.hpp>

Inheritance diagram for pv::Logging:
Collaboration diagram for pv::Logging:

Public Types

enum  LogSource { LogSource_pv, LogSource_sr, LogSource_srd }
 

Signals

void logged_text (QString s)
 

Public Member Functions

 ~Logging ()
 
void init ()
 
int get_log_level () const
 
void set_log_level (int level)
 
QString get_log () const
 
void log (const QString &text, int source)
 

Static Public Member Functions

static void log_pv (QtMsgType type, const QMessageLogContext &context, const QString &msg)
 
static int log_sr (void *cb_data, int loglevel, const char *format, va_list args)
 

Static Public Attributes

static const int MIN_BUFFER_SIZE = 10
 
static const int MAX_BUFFER_SIZE = 50000
 

Private Member Functions

void on_setting_changed (const QString &key, const QVariant &value)
 

Private Attributes

int buffer_size_
 
QStringList buffer_
 
mutex log_mutex_
 

Detailed Description

Definition at line 36 of file logging.hpp.

Member Enumeration Documentation

Enumerator
LogSource_pv 
LogSource_sr 
LogSource_srd 

Definition at line 41 of file logging.hpp.

Constructor & Destructor Documentation

pv::Logging::~Logging ( )

Definition at line 52 of file logging.cpp.

Here is the call graph for this function:

Member Function Documentation

QString pv::Logging::get_log ( ) const

Definition at line 103 of file logging.cpp.

Here is the caller graph for this function:

int pv::Logging::get_log_level ( ) const

Definition at line 89 of file logging.cpp.

Here is the caller graph for this function:

void pv::Logging::init ( )

Definition at line 69 of file logging.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::Logging::log ( const QString &  text,
int  source 
)

Definition at line 108 of file logging.cpp.

Here is the caller graph for this function:

void pv::Logging::log_pv ( QtMsgType  type,
const QMessageLogContext &  context,
const QString &  msg 
)
static

Definition at line 151 of file logging.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int pv::Logging::log_sr ( void *  cb_data,
int  loglevel,
const char *  format,
va_list  args 
)
static

Definition at line 161 of file logging.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::Logging::logged_text ( QString  s)
signal

Definition at line 124 of file moc_logging.cpp.

Here is the caller graph for this function:

void pv::Logging::on_setting_changed ( const QString &  key,
const QVariant &  value 
)
privatevirtual

Implements pv::GlobalSettingsInterface.

Definition at line 207 of file logging.cpp.

void pv::Logging::set_log_level ( int  level)

Definition at line 95 of file logging.cpp.

Here is the caller graph for this function:

Member Data Documentation

QStringList pv::Logging::buffer_
private

Definition at line 77 of file logging.hpp.

int pv::Logging::buffer_size_
private

Definition at line 76 of file logging.hpp.

mutex pv::Logging::log_mutex_
mutableprivate

Definition at line 78 of file logging.hpp.

const int pv::Logging::MAX_BUFFER_SIZE = 50000
static

Definition at line 48 of file logging.hpp.

const int pv::Logging::MIN_BUFFER_SIZE = 10
static

Definition at line 47 of file logging.hpp.


The documentation for this class was generated from the following files: