PulseView  0.3.0
A Qt-based sigrok GUI
pv::MainWindow Class Reference

#include <mainwindow.hpp>

Inheritance diagram for pv::MainWindow:
Collaboration diagram for pv::MainWindow:

Public Slots

void export_file (std::shared_ptr< sigrok::OutputFormat > format, bool selection_only=false)
 
void import_file (std::shared_ptr< sigrok::InputFormat > format)
 

Public Member Functions

 MainWindow (DeviceManager &device_manager, std::string open_file_name=std::string(), std::string open_file_format=std::string(), QWidget *parent=0)
 
QAction * action_open () const
 
QAction * action_save_as () const
 
QAction * action_save_selection_as () const
 
QAction * action_connect () const
 
QAction * action_quit () const
 
QAction * action_view_zoom_in () const
 
QAction * action_view_zoom_out () const
 
QAction * action_view_zoom_fit () const
 
QAction * action_view_zoom_one_to_one () const
 
QAction * action_view_sticky_scrolling () const
 
QAction * action_view_coloured_bg () const
 
QAction * action_view_show_cursors () const
 
QAction * action_about () const
 
void run_stop ()
 
void select_device (std::shared_ptr< devices::Device > device)
 

Private Slots

void show_session_error (const QString text, const QString info_text)
 
void on_actionOpen_triggered ()
 
void on_actionSaveAs_triggered ()
 
void on_actionSaveSelectionAs_triggered ()
 
void on_actionQuit_triggered ()
 
void on_actionConnect_triggered ()
 
void on_actionViewZoomIn_triggered ()
 
void on_actionViewZoomOut_triggered ()
 
void on_actionViewZoomFit_triggered ()
 
void on_actionViewZoomOneToOne_triggered ()
 
void on_actionViewStickyScrolling_triggered ()
 
void on_actionViewColouredBg_triggered ()
 
void on_actionViewShowCursors_triggered ()
 
void on_actionAbout_triggered ()
 
void add_decoder (srd_decoder *decoder)
 
void capture_state_changed (int state)
 
void device_selected ()
 
void sticky_scrolling_changed (bool state)
 
void always_zoom_to_fit_changed (bool state)
 

Private Member Functions

void setup_ui ()
 
void select_init_device ()
 
void load_init_file (const std::string &file_name, const std::string &format)
 
void save_ui_settings ()
 
void restore_ui_settings ()
 
void session_error (const QString text, const QString info_text)
 
void update_device_list ()
 
void load_file (QString file_name, std::shared_ptr< sigrok::InputFormat > format=nullptr, const std::map< std::string, Glib::VariantBase > &options=std::map< std::string, Glib::VariantBase >())
 
void save_selection_to_file ()
 
void closeEvent (QCloseEvent *event)
 
void keyReleaseEvent (QKeyEvent *event)
 

Private Attributes

DeviceManagerdevice_manager_
 
Session session_
 
pv::view::Viewview_
 
QWidget * central_widget_
 
QVBoxLayout * vertical_layout_
 
toolbars::MainBarmain_bar_
 
QAction *const action_open_
 
QAction *const action_save_as_
 
QAction *const action_save_selection_as_
 
QAction *const action_connect_
 
QAction *const action_quit_
 
QAction *const action_view_zoom_in_
 
QAction *const action_view_zoom_out_
 
QAction *const action_view_zoom_fit_
 
QAction *const action_view_zoom_one_to_one_
 
QAction *const action_view_sticky_scrolling_
 
QAction *const action_view_coloured_bg_
 
QAction *const action_view_show_cursors_
 
QAction *const action_about_
 

Static Private Attributes

static const char * SettingOpenDirectory = "MainWindow/OpenDirectory"
 
static const char * SettingSaveDirectory = "MainWindow/SaveDirectory"
 

Detailed Description

Definition at line 62 of file mainwindow.hpp.

Constructor & Destructor Documentation

pv::MainWindow::MainWindow ( DeviceManager device_manager,
std::string  open_file_name = std::string(),
std::string  open_file_format = std::string(),
QWidget *  parent = 0 
)
explicit

Definition at line 97 of file mainwindow.cpp.

Here is the call graph for this function:

Member Function Documentation

QAction * pv::MainWindow::action_about ( ) const

Definition at line 190 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_connect ( ) const

Definition at line 145 of file mainwindow.cpp.

QAction * pv::MainWindow::action_open ( ) const

Definition at line 130 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_quit ( ) const

Definition at line 150 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_save_as ( ) const

Definition at line 135 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_save_selection_as ( ) const

Definition at line 140 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_view_coloured_bg ( ) const

Definition at line 180 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_view_show_cursors ( ) const

Definition at line 185 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_view_sticky_scrolling ( ) const

Definition at line 175 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_view_zoom_fit ( ) const

Definition at line 165 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_view_zoom_in ( ) const

Definition at line 155 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_view_zoom_one_to_one ( ) const

Definition at line 170 of file mainwindow.cpp.

Here is the caller graph for this function:

QAction * pv::MainWindow::action_view_zoom_out ( ) const

Definition at line 160 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::add_decoder ( srd_decoder *  decoder)
privateslot

Definition at line 847 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::always_zoom_to_fit_changed ( bool  state)
privateslot

Definition at line 842 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::capture_state_changed ( int  state)
privateslot

Definition at line 857 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::closeEvent ( QCloseEvent *  event)
private

Definition at line 715 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::device_selected ( )
privateslot

Definition at line 862 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::export_file ( std::shared_ptr< sigrok::OutputFormat >  format,
bool  selection_only = false 
)
slot

Definition at line 233 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::import_file ( std::shared_ptr< sigrok::InputFormat >  format)
slot

Definition at line 307 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::keyReleaseEvent ( QKeyEvent *  event)
private

Definition at line 721 of file mainwindow.cpp.

void pv::MainWindow::load_file ( QString  file_name,
std::shared_ptr< sigrok::InputFormat >  format = nullptr,
const std::map< std::string, Glib::VariantBase > &  options = std::map<std::string, Glib::VariantBase>() 
)
private

Definition at line 683 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::load_init_file ( const std::string &  file_name,
const std::string &  format 
)
private

Definition at line 597 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_actionAbout_triggered ( )
privateslot

Definition at line 831 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionConnect_triggered ( )
privateslot

Definition at line 770 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionOpen_triggered ( )
privateslot

Definition at line 741 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionQuit_triggered ( )
privateslot

Definition at line 785 of file mainwindow.cpp.

void pv::MainWindow::on_actionSaveAs_triggered ( )
privateslot

Definition at line 760 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionSaveSelectionAs_triggered ( )
privateslot

Definition at line 765 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionViewColouredBg_triggered ( )
privateslot

Definition at line 815 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionViewShowCursors_triggered ( )
privateslot

Definition at line 820 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionViewStickyScrolling_triggered ( )
privateslot

Definition at line 810 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionViewZoomFit_triggered ( )
privateslot

Definition at line 800 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionViewZoomIn_triggered ( )
privateslot

Definition at line 790 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionViewZoomOneToOne_triggered ( )
privateslot

Definition at line 805 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::on_actionViewZoomOut_triggered ( )
privateslot

Definition at line 795 of file mainwindow.cpp.

Here is the call graph for this function:

void pv::MainWindow::restore_ui_settings ( )
private

Definition at line 655 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::run_stop ( )

Definition at line 202 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::save_selection_to_file ( )
private
void pv::MainWindow::save_ui_settings ( )
private

Definition at line 620 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::select_device ( std::shared_ptr< devices::Device device)

Definition at line 216 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::select_init_device ( )
private

Definition at line 565 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::session_error ( const QString  text,
const QString  info_text 
)
private

Definition at line 670 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::setup_ui ( )
private

Definition at line 348 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::show_session_error ( const QString  text,
const QString  info_text 
)
privateslot

Definition at line 730 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::sticky_scrolling_changed ( bool  state)
privateslot

Definition at line 837 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::update_device_list ( )
private

Updates the device list in the toolbar

Definition at line 678 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

QAction* const pv::MainWindow::action_about_
private

Definition at line 203 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_connect_
private

Definition at line 194 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_open_
private

Definition at line 191 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_quit_
private

Definition at line 195 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_save_as_
private

Definition at line 192 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_save_selection_as_
private

Definition at line 193 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_view_coloured_bg_
private

Definition at line 201 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_view_show_cursors_
private

Definition at line 202 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_view_sticky_scrolling_
private

Definition at line 200 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_view_zoom_fit_
private

Definition at line 198 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_view_zoom_in_
private

Definition at line 196 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_view_zoom_one_to_one_
private

Definition at line 199 of file mainwindow.hpp.

QAction* const pv::MainWindow::action_view_zoom_out_
private

Definition at line 197 of file mainwindow.hpp.

QWidget* pv::MainWindow::central_widget_
private

Definition at line 186 of file mainwindow.hpp.

DeviceManager& pv::MainWindow::device_manager_
private

Definition at line 180 of file mainwindow.hpp.

toolbars::MainBar* pv::MainWindow::main_bar_
private

Definition at line 189 of file mainwindow.hpp.

Session pv::MainWindow::session_
private

Definition at line 182 of file mainwindow.hpp.

const char * pv::MainWindow::SettingOpenDirectory = "MainWindow/OpenDirectory"
staticprivate

Name of the setting used to remember the directory containing the last file that was opened.

Definition at line 71 of file mainwindow.hpp.

const char * pv::MainWindow::SettingSaveDirectory = "MainWindow/SaveDirectory"
staticprivate

Name of the setting used to remember the directory containing the last file that was saved.

Definition at line 77 of file mainwindow.hpp.

QVBoxLayout* pv::MainWindow::vertical_layout_
private

Definition at line 187 of file mainwindow.hpp.

pv::view::View* pv::MainWindow::view_
private

Definition at line 184 of file mainwindow.hpp.


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