summaryrefslogtreecommitdiff
path: root/plugins/CopyEngine/Ultracopier-0.3/copyEngine.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CopyEngine/Ultracopier-0.3/copyEngine.h')
-rwxr-xr-x[-rw-r--r--]plugins/CopyEngine/Ultracopier-0.3/copyEngine.h98
1 files changed, 82 insertions, 16 deletions
diff --git a/plugins/CopyEngine/Ultracopier-0.3/copyEngine.h b/plugins/CopyEngine/Ultracopier-0.3/copyEngine.h
index c903b12..66b3a4f 100644..100755
--- a/plugins/CopyEngine/Ultracopier-0.3/copyEngine.h
+++ b/plugins/CopyEngine/Ultracopier-0.3/copyEngine.h
@@ -20,6 +20,8 @@
#include "ui_options.h"
#include "Environment.h"
#include "ListThread.h"
+#include "Filters.h"
+#include "RenamingRules.h"
#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW
#include "debugDialog.h"
@@ -38,8 +40,9 @@ class copyEngine : public PluginInterface_CopyEngine
{
Q_OBJECT
public:
- copyEngine(FacilityInterface * facilityInterface);
+ copyEngine(FacilityInterface * facilityEngine);
~copyEngine();
+ void connectTheSignalsSlots();
private:
ListThread *listThread;
#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW
@@ -49,6 +52,9 @@ private:
Ui::options * ui;
bool uiIsInstalled;
QWidget * interface;
+ Filters * filters;
+ RenamingRules * renamingRules;
+ FacilityInterface * facilityEngine;
int maxSpeed;
bool doRightTransfer;
bool keepDate;
@@ -87,7 +93,24 @@ private:
FileErrorAction tempFileErrorAction;
FolderExistsAction tempFolderExistsAction;
FileExistsAction tempFileExistsAction;
- quint64 size_for_speed;
+ quint64 size_for_speed;//because direct access to list thread into the main thread can't be do
+ CopyMode mode;
+ bool forcedMode;
+
+ bool doChecksum;
+ bool checksumIgnoreIfImpossible;
+ bool checksumOnlyOnError;
+ bool osBuffer;
+ bool osBufferLimited;
+ unsigned int osBufferLimit;
+ QStringList includeStrings,includeOptions,excludeStrings,excludeOptions;
+ QString firstRenamingRule;
+ QString otherRenamingRule;
+
+ //send action done timer
+ QTimer timerActionDone;
+ //send progression timer
+ QTimer timerProgression;
private slots:
#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW
void updateTheDebugInfo(QStringList,QStringList,int);
@@ -107,6 +130,19 @@ private slots:
void rmPathErrorOnFolder(QFileInfo,QString,bool isCalledByShowOneNewDialog=false);
//show one new dialog if needed
void showOneNewDialog();
+ void sendNewFilters();
+
+ void doChecksum_toggled(bool);
+ void checksumOnlyOnError_toggled(bool);
+ void checksumIgnoreIfImpossible_toggled(bool);
+ void osBuffer_toggled(bool);
+ void osBufferLimited_toggled(bool);
+ void osBufferLimit_editingFinished();
+ void showFilterDialog();
+ void sendNewRenamingRules(QString firstRenamingRule,QString otherRenamingRule);
+ void showRenamingRules();
+ void get_realBytesTransfered(quint64 realBytesTransfered);
+ void newActionInProgess(EngineActionInProgress);
public:
/** \brief to send the options panel
* \return return false if have not the options
@@ -143,6 +179,10 @@ public:
* \param destination the destination to move
* \return true if the move have been accepted */
bool newMove(const QStringList &sources,const QString &destination);
+ /** \brief send the new transfer list
+ * \param file the transfer list */
+ void newTransferList(const QString &file);
+
/** \brief to get byte read, use by Ultracopier for the speed calculation
* real size transfered to right speed calculation */
quint64 realByteTransfered();
@@ -163,6 +203,15 @@ public:
/** \brief to sync the transfer list
* Used when the interface is changed, useful to minimize the memory size */
void syncTransferList();
+
+ void set_doChecksum(bool doChecksum);
+ void set_checksumIgnoreIfImpossible(bool checksumIgnoreIfImpossible);
+ void set_checksumOnlyOnError(bool checksumOnlyOnError);
+ void set_osBuffer(bool osBuffer);
+ void set_osBufferLimited(bool osBufferLimited);
+ void set_osBufferLimit(unsigned int osBufferLimit);
+ void set_setFilters(QStringList includeStrings,QStringList includeOptions,QStringList excludeStrings,QStringList excludeOptions);
+ void setRenamingRules(QString firstRenamingRule,QString otherRenamingRule);
public slots:
//user ask ask to add folder (add it with interface ask source/destination)
/** \brief add folder called on the interface
@@ -197,10 +246,14 @@ public slots:
/** \brief move on bottom of the list the selected item
* \param ids ids is the id list of the selected items */
void moveItemsOnBottom(const QList<int> &ids);
+
+ /** \brief give the forced mode, to export/import transfer list */
+ void forceMode(const CopyMode &mode);
/// \brief export the transfer list into a file
void exportTransferList();
/// \brief import the transfer list into a file
void importTransferList();
+
/** \brief to set the speed limitation
* -1 if not able, 0 if disabled */
bool setSpeedLimitation(const qint64 &speedLimitation);
@@ -250,37 +303,46 @@ signals:
* first = current transfered byte, second = byte to transfer */
void pushGeneralProgression(const quint64 &,const quint64 &);
- void newFolderListing(QString path);
- void newCollisionAction(QString action);
- void newErrorAction(QString action);
+ void newFolderListing(const QString &path);
+ void newCollisionAction(const QString &action);
+ void newErrorAction(const QString &action);
void isInPause(bool);
//action on the copy
void signal_pause();
void signal_resume();
- void signal_skip(quint64 id);
+ void signal_skip(const quint64 &id);
//edit the transfer list
- void signal_removeItems(QList<int> ids);
- void signal_moveItemsOnTop(QList<int> ids);
- void signal_moveItemsUp(QList<int> ids);
- void signal_moveItemsDown(QList<int> ids);
- void signal_moveItemsOnBottom(QList<int> ids);
- void signal_exportTransferList(QString fileName);
- void signal_importTransferList(QString fileName);
+ void signal_removeItems(const QList<int> &ids);
+ void signal_moveItemsOnTop(const QList<int> &ids);
+ void signal_moveItemsUp(const QList<int> &ids);
+ void signal_moveItemsDown(const QList<int> &ids);
+ void signal_moveItemsOnBottom(const QList<int> &ids);
+
+ void signal_forceMode(const CopyMode &mode);
+ void signal_exportTransferList(const QString &fileName);
+ void signal_importTransferList(const QString &fileName);
//action
void signal_setCollisionAction(FileExistsAction alwaysDoThisActionForFileExists);
void signal_setComboBoxFolderColision(FolderExistsAction action);
void signal_setFolderColision(FolderExistsAction action);
+ //when the cancel is clicked on copy engine dialog
void cancelAll();
+ //internal cancel
+ void tryCancel();
+
+ //when can be deleted
+ void canBeDeleted();
+
//send error occurred
- void error(QString path,quint64 size,QDateTime mtime,QString error);
+ void error(const QString &path,const quint64 &size,const QDateTime &mtime,const QString &error);
//for the extra logging
- void rmPath(QString path);
- void mkPath(QString path);
+ void rmPath(const QString &path);
+ void mkPath(const QString &path);
#ifdef ULTRACOPIER_PLUGIN_DEBUG
/// \brief To debug source
void debugInformation(DebugLevel level,QString fonction,QString text,QString file,int ligne);
@@ -288,6 +350,10 @@ signals:
//other signals
void queryOneNewDialog();
+
+ void send_osBufferLimit(const unsigned int &osBufferLimit);
+ void send_setFilters(const QList<Filters_rules> &include,const QList<Filters_rules> &exclude);
+ void send_sendNewRenamingRules(QString firstRenamingRule,QString otherRenamingRule);
};
#endif // COPY_ENGINE_H