1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef FMOPERATIONMOVE_H |
|
19 #define FMOPERATIONMOVE_H |
|
20 #include <QObject> |
|
21 #include <QString> |
|
22 |
|
23 #include "fmoperationbase.h" |
|
24 |
|
25 class FmOperationMove : public FmOperationBase |
|
26 { |
|
27 Q_OBJECT |
|
28 public: |
|
29 explicit FmOperationMove( QObject *parent, QStringList sourceList, QString targetPath ); |
|
30 virtual ~FmOperationMove(); |
|
31 QStringList sourceList(); |
|
32 QString targetPath(); |
|
33 int start( volatile bool *isStopped, QString *errString ); |
|
34 |
|
35 signals: |
|
36 void askForRename( const QString &srcFile, QString *destFile ); |
|
37 void askForReplace( const QString &srcFile, const QString &destFile, bool *isAccepted ); |
|
38 void notifyPreparing( bool cancelable ); |
|
39 void notifyStart( bool cancelable, int maxSteps ); |
|
40 void notifyProgress( int currentStep ); |
|
41 |
|
42 private: |
|
43 int move( const QString &source, const QString &targetPath, const QString &newTargetName = QString() ); |
|
44 int moveDirInsideContent( const QString &srcPath, const QString &destPath ); |
|
45 void IncreaseProgress( quint64 size ); |
|
46 |
|
47 private: |
|
48 QStringList mSourceList; |
|
49 QString mTargetPath; |
|
50 |
|
51 private: |
|
52 volatile bool *mStop; |
|
53 quint64 mTotalSize; |
|
54 QString *mErrString; |
|
55 |
|
56 quint64 mMovedSize; |
|
57 int mTotalSteps; |
|
58 int mCurrentStep; |
|
59 }; |
|
60 |
|
61 #endif |
|