Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 3f801de9 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Remove former stat plugin

parent 107667fa
Branches
Tags
1 merge request!19Re-work the statistic plugin to restore it.
Pipeline #129391 passed
......@@ -120,7 +120,6 @@ SET(VITE_HDRS
parser/PajeParser/ParserVite.hpp
# Statistics headers
statistics/Statistics_window.hpp
statistics/Stats_window.hpp
statistics/ChartView.hpp
statistics/Statistic.hpp
statistics/DrawStats.hpp
......@@ -139,7 +138,6 @@ SET(VITE_UIS
interface/settings.ui
interface/main_window.ui
interface/option_export_window.ui
interface/stats_viewer.ui
interface/global_cmd.ui
interface/list_of_counter_to_export.ui
interface/node_select.ui
......@@ -205,7 +203,6 @@ SET(VITE_SRCS
# Statistics code files
statistics/Statistic.cpp
statistics/ChartView.cpp
statistics/Stats_window.cpp
statistics/Statistics_window.cpp
statistics/Diagram.cpp
# Interface code files
......
......@@ -111,8 +111,6 @@
#include "parser/ParserFactory.hpp"
#include "parser/ParsingThread.hpp"
/* -- */
#include "statistics/Stats_window.hpp"
/* -- */
#include "interface/Node_select.hpp"
#include "interface/Interface_graphic.hpp"
#include "core/Core.hpp"
......
......@@ -31,7 +31,6 @@
<file>info_window.ui</file>
<file>main_window.ui</file>
<file>option_export_window.ui</file>
<file>stats_viewer.ui</file>
<file>list_of_counter_to_export.ui</file>
<file>node_select.ui</file>
<file>statistics.ui</file>
......
......@@ -51,17 +51,13 @@
#include "trace/Entitys.hpp"
#include "trace/Trace.hpp"
/* -- */
#include "statistics/Stats_window.hpp"
#include "statistics/Statistics_window.hpp"
/* -- */
#include "plugin/Plugin.hpp"
Plugin *Plugin::new_instance(const std::string &name) {
Plugin *plugin = nullptr;
if(name == "statistics window") {
plugin = new Stats_window();
}
if (name == "Stats") {
if(name == "Statistics") {
plugin = new Statistics_window();
}
return plugin;
......
......@@ -101,8 +101,7 @@ Plugin_window::Plugin_window(Core *c, QWidget *parent)
load_shared_plugins();
// TODO load "compulsory" plugins (stats for example)
//load_plugin("statistics window");
load_plugin("Stats");
load_plugin("Statistics");
// Make a link to the menu to open the good tab if possible (menu Preferences->Plugins->...) where ... is the plugin we want to load
// mainWindow->fillPluginMenu(list<QString> names);
......@@ -212,8 +211,7 @@ void Plugin_window::reload_plugins() {
Session::load_plugin_directories(_plugin_directories);
load_shared_plugins();
//load_plugin("statistics window");
load_plugin("Stats");
load_plugin("Statistics");
}
void Plugin_window::load_list() {
......
......@@ -152,6 +152,7 @@ void Diagram::vertical(
series->attachAxis(axis_x);
series->attachAxis(axis_y);
}
void Diagram::stacked_vertical(
QtCharts::QChart& chart, const std::vector<Container*>& containers, const Interval& interval
) {
......@@ -189,14 +190,17 @@ void Diagram::horizontal(
auto *axis_y = new QtCharts::QBarCategoryAxis();
axis_y->append(categories);
chart.addAxis(axis_y, Qt::AlignLeft);
series->attachAxis(axis_y);
auto *axis_x = new QtCharts::QValueAxis();
axis_x->setRange(0, 100);
chart.addAxis(axis_y, Qt::AlignLeft);
chart.addAxis(axis_x, Qt::AlignBottom);
series->attachAxis(axis_x);
series->attachAxis(axis_y);
}
void Diagram::stacked_horizontal(
QtCharts::QChart& chart, const std::vector<Container*>& containers, const Interval& interval
) {
......@@ -210,13 +214,15 @@ void Diagram::stacked_horizontal(
auto *axis_y = new QtCharts::QBarCategoryAxis();
axis_y->append(categories);
chart.addAxis(axis_y, Qt::AlignLeft);
series->attachAxis(axis_y);
auto *axis_x = new QtCharts::QValueAxis();
axis_x->setRange(0, 100);
chart.addAxis(axis_y, Qt::AlignLeft);
chart.addAxis(axis_x, Qt::AlignBottom);
series->attachAxis(axis_x);
series->attachAxis(axis_y);
}
......
/*
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - Bourroux Luca
**
*/
/*!
*\file Stats_window.hpp
*/
#ifndef _STATISTIC_WINDOW
#define _STATISTIC_WINDOW
......@@ -48,7 +87,7 @@ private:
std::string _file_viewed;
int _number_of_selected_container = 0;
/**
* If we reload automatically the stats when a zoom is done (maybe look when the containers selection will be added if we do not add/remove them)
* -> a mettre dans le fichier de config
......@@ -65,14 +104,14 @@ public:
* \param trace The trace.
*/
void set_trace(Trace *trace) override;
/*!
* \fn set_filename(std::string filename)
* \brief Set the name of the file trace.
* \param filename The file name.
*/
void set_filename(std::string filename);
/** Plugin interface **/
/*!
* \fn void set_arguments(std::map<std::string , QVariant *>);
......@@ -115,9 +154,9 @@ private:
*/
void set_container_names();
void set_container_names_rec(QTreeWidgetItem *current_node, Container *current_container);
/*!
* \brief Fill the vector of selected containers depending on the ones chosen in the tree widget
* \brief Fill the vector of selected containers depending on the ones chosen in the tree widget
*/
void set_selected_nodes(const std::string &);
......@@ -127,10 +166,10 @@ public slots:
private slots:
void on_auto_reload_box_stateChanged(int);
void on_want_stacked_stateChanged(int);
void on_reload_button_clicked();
void on_export_button_clicked();
};
#endif
\ No newline at end of file
#endif
/*
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - COULOMB Kevin
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
**
*/
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <map>
#include <set>
#include <list>
#include <stack>
#include <vector>
/* -- */
#include <QFileDialog> // To choose the file to save
#include <QKeyEvent>
#include <QGLWidget>
/* -- */
#include "common/common.hpp"
#include "common/Info.hpp"
#include "common/Message.hpp"
#include "interface/resource.hpp"
#include "interface/Interface.hpp"
/* -- */
#include "trace/values/Values.hpp"
#include "trace/EntityValue.hpp"
#include "trace/EntityTypes.hpp"
#include "trace/Entitys.hpp"
#include "trace/tree/Interval.hpp"
/* -- */
#include "render/render_stats.hpp"
#include "render/render_stats_opengl.hpp"
#include "render/render_stats_svg.hpp"
/* -- */
#include "statistics/Statistic.hpp"
#include "statistics/DrawStats.hpp"
#include "statistics/DrawVDiagram.hpp"
#include "statistics/DrawHDiagram.hpp"
#include "statistics/DrawCounter.hpp"
#include "statistics/Stats_window.hpp"
/* -- */
using namespace std;
Stats_window::Stats_window(QWidget *parent) : Plugin(parent) {
setupUi(this);
CKFP(_ui_stats_area_layout = this->findChild<QVBoxLayout *>("stats_area"), QObject::tr("Cannot find the stats_area_layout in the .ui file").toStdString());
_ui_stats_area = new Render_stats_opengl(this);
_ui_stats_area_layout->addWidget(_ui_stats_area);
_x_translated = 0;
_y_translated = 0;
_auto_reload_when_zoom = false;
QMetaObject::connectSlotsByName(nullptr);
}
Stats_window::~Stats_window() {
delete _ui_stats_area;
}
void Stats_window::set_container_names() {
const Container::Vector *root_containers = _trace->get_root_containers();
if(root_containers->empty()) {
*Message::get_instance() << tr("No containers in this trace").toStdString() << Message::ende;
return;
}
// Add the root container names
QList<QTreeWidgetItem *> items;
QFlags<Qt::ItemFlag> flg=Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsTristate;
for (const auto &root_container : *root_containers) {
string name = root_container->get_name();
string alias = root_container->get_alias();
QStringList str_name(QString::fromStdString(name));
QString str_alias(QString::fromStdString(alias));
QTreeWidgetItem *current_node = new QTreeWidgetItem((QTreeWidgetItem *)nullptr, str_name);
current_node->setFlags(flg);
current_node->setCheckState(0, Qt::Checked);
current_node->setText(1, str_alias);
items.append(current_node);
// Recursivity to add the children names
set_container_names_rec(current_node, root_container);
}
(*(items.begin()))->setExpanded(true);
_nodes_selected->insertTopLevelItems(0, items);
}
void Stats_window::set_container_names_rec(QTreeWidgetItem *current_node, Container *current_container) {
const Container::Vector *children = current_container->get_children();
QFlags<Qt::ItemFlag> flg = Qt::ItemIsUserCheckable | Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsTristate;
for (const auto &it : *children)
{
// We create the node and we do the recursivity
string name = it->get_name();
string alias = it->get_alias();
QStringList str_name(QString::fromStdString(name));
QString str_alias(QString::fromStdString(alias));
QTreeWidgetItem *node = new QTreeWidgetItem(current_node, str_name);
node->setFlags(flg);
node->setCheckState(0,Qt::Checked);
node->setText(1, str_alias);
set_container_names_rec(node ,it);
}
}
void Stats_window::set_filename(string filename){
_file_viewed = std::move(filename);
}
void Stats_window::set_trace(Trace *trace) {
const map<std::string, StateType *> *states_types_list;
map<std::string, StateType *>::const_iterator it;
map<std::string, StateType *>::const_iterator end;
// Initialize _trace
_trace = trace;
// Clear the boxes
clear();
if ( trace != nullptr ) {
// Fill the tree
set_container_names();
// Fill in the combobox
states_types_list = _trace->get_state_types();
end = states_types_list->end();
for (it = states_types_list->begin();
it != end;
it++){
string alias = (*it).second->get_alias();
QString temp(QString::fromStdString(alias));
_kind_of_state_box->addItem(temp);
}
}
}
void Stats_window::set_selected_nodes(const string &kind_of_state){
const map<std::string, StateType *> *states_types_list;
map<std::string, StateType *>::const_iterator itstat;
map<std::string, StateType *>::const_iterator endstat;
const ContainerType *kind_of_container = nullptr;
states_types_list = _trace->get_state_types();
endstat = states_types_list->end();
for (itstat = states_types_list->begin();
itstat != endstat;
itstat++){
if ((*itstat).second->get_alias() == kind_of_state){
kind_of_container = (*itstat).second->get_container_type();
continue;
}
}
// We delete the previous selected containers
if(!_selected_containers.empty()) {
_selected_containers.clear();
}
// We fill the new selected containers
// TODO : Use the tree instead of the list
QTreeWidgetItemIterator it(_nodes_selected);
for (; *it; it++) {
if ((*it)->checkState(0) == Qt::Checked){
Container *cont = _trace->search_container((*it)->text(1).toStdString());
if (!cont) {
continue;
}
if (cont->get_type() == kind_of_container) {
_selected_containers.push_back(cont);
}
}
}
_number_of_selected_container = _selected_containers.size();
#ifdef STAT_DEBUG
for(unsigned int i = 0 ; i < _selected_containers.size() ; i ++) {
cout << _selected_containers[i]->get_alias() << endl;
}
#endif
}
void Stats_window::on_reload_button_clicked() {
int kind_of_diagram = _kind_of_diagram_box->currentIndex();
QString kind_of_state = _kind_of_state_box->currentText();
set_selected_nodes(kind_of_state.toStdString());
if(_selected_containers.empty()) {
*Message::get_instance() << tr("You must select at least one container to view the stats").toStdString() << Message::ende;
return ;
}
Reinit_scroll_bars();
// We get the times
_start_time = _start_time_widget->text().toDouble();
_end_time = _end_time_widget->text().toDouble();
// We create a drawer
DrawStats<Render_stats_opengl> *drawer;
switch (kind_of_diagram) {
case _HDIAGRAM_INDEX:
drawer = new DrawHDiagram<Render_stats_opengl>();
break;
case _DIAGRAM_INDEX:
drawer = new DrawVDiagram<Render_stats_opengl>();
break;
case _COUNTER_INDEX:
drawer = new DrawCounter<Render_stats_opengl>();
break;
default:
*Message::get_instance() << _kind_of_diagram_box->currentText().toStdString()
<< tr(" not yet implemented").toStdString() << Message::endw;
drawer = new DrawHDiagram<Render_stats_opengl>();
}
drawer->set_times(_start_time, _end_time);
drawer->build(_ui_stats_area, _selected_containers);
_ui_stats_area->updateGL();
delete drawer;
}
void Stats_window::on_export_button_clicked(){
int kind_of_diagram = _kind_of_diagram_box->currentIndex();
QString kind_of_state = _kind_of_state_box->currentText();
set_selected_nodes(kind_of_state.toStdString());
if(_selected_containers.empty()) {
*Message::get_instance() << tr("You must select at least one container to export the stats").toStdString() << Message::ende;
return ;
}
Reinit_scroll_bars();
// We get the times
_start_time = _start_time_widget->text().toDouble();
_end_time = _end_time_widget->text().toDouble();
const QString path_by_default = QString(_file_viewed.substr(0, _file_viewed.find_last_of('.')).c_str()) + ".svg";
QString filename = QFileDialog::getSaveFileName(this, tr("Export File"),
path_by_default,
tr("Images (*.svg)"));
if (filename.isEmpty()) {
*Message::get_instance() << tr("You must select a name for the file").toStdString() << Message::ende;
return ;
}
else {
// Adding .svg to the end
if(!filename.endsWith(".svg")) {
filename += ".svg";
}
}
// We create a drawer
Render_stats_svg svg(filename.toStdString());
DrawStats<Render_stats_svg> *drawer;
switch (kind_of_diagram) {
case _HDIAGRAM_INDEX:
drawer = new DrawHDiagram<Render_stats_svg>();
break;
case _DIAGRAM_INDEX:
drawer = new DrawVDiagram<Render_stats_svg>();
break;
case _COUNTER_INDEX:
drawer = new DrawCounter<Render_stats_svg>();
break;
default:
*Message::get_instance() << _kind_of_diagram_box->currentText().toStdString()
<< tr(" not yet implemented").toStdString() << Message::endw;
drawer = new DrawHDiagram<Render_stats_svg>();
}
drawer->set_times(_start_time, _end_time);
drawer->build(&svg, _selected_containers);
delete drawer;
}
void Stats_window::close_window(){
_ui_stats_area->clear();
_ui_stats_area->doneCurrent();
hide();
}
void Stats_window::auto_update_stats() {
if(!_auto_reload_when_zoom)
return;
// We update the times on the text bars
_start_time = Info::Render::_x_min_visible;
_end_time = Info::Render::_x_max_visible;
QString temp;
temp.setNum(_start_time);
_start_time_widget->setText(temp);
temp.setNum(_end_time);
_end_time_widget->setText(temp);
// We reload the stats
on_reload_button_clicked();
}
void Stats_window::on_auto_reload_box_stateChanged(int) {
_auto_reload_when_zoom = auto_reload_box->isChecked();
}
// new_value is between 0 and 99
void Stats_window::on_y_scroll_valueChanged(int new_value) {
_ui_stats_area->translate_y(new_value);
_y_translated = new_value;
}
// new_value is between 0 and 99
void Stats_window::on_x_scroll_valueChanged(int new_value) {
_ui_stats_area->translate_x(new_value);
_x_translated = new_value;
}
void Stats_window::Reinit_scroll_bars() {
_ui_stats_area->translate_x(0);
_ui_stats_area->translate_y(0);
x_scroll->setSliderPosition(0);
y_scroll->setSliderPosition(0);
}
void Stats_window::keyPressEvent(QKeyEvent *event) {
switch (event->key()) {
case Qt::Key_Left:
// Key 'left' pressed.
if(_x_translated > 0) {
_ui_stats_area->translate_x(--_x_translated);
x_scroll->setSliderPosition(_x_translated);
}
break;
case Qt::Key_Right:
// Key 'right' pressed.
if(_x_translated < 99) {
_ui_stats_area->translate_x(++_x_translated);
x_scroll->setSliderPosition(_x_translated);
}
break;
case Qt::Key_Up:
// Key 'up' pressed.
if(_y_translated > 0) {
_ui_stats_area->translate_y(--_y_translated);
y_scroll->setSliderPosition(_y_translated);
}
break;
case Qt::Key_Down:
// Key 'down' pressed.
if(_y_translated < 99) {
_ui_stats_area->translate_y(++_y_translated);
y_scroll->setSliderPosition(_y_translated);
}
break;
case Qt::Key_PageUp:
// Key 'Page Up' pressed.
_ui_stats_area->translate_y(0);
y_scroll->setSliderPosition(0);
break;
case Qt::Key_PageDown:
// Key 'Page Down' pressed.
_ui_stats_area->translate_y(100);
y_scroll->setSliderPosition(100);
break;
default:
/*
* Unknown key pressed.
*/
break;
}
event->accept();
}
void Stats_window::init() {
// We set the names of the containers for the tree widget
_nodes_selected->clear();
if ( _trace != nullptr ) {
set_container_names();
}
// We init the times
_start_time = Info::Render::_x_min_visible;
_end_time = Info::Render::_x_max_visible;
QString temp;
temp.setNum(_start_time);
_start_time_widget->setText(temp);
temp.setNum(_end_time);
_end_time_widget->setText(temp);
_ui_stats_area->clear();
Reinit_scroll_bars();
}
void Stats_window::clear() {
_ui_stats_area->makeCurrent();
_nodes_selected->clear();
_ui_stats_area->clear();
_kind_of_state_box->clear();
Reinit_scroll_bars();
_ui_stats_area->doneCurrent();
}
void Stats_window::set_arguments(std::map<std::string /*argname*/, QVariant * /*argValue*/>) {
}
void Stats_window::execute() {
on_reload_button_clicked();
}
string Stats_window::get_name() {
return "Statistics window";
}
/*
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - COULOMB Kevin
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
**
*/
/*!
*\file Stats_window.hpp
*/
#ifndef STATS_WINDOW_HPP
#define STATS_WINDOW_HPP
class Render_stats_opengl;
class Stats_window;
/* For moc compilation */
#include <string>
#include <map>
#include <list>
/* -- */
#include "trace/values/Values.hpp"
#include "trace/EntityValue.hpp"
#include "trace/EntityTypes.hpp"
#include "trace/Entitys.hpp"
#include "trace/tree/Interval.hpp"
#include "trace/Trace.hpp"
/* -- */
#include "ui_stats_viewer.h"
#include "plugin/Plugin.hpp"
/*!
* \enum stattype
* \brief Enumeration for the kind of chart to print stats.
*
*/
typedef enum stattype {
_HDIAGRAM_INDEX = 0,
_DIAGRAM_INDEX,
_COUNTER_INDEX
} stattype_t;
/*!
* \class Stats_window
* \brief Class used to display statistics of containers.
*
*/
class Stats_window : public Plugin, protected Ui::stats_viewer {
Q_OBJECT
private:
std::string _file_viewed;
double _start_time;
double _end_time;
/**
* If we reload automatically the stats when a zoom is done (maybe look when the containers selection will be added if we do not add/remove them)
* -> a mettre dans le fichier de config
*/
bool _auto_reload_when_zoom;
/*!
* \brief Layout which will contain the stats area.
*/
QVBoxLayout* _ui_stats_area_layout;
Render_stats_opengl* _ui_stats_area;
std::vector<Container *> _selected_containers;
int _number_of_selected_container;
int _screen_width, _screen_height;
// For the scroll bars
int _x_translated, _y_translated;
public:
/*!
* Default constructor
* \param parent The parent widget of the window.
*/
Stats_window(QWidget *parent = nullptr);
~Stats_window() override;
/*!
* \fn set_container_names()
* \brief Set the names of the containers in the tree
*/
void set_container_names();
/*!
* \fn set_filename(std::string filename)
* \brief Set the name of the file trace.
* \param filename The file name.
*/
void set_filename(std::string filename);
/*!
* \fn set_trace(Trace *trace)
* \brief Set the trace parsed (give the container names)
* \param trace The trace.
*/
void set_trace(Trace *trace) override;
/*!
* \fn init_window()
* \brief Initialise the statistic window : set the container names,
the times and clear what could have been here before
*/
void init_window();
/*!
* \fn Reinit_scroll_bars()
* \brief Reinitialize the scroll bar to their default values (0)
*/
void Reinit_scroll_bars();
/*!
* \fn close_window()
* \brief Properly close the window
*/
void close_window();
/** Plugin interface **/
/*!
* \fn void set_arguments(std::map<std::string , QVariant *>);
* \brief Set the arguments of this plugin
*/
void set_arguments(std::map<std::string /*argname*/, QVariant * /*argValue*/>) override;
/*!
* \fn clear()
* \brief Clear the tab when switching between tabs
*/
void clear() override;
/*!
* \fn init()
* \brief Initialize the plugin
*/
void init() override;
/*!
* \fn execute()
* \brief Execute the plugin. Here it does the same as the reload button
*/
void execute() override;
/*!
* \fn std::string get_name();
* \brief Return the name of the plugin
*/
std::string get_name() override;
private:
void set_container_names_rec(QTreeWidgetItem *current_node, Container *current_container);
/*!
* \brief Fill the vector of selected containers depending on the ones chosen in the tree widget
*/
void set_selected_nodes(const std::string &);
/*!
* \brief This functions receives all keyboard events.
* \param event The event triggered by the keyboard event.
*/
void keyPressEvent(QKeyEvent *event) override;
public slots:
void auto_update_stats();
private slots:
void on_auto_reload_box_stateChanged(int);
void on_reload_button_clicked();
void on_export_button_clicked();
void on_y_scroll_valueChanged(int new_value);
void on_x_scroll_valueChanged(int new_value);
};
#endif // STATS_WINDOW_HPP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment