A class for the plot tree view.
More...
#include <PlotTreeView.h>
|
| Gtk::ApplicationWindow * | p_win = nullptr |
| | Gtk::ApplicationWindow pointer to the application main window. More...
|
| |
| CGraph::CairoGraph * | p_samplegraph = nullptr |
| | CGraph::CairoGraph pointer to the sample-domain graph. More...
|
| |
| CGraph::CairoGraph * | p_magfftgraph = nullptr |
| | CGraph::CairoGraph pointer to the magnitude-spectra graph. More...
|
| |
| CGraph::CairoGraph * | p_phfftgraph = nullptr |
| | CGraph::CairoGraph pointer to the phase-spectra graph. More...
|
| |
| Glib::RefPtr< Gtk::TreeStore > | p_TreeModel = nullptr |
| | Gtk::TreeStore pointer for the tree view model. More...
|
| |
| Glib::RefPtr< Gtk::TreeSelection > | p_TreeSelection = nullptr |
| | Gtk::TreeSelection pointer for the tree view selection. More...
|
| |
| SBBHostCore * | p_core = nullptr |
| | SBBHostCore pointer to the SBB Host core object. More...
|
| |
| Glib::RefPtr< Gtk::Builder > | p_builder |
| | Gtk::Builder pointer to read the popover menu from the XML file. More...
|
| |
| Glib::RefPtr< Gio::SimpleActionGroup > | p_signalActionGroup |
| | Gio::SimpleActionGroup pointer for simple actions in the signal popover menu. More...
|
| |
| Glib::RefPtr< Gio::SimpleActionGroup > | p_logActionGroup |
| | Gio::SimpleActionGroup pointer for simple actions in the log popover menu. More...
|
| |
| Glib::RefPtr< Gio::SimpleAction > | p_lineTypeAction |
| | Gio::SimpleActionGroup pointer for line-type action in the signal popover menu. More...
|
| |
| std::unique_ptr< Gtk::PopoverMenu > | p_signal_popOverMenu = nullptr |
| | Gtk::PopoverMenu pointer for the signal popover menu. More...
|
| |
| std::unique_ptr< Gtk::PopoverMenu > | p_log_popOverMenu = nullptr |
| | Gtk::PopoverMenu pointer for the log popover menu. More...
|
| |
| std::unique_ptr< Gtk::ColorChooserDialog > | p_colorChooser |
| | Gtk::ColorChooserDialog pointer for the color chooser dialog. More...
|
| |
| Gtk::TreeView::Column | name_col |
| | Gtk::TreeView::Column object for the editable name column. More...
|
| |
| Gtk::CellRendererText | name_render |
| | Gtk::CellRendererText object for the editable name column. More...
|
| |
A class for the plot tree view.
Class for the tree view in the plot tab, extending the Gtk::TreeView class and allowing selection of log-signal combinations to be shown in the graph. Class used in SBBHostApp.
- See also
- SBBHostApp
- Author
- Stefano Lovato
- Date
- 2022
◆ PlotTreeView()
| PlotTreeView::PlotTreeView |
( |
Gtk::ApplicationWindow * |
win, |
|
|
SBBHostCore * |
core |
|
) |
| |
◆ ~PlotTreeView()
| virtual PlotTreeView::~PlotTreeView |
( |
| ) |
|
|
virtual |
Destructor.
Default destructor.
◆ append_row()
| void PlotTreeView::append_row |
( |
| ) |
|
Append rows.
Function to append the row for the last log, as well as the child rows for all the necessary signals. It automatically find the last log from the SBBHostCore object.
- See also
- SBBHostCore
◆ check_new_name()
| bool PlotTreeView::check_new_name |
( |
std::string |
name | ) |
|
|
private |
Check a new name.
Function to check a new user-defined name for a log. It avoids invalid char (see INVALID_CHARS in config.h).
- Parameters
-
| name | The name as a string. |
- Returns
- true if the name is ok, false otherwise.
◆ create_column()
| void PlotTreeView::create_column |
( |
| ) |
|
Create the column(s).
Function to create the column(s) in the tree view.
◆ get_selected()
| std::vector< Gtk::TreeModel::iterator > PlotTreeView::get_selected |
( |
int |
type | ) |
|
Get the selected log(s) or signal(s).
Function to get the selected log(s) or signal(s) in the tree view.
- Returns
- A std::vector containing the selected log(s) or signal(s), represented by a Gtk::TreeModel::iterator.
◆ name_col_on_cell_data()
| void PlotTreeView::name_col_on_cell_data |
( |
Gtk::CellRenderer * |
renderer, |
|
|
const Gtk::TreeModel::const_iterator & |
iter |
|
) |
| |
|
private |
Callback for setting the name cell.
Callback function called to set the value in the name cell according to its renderer.
- Parameters
-
| renderer | The Gtk::CellRenderer pointer to the renderer object. |
| iter | The Gtk::TreeModel::const_iterator. |
◆ name_render_on_edited()
| void PlotTreeView::name_render_on_edited |
( |
const Glib::ustring & |
path_string, |
|
|
const Glib::ustring & |
new_text |
|
) |
| |
|
private |
Callback for name column edited.
Callback function called when the editing of the name cell finisched, in order to set the name of the cell. Only for log-type cells (name is editable only from those cells).
- Parameters
-
| path_string | The path identifying the edited cell. |
| new_text | The new name used for the edited cell. |
◆ name_render_on_editing_started()
| void PlotTreeView::name_render_on_editing_started |
( |
Gtk::CellEditable * |
cell_editable, |
|
|
const Glib::ustring & |
path_string |
|
) |
| |
|
private |
Callback for name column start editing.
Callback function called when starting to edit a name column cell. It avoids editing in the case of signal-type cells.
- Parameters
-
| cell_editable | The pointer to the Gtk::CellEditable object. |
| path_string | The path identifying the edited cell. |
◆ on_color_chooser_response()
| void PlotTreeView::on_color_chooser_response |
( |
int |
id_response | ) |
|
|
private |
Callback for the color chooser response.
Callback function called when exiting from the color chooser dialog.
- See also
- Gtk::ColorChooserDialog
- Parameters
-
| id_response | The response ID. |
◆ on_menu_delete()
| void PlotTreeView::on_menu_delete |
( |
| ) |
|
|
private |
Callback for delete logs.
Callback function called when selecting the 'Delete' button in the log popover menu.
◆ on_menu_save()
| void PlotTreeView::on_menu_save |
( |
| ) |
|
|
private |
Callback for save logs.
Callback function called when selecting the 'Save' button in the log popover menu.
◆ on_menu_set_color()
| void PlotTreeView::on_menu_set_color |
( |
| ) |
|
|
private |
Callback for the set color.
Callback function called when selecting the 'Set color' button in the signal popover menu.
◆ on_menu_set_linetype()
| void PlotTreeView::on_menu_set_linetype |
( |
int |
type | ) |
|
|
private |
Callback for the set linetype.
Callback function called when selecting the 'Set linetype' button in the signal popover menu.
◆ on_plot_tree_selected()
| void PlotTreeView::on_plot_tree_selected |
( |
| ) |
|
|
private |
Callback for the tree view selected.
Callback function called when selecting a signal or log in the trew view.
◆ on_popover_button_pressed()
| void PlotTreeView::on_popover_button_pressed |
( |
int |
n_press, |
|
|
double |
x, |
|
|
double |
y |
|
) |
| |
|
private |
Callback for popover item pressed.
Callback function called when pressing a button of the popover menu.
- See also
- Glib::SignalProxy<void(int, double, double)> Gtk::GestureClick::signal_pressed()
- Parameters
-
| n_press | How many touch/button presses happened with this one. |
| x | The X coordinate, in widget allocation coordinates. |
| y | The Y coordinate, in widget allocation coordinates. |
◆ set_fftGraph()
| void PlotTreeView::set_fftGraph |
( |
CGraph::CairoGraph * |
mag, |
|
|
CGraph::CairoGraph * |
ph |
|
) |
| |
Set the spectra graph pointer.
Function to set the spectra graph pointer, in order to have full access to the graph.
- Parameters
-
| mag | The pointer to the CGraph::CairoGraph graph of the magnitude. |
| ph | The pointer to the CGraph::CairoGraph graph of the phase. |
◆ set_sampleGraph()
| void PlotTreeView::set_sampleGraph |
( |
CGraph::CairoGraph * |
graph | ) |
|
Set the sample-domain graph pointer.
Function to set the sample-domain graph pointer, in order to have full access to the graph.
- Parameters
-
| graph | The pointer to the CGraph::CairoGraph graph object. |
◆ update_logname()
| void PlotTreeView::update_logname |
( |
int |
id, |
|
|
std::string |
name |
|
) |
| |
Update the log name shown.
Function to update the log name in the tree view row.
- Parameters
-
| id | The ID of the log. |
| name | The new name. |
◆ name_col
| Gtk::TreeView::Column PlotTreeView::name_col |
|
protected |
Gtk::TreeView::Column object for the editable name column.
◆ name_render
| Gtk::CellRendererText PlotTreeView::name_render |
|
protected |
Gtk::CellRendererText object for the editable name column.
◆ p_builder
| Glib::RefPtr<Gtk::Builder> PlotTreeView::p_builder |
|
protected |
Gtk::Builder pointer to read the popover menu from the XML file.
◆ p_colorChooser
| std::unique_ptr<Gtk::ColorChooserDialog> PlotTreeView::p_colorChooser |
|
protected |
Gtk::ColorChooserDialog pointer for the color chooser dialog.
◆ p_core
◆ p_lineTypeAction
| Glib::RefPtr<Gio::SimpleAction> PlotTreeView::p_lineTypeAction |
|
protected |
Gio::SimpleActionGroup pointer for line-type action in the signal popover menu.
◆ p_log_popOverMenu
| std::unique_ptr<Gtk::PopoverMenu> PlotTreeView::p_log_popOverMenu = nullptr |
|
protected |
Gtk::PopoverMenu pointer for the log popover menu.
◆ p_logActionGroup
| Glib::RefPtr<Gio::SimpleActionGroup> PlotTreeView::p_logActionGroup |
|
protected |
Gio::SimpleActionGroup pointer for simple actions in the log popover menu.
◆ p_magfftgraph
| CGraph::CairoGraph* PlotTreeView::p_magfftgraph = nullptr |
|
protected |
CGraph::CairoGraph pointer to the magnitude-spectra graph.
◆ p_phfftgraph
| CGraph::CairoGraph* PlotTreeView::p_phfftgraph = nullptr |
|
protected |
CGraph::CairoGraph pointer to the phase-spectra graph.
◆ p_samplegraph
| CGraph::CairoGraph* PlotTreeView::p_samplegraph = nullptr |
|
protected |
CGraph::CairoGraph pointer to the sample-domain graph.
◆ p_signal_popOverMenu
| std::unique_ptr<Gtk::PopoverMenu> PlotTreeView::p_signal_popOverMenu = nullptr |
|
protected |
Gtk::PopoverMenu pointer for the signal popover menu.
◆ p_signalActionGroup
| Glib::RefPtr<Gio::SimpleActionGroup> PlotTreeView::p_signalActionGroup |
|
protected |
Gio::SimpleActionGroup pointer for simple actions in the signal popover menu.
◆ p_treeColumns
TreeColumns pointer for the format of the tree view column(s).
◆ p_TreeModel
| Glib::RefPtr<Gtk::TreeStore> PlotTreeView::p_TreeModel = nullptr |
|
protected |
Gtk::TreeStore pointer for the tree view model.
◆ p_TreeSelection
| Glib::RefPtr<Gtk::TreeSelection> PlotTreeView::p_TreeSelection = nullptr |
|
protected |
Gtk::TreeSelection pointer for the tree view selection.
◆ p_win
| Gtk::ApplicationWindow* PlotTreeView::p_win = nullptr |
|
protected |
Gtk::ApplicationWindow pointer to the application main window.