##// END OF EJS Templates
Really basic implementation of Downloader which might replace current...
Really basic implementation of Downloader which might replace current NetworkController It is currently really basic, it only does synchronous DLs with or without authentication. It is written to isolate as much as possible Qt Network classes. Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r1340:02cea38fdcb4
r1342:91cbf8a85daf
Show More
VariableController.h
148 lines | 5.5 KiB | text/x-c | CLexer
/ core / include / Variable / VariableController.h
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 #ifndef SCIQLOP_VARIABLECONTROLLER_H
#define SCIQLOP_VARIABLECONTROLLER_H
Alexandre Leroux
Exports core module as a shared library...
r461 #include "CoreGlobal.h"
Implementation of V5 acquisition
r539 #include <Data/AcquisitionDataPacket.h>
Change SqpRange for SqpDateTime
r512 #include <Data/SqpRange.h>
The mock plugin can now create data with view operation
r235
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 #include <QLoggingCategory>
#include <QObject>
Added Meson support....
r620 #include <QUuid>
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111
#include <Common/spimpl.h>
Alexandre Leroux
Updates VariableController::createVariable() method...
r166 class IDataProvider;
Temporal parameters of the selected variables can be updated using the...
r304 class QItemSelectionModel;
Time widget is now used with the variable createion request
r193 class TimeController;
Alexandre Leroux
Adds Variable model in the Variable controller
r113 class Variable;
Alexandre Leroux
Affects model to the Variable Widget
r152 class VariableModel;
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 Q_DECLARE_LOGGING_CATEGORY(LOG_VariableController)
Implementation of V5 acquisition
r539
/**
* Possible types of zoom operation
*/
enum class AcquisitionZoomType { ZoomOut, ZoomIn, PanRight, PanLeft, Unknown };
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 /**
* @brief The VariableController class aims to handle the variables in SciQlop.
*/
Alexandre Leroux
Exports core module as a shared library...
r461 class SCIQLOP_CORE_EXPORT VariableController : public QObject {
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 Q_OBJECT
public:
explicit VariableController(QObject *parent = 0);
virtual ~VariableController();
Alexandre Leroux
Updates VariableController::createVariable() method...
r166 VariableModel *variableModel() noexcept;
Temporal parameters of the selected variables can be updated using the...
r304 QItemSelectionModel *variableSelectionModel() noexcept;
Alexandre Leroux
Updates VariableController::createVariable() method...
r166
Time widget is now used with the variable createion request
r193 void setTimeController(TimeController *timeController) noexcept;
Alexandre Leroux
Adds 'Duplicate' action on variable menu
r706 /**
* Clones the variable passed in parameter and adds the duplicate to the controller
* @param variable the variable to duplicate
* @return the duplicate created, nullptr if the variable couldn't be created
*/
std::shared_ptr<Variable> cloneVariable(std::shared_ptr<Variable> variable) noexcept;
Drop of variable, graph and zones on the time widget
r878 /// Returns the MIME data associated to a list of variables
Drag of variables
r849 QByteArray mimeDataForVariables(const QList<std::shared_ptr<Variable> > &variables) const;
Drop of variable, graph and zones on the time widget
r878
/// Returns the list of variables contained in a MIME data
Drag of variables
r849 QList<std::shared_ptr<Variable> > variablesForMimeData(const QByteArray &mimeData) const;
Implement of the abort download process
r422
Implementation of V5 acquisition
r539 static AcquisitionZoomType getZoomType(const SqpRange &range, const SqpRange &oldRange);
Added basic tests around Amda plugin Python wrapper...
r1340
/// Returns True if there are pending downloads
bool hasPendingDownloads();
Alexandre Leroux
Updates VariableController::createVariable() method...
r166 signals:
Alexandre Leroux
Variable deletion (7)...
r336 /// Signal emitted when a variable is about to be deleted from the controller
void variableAboutToBeDeleted(std::shared_ptr<Variable> variable);
Alexandre Leroux
Updates VariableController::createVariable() method...
r166
Add connection logical for the rescale operation
r437 /// Signal emitted when a data acquisition is requested on a range for a variable
Change SqpRange for SqpDateTime
r512 void rangeChanged(std::shared_ptr<Variable> variable, const SqpRange &range);
Add connection logical for the rescale operation
r437
add Skeleton for displaying data which are already in cache
r571 /// Signal emitted when a sub range of the cacheRange of the variable can be displayed
void updateVarDisplaying(std::shared_ptr<Variable> variable, const SqpRange &range);
Alexandre Leroux
Wait for the end of an acquisition to validate an operation (2)...
r1214 /// Signal emitted when all acquisitions related to the variables have been completed (whether
/// validated, canceled, or failed)
void acquisitionFinished();
Creates graph when dropping a product in the visu
r1288 void variableAdded(const std::shared_ptr<Variable> &variable);
Alexandre Leroux
Updates VariableController::createVariable() method...
r166 public slots:
Remove old graph from selected zones
r1291 /**
* Deletes from the controller the variable passed in parameter.
*
* Delete a variable includes:
* - the deletion of the various references to the variable in SciQlop
* - the deletion of the model variable
* - the deletion of the provider associated with the variable
* - removing the cache associated with the variable
*
* @param variable the variable to delete from the controller.
*/
void deleteVariable(std::shared_ptr<Variable> variable) noexcept;
/**
* Deletes from the controller the variables passed in parameter.
* @param variables the variables to delete from the controller.
* @sa deleteVariable()
*/
void deleteVariables(const QVector<std::shared_ptr<Variable> > &variables) noexcept;
Implementation of V5 acquisition
r539 /// Request the data loading of the variable whithin range
void onRequestDataLoading(QVector<std::shared_ptr<Variable> > variables, const SqpRange &range,
Implémentation timewidget
r811 bool synchronise);
Alexandre Leroux
Adds Variable model in the Variable controller
r113 /**
Alexandre Leroux
Updates VariableController::createVariable() method...
r166 * Creates a new variable and adds it to the model
Alexandre Leroux
Adds Variable model in the Variable controller
r113 * @param name the name of the new variable
Alexandre Leroux
Updates variable creation to pass metadata...
r410 * @param metadata the metadata of the new variable
Alexandre Leroux
Updates VariableController::createVariable() method...
r166 * @param provider the data provider for the new variable
Add test acquisition.
r590 * @return the pointer to the new variable or nullptr if the creation failed
Alexandre Leroux
Adds Variable model in the Variable controller
r113 */
Add test acquisition.
r590 std::shared_ptr<Variable> createVariable(const QString &name, const QVariantHash &metadata,
std::shared_ptr<IDataProvider> provider) noexcept;
Alexandre Leroux
Adds Variable model in the Variable controller
r113
Temporal parameters of the selected variables can be updated using the...
r304 /// Update the temporal parameters of every selected variable to dateTime
Change SqpRange for SqpDateTime
r512 void onDateTimeOnSelection(const SqpRange &dateTime);
Temporal parameters of the selected variables can be updated using the...
r304
Drop TIME mime data on a variable
r933 /// Update the temporal parameters of the specified variable
void onUpdateDateTime(std::shared_ptr<Variable> variable, const SqpRange &dateTime);
Add implementation of progress bar on variable inspector connected to...
r401
Implementation of V5 acquisition
r539 void onDataProvided(QUuid vIdentifier, const SqpRange &rangeRequested,
const SqpRange &cacheRangeRequested,
QVector<AcquisitionDataPacket> dataAcquired);
Add implementation of progress bar on variable inspector connected to...
r401 void onVariableRetrieveDataInProgress(QUuid identifier, double progress);
Implementation of V5 acquisition
r539 /// Cancel the current request for the variable
Implement of the abort download process
r422 void onAbortProgressRequested(std::shared_ptr<Variable> variable);
Implementation of automatic cancel for request that failed
r761 void onAbortAcquisitionRequested(QUuid vIdentifier);
Implement of the abort download process
r422
Alexandre Leroux
Handles desynchronisation when removing variable from a graph (1)...
r737 // synchronization group methods
Implementation of V5 acquisition
r539 void onAddSynchronizationGroupId(QUuid synchronizationGroupId);
void onRemoveSynchronizationGroupId(QUuid synchronizationGroupId);
Add synchronization part of v5 acquisition
r540 void onAddSynchronized(std::shared_ptr<Variable> variable, QUuid synchronizationGroupId);
Implementation of V5 acquisition
r539
Alexandre Leroux
Handles desynchronisation when removing variable from a graph (1)...
r737 /// Desynchronizes the variable of the group whose identifier is passed in parameter
/// @remarks the method does nothing if the variable is not part of the group
void desynchronize(std::shared_ptr<Variable> variable, QUuid synchronizationGroupId);
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 void initialize();
void finalize();
private:
void waitForFinish();
class VariableControllerPrivate;
spimpl::unique_impl_ptr<VariableControllerPrivate> impl;
};
Added basic tests around Amda plugin Python wrapper...
r1340
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r111 #endif // SCIQLOP_VARIABLECONTROLLER_H