##// END OF EJS Templates
Removes unused methods
Removes unused methods

File last commit:

r471:d00d6fd96c10
r602:63310f797e77
Show More
VariableModel.h
80 lines | 2.4 KiB | text/x-c | CLexer
Alexandre Leroux
Creates the variable model...
r107 #ifndef SCIQLOP_VARIABLEMODEL_H
#define SCIQLOP_VARIABLEMODEL_H
Alexandre Leroux
Exports core module as a shared library...
r425 #include "CoreGlobal.h"
A variable is now created with its dateTime too....
r212
Change SqpRange for SqpDateTime
r471 #include <Data/SqpRange.h>
Alexandre Leroux
Creates the variable model...
r107
Alexandre Leroux
Adapts VariableModel to be a QabstractTableModel...
r140 #include <QAbstractTableModel>
Alexandre Leroux
Creates the variable model...
r107 #include <QLoggingCategory>
Alexandre Leroux
Fixes refresh problem in Variable widget
r340 #include <Common/MetaTypes.h>
A variable is now created with its dateTime too....
r212 #include <Common/spimpl.h>
Alexandre Leroux
Creates the variable model...
r107 Q_DECLARE_LOGGING_CATEGORY(LOG_VariableModel)
Correction MR
r370 enum VariableRoles { ProgressRole = Qt::UserRole };
Add implementation of progress bar on variable inspector connected to...
r369
Alexandre Leroux
Updates VariableModel::createVariable() method...
r153 class IDataSeries;
Alexandre Leroux
Creates the variable model...
r107 class Variable;
/**
* @brief The VariableModel class aims to hold the variables that have been created in SciQlop
*/
Alexandre Leroux
Exports core module as a shared library...
r425 class SCIQLOP_CORE_EXPORT VariableModel : public QAbstractTableModel {
Implement of the abort download process
r388 Q_OBJECT
Alexandre Leroux
Creates the variable model...
r107 public:
Alexandre Leroux
Adapts VariableModel to be a QabstractTableModel...
r140 explicit VariableModel(QObject *parent = nullptr);
Alexandre Leroux
Creates the variable model...
r107
/**
* Creates a new variable in the model
* @param name the name of the new variable
A variable is now created with its dateTime too....
r212 * @param dateTime the dateTime of the new variable
Alexandre Leroux
Updates variable creation to pass metadata...
r377 * @param metadata the metadata associated to the new variable
Alexandre Leroux
Updates VariableModel::createVariable() method...
r153 * @return the pointer to the new variable
Alexandre Leroux
Creates the variable model...
r107 */
Change SqpRange for SqpDateTime
r471 std::shared_ptr<Variable> createVariable(const QString &name, const SqpRange &dateTime,
Alexandre Leroux
Updates variable creation to pass metadata...
r377 const QVariantHash &metadata) noexcept;
Alexandre Leroux
Creates the variable model...
r107
Alexandre Leroux
Variable deletion (3)...
r306 /**
* Deletes a variable from the model, if it exists
* @param variable the variable to delete
*/
void deleteVariable(std::shared_ptr<Variable> variable) noexcept;
Add implementation of progress bar on variable inspector connected to...
r369
Alexandre Leroux
Retrieves the current selected variable when clicking on the variable widget
r229 std::shared_ptr<Variable> variable(int index) const;
Add implementation of progress bar on variable inspector connected to...
r369 void setDataProgress(std::shared_ptr<Variable> variable, double progress);
Implement of the abort download process
r388
Alexandre Leroux
Adapts VariableModel to be a QabstractTableModel...
r140 // /////////////////////////// //
// QAbstractTableModel methods //
// /////////////////////////// //
Add implementation of progress bar on variable inspector connected to...
r369
Alexandre Leroux
Adapts VariableModel to be a QabstractTableModel...
r140 virtual int columnCount(const QModelIndex &parent = QModelIndex{}) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex{}) const override;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const override;
Implement of the abort download process
r388
void abortProgress(const QModelIndex &index);
signals:
void abortProgessRequested(std::shared_ptr<Variable> variable);
Alexandre Leroux
Creates the variable model...
r107 private:
class VariableModelPrivate;
spimpl::unique_impl_ptr<VariableModelPrivate> impl;
Alexandre Leroux
Fixes refresh problem in Variable widget
r340
private slots:
/// Slot called when data of a variable has been updated
void onVariableUpdated() noexcept;
Alexandre Leroux
Creates the variable model...
r107 };
Alexandre Leroux
Fixes refresh problem in Variable widget
r340 // Registers QVector<int> metatype so it can be used in VariableModel::dataChanged() signal
SCIQLOP_REGISTER_META_TYPE(QVECTOR_INT_REGISTRY, QVector<int>)
Alexandre Leroux
Creates the variable model...
r107 #endif // SCIQLOP_VARIABLEMODEL_H