diff options
Diffstat (limited to 'plugins/Themes/Oxygen/TransferModel.h')
-rw-r--r-- | plugins/Themes/Oxygen/TransferModel.h | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/plugins/Themes/Oxygen/TransferModel.h b/plugins/Themes/Oxygen/TransferModel.h index d2a4a1c..e572f9e 100644 --- a/plugins/Themes/Oxygen/TransferModel.h +++ b/plugins/Themes/Oxygen/TransferModel.h @@ -9,6 +9,10 @@ #include <QSet> #include <QIcon> #include <QString> +#include <unordered_map> +#include <unordered_set> +#include <set> +#include <vector> #include "StructEnumDefinition.h" #include "Environment.h" @@ -23,15 +27,15 @@ public: /// \brief the transfer item displayed struct TransfertItem { - quint64 id; - QString source; - QString size; - QString destination; + uint64_t id; + std::string source; + std::string size; + std::string destination; }; /// \brief the transfer item with progression struct ItemOfCopyListWithMoreInformations { - quint64 currentReadProgression,currentWriteProgression; + uint64_t currentReadProgression,currentWriteProgression; Ultracopier::ItemOfCopyList generalData; Ultracopier::ActionTypeCopyList actionType; bool custom_with_progression; @@ -39,11 +43,11 @@ public: /// \brief returned first transfer item struct currentTransfertItem { - quint64 id; + uint64_t id; bool haveItem; - QString from; - QString to; - QString current_file; + std::string from; + std::string to; + std::string current_file; int progressBar_read,progressBar_write; }; @@ -55,37 +59,37 @@ public: virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); - QList<quint64> synchronizeItems(const QList<Ultracopier::ReturnActionOnCopyList>& returnActions); + std::vector<uint64_t> synchronizeItems(const std::vector<Ultracopier::ReturnActionOnCopyList>& returnActions); void setFacilityEngine(FacilityInterface * facilityEngine); - int search(const QString &text,bool searchNext); - int searchPrev(const QString &text); + int search(const std::string &text,bool searchNext); + int searchPrev(const std::string &text); - void setFileProgression(QList<Ultracopier::ProgressionItem> &progressionList); + void setFileProgression(std::vector<Ultracopier::ProgressionItem> &progressionList); currentTransfertItem getCurrentTransfertItem() const; - quint64 firstId() const; + uint64_t firstId() const; protected: - QList<TransfertItem> transfertItemList;///< To have a transfer list for the user - QSet<quint64> startId,stopId;///< To show what is started, what is stopped - QHash<quint64,ItemOfCopyListWithMoreInformations> internalRunningOperation;///< to have progression and stat + std::vector<TransfertItem> transfertItemList;///< To have a transfer list for the user + std::set<uint64_t> startId,stopId;///< To show what is started, what is stopped + std::unordered_map<uint64_t,ItemOfCopyListWithMoreInformations> internalRunningOperation;///< to have progression and stat private: int loop_size,index_for_loop; int sub_loop_size,sub_index_for_loop; int row,column; FacilityInterface * facilityEngine; - QString search_text; + std::string search_text; /// \brief index from start the search, decresed by remove before it int currentIndexSearch; bool haveSearchItem; - quint64 searchId; + uint64_t searchId; static QIcon *start; static QIcon *stop; signals: #ifdef ULTRACOPIER_PLUGIN_DEBUG /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,QString fonction,QString text,QString file,int ligne) const; + void debugInformation(const Ultracopier::DebugLevel &level,std::string fonction,std::string text,std::string file,int ligne) const; #endif }; |