~carlos-mazieri/ubuntu-filemanager-app/model

« back to all changes in this revision

Viewing changes to folderlistmodel/trash/trashlocation.h

  • Committer: carlos-mazieri
  • Date: 2014-05-01 18:41:27 UTC
  • Revision ID: carlos.mazieri@gmail.com-20140501184127-7kkuk513fkz7rlwx
added moveToTrash, removeFromTrash, restoreFromTrash and emptyTrash facilities.
Test View remade to use selection.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    Q_OBJECT
33
33
public:
34
34
    explicit TrashLocation(int type, QObject *parent=0);
 
35
    ~TrashLocation();
35
36
    virtual bool        becomeParent();
36
37
    virtual void        refreshInfo();
37
38
    virtual void        fetchItems(QDir::Filter dirFilter, bool recursive=0);
44
45
 
45
46
    virtual DirItemInfo *validateUrlPath(const QString& urlPath);
46
47
 
 
48
    /*!
 
49
     * \brief getMovePairPaths() Get: original path and destination trash path
 
50
     *
 
51
     *
 
52
     * \param item desired item to be moved into Trash
 
53
     *
 
54
     * \return an \ref ActionPaths that contains the source orginal file and
 
55
     *                 the suitable Trash path where the source will moved into
 
56
     */
 
57
    ActionPaths         getMovePairPaths(const DirItemInfo& item) const;
 
58
 
 
59
    /*!
 
60
     * \brief getRestorePairPaths() Get: Trash path as source and item original path as destination
 
61
     *
 
62
     * \param item desired to be restored from Trash
 
63
     *
 
64
     * \return n \ref ActionPaths that contains the thash item and
 
65
     *                 the original source path as destionation
 
66
     */
 
67
    ActionPaths         getRestorePairPaths(const DirItemInfo& item) const;
 
68
 
47
69
private:
48
70
    void               addTrashFetchRequest(TrashListWorker *workerObject);
49
71
 
50
 
public slots:
 
72
private:
 
73
    ActionPathList     m_actionPathList;
51
74
 
52
75
};
53
76