##// END OF EJS Templates
Sets the name of the plugin for products and components...
Sets the name of the plugin for products and components Since there is only one common root in the data source widget, it is no longer possible to retrieve on the fly the name of the plugin in which a component or product is located. This name is therefore attached to their creation.

File last commit:

r1074:53c9cf446448
r1076:9c3bb5e93c54
Show More
DataSourceWidget.h
47 lines | 1.2 KiB | text/x-c | CLexer
#ifndef SCIQLOP_DATASOURCEWIDGET_H
#define SCIQLOP_DATASOURCEWIDGET_H
#include <QWidget>
#include <memory>
namespace Ui {
class DataSourceWidget;
} // Ui
class DataSourceItem;
/**
* @brief The DataSourceWidget handles the graphical representation (as a tree) of the data sources
* attached to SciQlop.
*/
class DataSourceWidget : public QWidget {
Q_OBJECT
public:
explicit DataSourceWidget(QWidget *parent = 0);
virtual ~DataSourceWidget() noexcept;
public slots:
/**
* Adds a data source. An item associated to the data source is created and then added to the
* representation tree
* @param dataSource the data source to add. The pointer has to be not null
*/
void addDataSource(DataSourceItem *dataSource) noexcept;
private:
void updateTreeWidget() noexcept;
Ui::DataSourceWidget *ui;
std::unique_ptr<DataSourceItem> m_Root;
private slots:
/// Slot called when the filtering text has changed
void filterChanged(const QString &text) noexcept;
/// Slot called when right clicking on an item in the tree (displays a menu)
void onTreeMenuRequested(const QPoint &pos) noexcept;
};
#endif // SCIQLOP_DATASOURCEWIDGET_H