PulseView  unreleased development snapshot
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 on_run_stop_clicked ()
 
void on_session_error_raised (const QString text, const QString info_text)
 

Signals

void session_error_raised (const QString text, const QString info_text)
 

Public Member Functions

 MainWindow (DeviceManager &device_manager, QWidget *parent=nullptr)
 
 ~MainWindow ()
 
shared_ptr< views::ViewBaseget_active_view () const
 
shared_ptr< views::ViewBaseadd_view (ViewType type, Session &session)
 
void remove_view (shared_ptr< ViewBase > view)
 
shared_ptr< subwindows::SubWindowBaseadd_subwindow (subwindows::SubWindowType type, Session &session)
 
shared_ptr< Sessionadd_session ()
 
void remove_session (shared_ptr< Session > session)
 
void add_session_with_file (string open_file_name, string open_file_format, string open_setup_file_name)
 
void add_default_session ()
 
void save_sessions ()
 
void restore_sessions ()
 

Static Public Member Functions

static void show_session_error (const QString text, const QString info_text)
 

Private Slots

void on_add_view (ViewType type, Session *session)
 
void on_focus_changed ()
 
void on_focused_session_changed (shared_ptr< Session > session)
 
void on_new_session_clicked ()
 
void on_settings_clicked ()
 
void on_session_name_changed ()
 
void on_session_device_changed ()
 
void on_session_capture_state_changed (int state)
 
void on_new_view (Session *session, int view_type)
 
void on_view_close_clicked ()
 
void on_tab_changed (int index)
 
void on_tab_close_requested (int index)
 
void on_show_decoder_selector (Session *session)
 
void on_sub_window_close_clicked ()
 
void on_view_colored_bg_shortcut ()
 
void on_view_sticky_scrolling_shortcut ()
 
void on_view_show_sampling_points_shortcut ()
 
void on_view_show_analog_minor_grid_shortcut ()
 
void on_close_current_tab ()
 

Private Member Functions

void setup_ui ()
 
void update_acq_button (Session *session)
 
void save_ui_settings ()
 
void restore_ui_settings ()
 
shared_ptr< Sessionget_tab_session (int index) const
 
void closeEvent (QCloseEvent *event)
 
virtual QMenu * createPopupMenu ()
 
virtual bool restoreState (const QByteArray &state, int version=0)
 

Private Attributes

DeviceManagerdevice_manager_
 
list< shared_ptr< Session > > sessions_
 
shared_ptr< Sessionlast_focused_session_
 
map< QDockWidget *, shared_ptr< views::ViewBase > > view_docks_
 
map< QDockWidget *, shared_ptr< subwindows::SubWindowBase > > sub_windows_
 
map< shared_ptr< Session >, QMainWindow * > session_windows_
 
QWidget * static_tab_widget_
 
QToolButtonnew_session_button_
 
QToolButtonrun_stop_button_
 
QToolButtonsettings_button_
 
QTabWidget session_selector_
 
QIcon icon_red_
 
QIcon icon_green_
 
QIcon icon_grey_
 
QShortcut * view_sticky_scrolling_shortcut_
 
QShortcut * view_show_sampling_points_shortcut_
 
QShortcut * view_show_analog_minor_grid_shortcut_
 
QShortcut * view_colored_bg_shortcut_
 
QShortcut * run_stop_shortcut_
 
QShortcut * close_application_shortcut_
 
QShortcut * close_current_tab_shortcut_
 

Static Private Attributes

static const QString WindowTitle = tr("PulseView")
 

Detailed Description

Definition at line 67 of file mainwindow.hpp.

Constructor & Destructor Documentation

pv::MainWindow::MainWindow ( DeviceManager device_manager,
QWidget *  parent = nullptr 
)
explicit

Definition at line 72 of file mainwindow.cpp.

Here is the call graph for this function:

pv::MainWindow::~MainWindow ( )

Definition at line 86 of file mainwindow.cpp.

Here is the call graph for this function:

Member Function Documentation

void pv::MainWindow::add_default_session ( )

Definition at line 420 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

shared_ptr< Session > pv::MainWindow::add_session ( )

Definition at line 334 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::add_session_with_file ( string  open_file_name,
string  open_file_format,
string  open_setup_file_name 
)

Definition at line 413 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

shared_ptr< subwindows::SubWindowBase > pv::MainWindow::add_subwindow ( subwindows::SubWindowType  type,
Session session 
)

Definition at line 266 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

shared_ptr< views::ViewBase > pv::MainWindow::add_view ( ViewType  type,
Session session 
)

Definition at line 134 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 636 of file mainwindow.cpp.

Here is the call graph for this function:

QMenu * pv::MainWindow::createPopupMenu ( )
privatevirtual

Definition at line 655 of file mainwindow.cpp.

shared_ptr< views::ViewBase > pv::MainWindow::get_active_view ( ) const

Definition at line 109 of file mainwindow.cpp.

Here is the caller graph for this function:

shared_ptr< Session > pv::MainWindow::get_tab_session ( int  index) const
private

Definition at line 626 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::on_add_view ( ViewType  type,
Session session 
)
privateslot

Definition at line 719 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_close_current_tab ( )
privateslot

Definition at line 980 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_focus_changed ( )
privateslot

Definition at line 727 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_focused_session_changed ( shared_ptr< Session session)
privateslot

Definition at line 754 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_new_session_clicked ( )
privateslot

Definition at line 764 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_new_view ( Session session,
int  view_type 
)
privateslot

Definition at line 831 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_run_stop_clicked ( )
slot

Definition at line 671 of file mainwindow.cpp.

Here is the caller graph for this function:

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

Definition at line 816 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_session_device_changed ( )
privateslot

Definition at line 803 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_session_error_raised ( const QString  text,
const QString  info_text 
)
slot

Definition at line 987 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_session_name_changed ( )
privateslot

Definition at line 775 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_settings_clicked ( )
privateslot

Definition at line 769 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::on_show_decoder_selector ( Session session)
privateslot

Definition at line 902 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_sub_window_close_clicked ( )
privateslot

Definition at line 927 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::on_tab_changed ( int  index)
privateslot

Definition at line 878 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_tab_close_requested ( int  index)
privateslot

Definition at line 886 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_view_close_clicked ( )
privateslot

Definition at line 839 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_view_colored_bg_shortcut ( )
privateslot

Definition at line 948 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_view_show_analog_minor_grid_shortcut ( )
privateslot

Definition at line 972 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_view_show_sampling_points_shortcut ( )
privateslot

Definition at line 964 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::on_view_sticky_scrolling_shortcut ( )
privateslot

Definition at line 956 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::remove_session ( shared_ptr< Session session)

Definition at line 367 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::remove_view ( shared_ptr< ViewBase view)

Definition at line 238 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::restore_sessions ( )

Definition at line 476 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void pv::MainWindow::restore_ui_settings ( )
private

Definition at line 611 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool pv::MainWindow::restoreState ( const QByteArray &  state,
int  version = 0 
)
privatevirtual

Definition at line 660 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::save_sessions ( )

Definition at line 450 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::save_ui_settings ( )
private

Definition at line 601 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::session_error_raised ( const QString  text,
const QString  info_text 
)
signal

Definition at line 261 of file moc_mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::setup_ui ( )
private

Definition at line 491 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 
)
static

Definition at line 97 of file mainwindow.cpp.

Here is the caller graph for this function:

void pv::MainWindow::update_acq_button ( Session session)
private

Definition at line 582 of file mainwindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

QShortcut* pv::MainWindow::close_application_shortcut_
private

Definition at line 178 of file mainwindow.hpp.

QShortcut* pv::MainWindow::close_current_tab_shortcut_
private

Definition at line 179 of file mainwindow.hpp.

DeviceManager& pv::MainWindow::device_manager_
private

Definition at line 155 of file mainwindow.hpp.

QIcon pv::MainWindow::icon_green_
private

Definition at line 170 of file mainwindow.hpp.

QIcon pv::MainWindow::icon_grey_
private

Definition at line 171 of file mainwindow.hpp.

QIcon pv::MainWindow::icon_red_
private

Definition at line 169 of file mainwindow.hpp.

shared_ptr<Session> pv::MainWindow::last_focused_session_
private

Definition at line 158 of file mainwindow.hpp.

QToolButton* pv::MainWindow::new_session_button_
private

Definition at line 166 of file mainwindow.hpp.

QToolButton * pv::MainWindow::run_stop_button_
private

Definition at line 166 of file mainwindow.hpp.

QShortcut* pv::MainWindow::run_stop_shortcut_
private

Definition at line 177 of file mainwindow.hpp.

QTabWidget pv::MainWindow::session_selector_
private

Definition at line 167 of file mainwindow.hpp.

map< shared_ptr<Session>, QMainWindow*> pv::MainWindow::session_windows_
private

Definition at line 163 of file mainwindow.hpp.

list< shared_ptr<Session> > pv::MainWindow::sessions_
private

Definition at line 157 of file mainwindow.hpp.

QToolButton * pv::MainWindow::settings_button_
private

Definition at line 166 of file mainwindow.hpp.

QWidget* pv::MainWindow::static_tab_widget_
private

Definition at line 165 of file mainwindow.hpp.

map< QDockWidget*, shared_ptr<subwindows::SubWindowBase> > pv::MainWindow::sub_windows_
private

Definition at line 161 of file mainwindow.hpp.

QShortcut* pv::MainWindow::view_colored_bg_shortcut_
private

Definition at line 176 of file mainwindow.hpp.

map< QDockWidget*, shared_ptr<views::ViewBase> > pv::MainWindow::view_docks_
private

Definition at line 160 of file mainwindow.hpp.

QShortcut* pv::MainWindow::view_show_analog_minor_grid_shortcut_
private

Definition at line 175 of file mainwindow.hpp.

QShortcut* pv::MainWindow::view_show_sampling_points_shortcut_
private

Definition at line 174 of file mainwindow.hpp.

QShortcut* pv::MainWindow::view_sticky_scrolling_shortcut_
private

Definition at line 173 of file mainwindow.hpp.

const QString pv::MainWindow::WindowTitle = tr("PulseView")
staticprivate

Definition at line 72 of file mainwindow.hpp.


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