##// END OF EJS Templates
unthread the catalogue controller
unthread the catalogue controller

File last commit:

r1236:5ad3c2260734
r1236:5ad3c2260734
Show More
CatalogueController.h
80 lines | 2.7 KiB | text/x-c | CLexer
/ core / include / Catalogue / CatalogueController.h
correction of merge
r1059 #ifndef SCIQLOP_CATALOGUECONTROLLER_H
#define SCIQLOP_CATALOGUECONTROLLER_H
#include "CoreGlobal.h"
#include <Data/SqpRange.h>
#include <QLoggingCategory>
#include <QObject>
#include <QUuid>
#include <Common/spimpl.h>
Add retrieve events impl
r1125 #include <memory>
class DBCatalogue;
class DBEvent;
Add missing methods
r1227 class DBEventProduct;
Add retrieve events impl
r1125
correction of merge
r1059 Q_DECLARE_LOGGING_CATEGORY(LOG_CatalogueController)
class DataSourceItem;
class Variable;
/**
Add retrieve events impl
r1125 * @brief The CatalogueController class aims to handle catalogues and event using the CatalogueAPI
* library.
correction of merge
r1059 */
class SCIQLOP_CORE_EXPORT CatalogueController : public QObject {
Q_OBJECT
public:
explicit CatalogueController(QObject *parent = 0);
virtual ~CatalogueController();
Add retrieve events impl
r1125 // DB
Add Catalogue methods
r1159 QStringList getRepositories() const;
Add retrieve events impl
r1125 void addDB(const QString &dbPath);
void saveDB(const QString &destinationPath, const QString &repository);
// Event
Add Catalogue methods
r1159 /// retrieveEvents with empty repository retrieve them from the default repository
Add retrieve events impl
r1125 std::list<std::shared_ptr<DBEvent> > retrieveEvents(const QString &repository) const;
std::list<std::shared_ptr<DBEvent> > retrieveAllEvents() const;
CatalogueController: add few basic methods + commit the one not yet implemented
r1128 std::list<std::shared_ptr<DBEvent> >
Adaptation to the shared pointers of catalogue controller
r1143 retrieveEventsFromCatalogue(std::shared_ptr<DBCatalogue> catalogue) const;
Add Catalogue methods
r1159 void addEvent(std::shared_ptr<DBEvent> event);
void updateEvent(std::shared_ptr<DBEvent> event);
Add missing methods
r1227 void updateEventProduct(std::shared_ptr<DBEventProduct> eventProduct);
Add Catalogue methods
r1159 void removeEvent(std::shared_ptr<DBEvent> event);
CatalogueController: add few basic methods + commit the one not yet implemented
r1128 // void trashEvent(std::shared_ptr<DBEvent> event);
// void restore(QUuid eventId);
Add Catalogue methods
r1159 void saveEvent(std::shared_ptr<DBEvent> event);
correction of merge
r1059
Add retrieve events impl
r1125 // Catalogue
CatalogueController: add few basic methods + commit the one not yet implemented
r1128 // bool createCatalogue(const QString &name, QVector<QUuid> eventList);
Add Catalogue methods
r1159 /// retrieveEvents with empty repository retrieve them from the default repository
Adaptation to last version of catalogue controller
r1164 std::list<std::shared_ptr<DBCatalogue> > retrieveCatalogues(const QString &repository
= QString()) const;
Add Catalogue methods
r1159 void updateCatalogue(std::shared_ptr<DBCatalogue> catalogue);
void removeCatalogue(std::shared_ptr<DBCatalogue> catalogue);
void saveCatalogue(std::shared_ptr<DBCatalogue> catalogue);
void saveAll();
correction of merge
r1059
Drop of events on a catalogue
r1230 /// Returns the MIME data associated to a list of variables
QByteArray mimeDataForEvents(const QVector<std::shared_ptr<DBEvent> > &events) const;
/// Returns the list of variables contained in a MIME data
QVector<std::shared_ptr<DBEvent> > eventsForMimeData(const QByteArray &mimeData) const;
correction of merge
r1059 public slots:
/// Manage init/end of the controller
void initialize();
private:
class CatalogueControllerPrivate;
spimpl::unique_impl_ptr<CatalogueControllerPrivate> impl;
};
#endif // SCIQLOP_CATALOGUECONTROLLER_H