~ubuntu-branches/ubuntu/precise/gwenview/precise-proposed

« back to all changes in this revision

Viewing changes to app/contextmanager.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:54 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20111215141754-z043hyx69dulbggf
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
class QItemSelectionModel;
31
31
class QModelIndex;
32
32
 
33
 
namespace Gwenview {
 
33
namespace Gwenview
 
34
{
34
35
 
35
36
class SortedDirModel;
36
37
 
39
40
struct ContextManagerPrivate;
40
41
 
41
42
/**
42
 
 * Manage the update of the contextual parts of the applications, 
 
43
 * Manage the update of the contextual parts of the applications,
43
44
 * like the sidebar or the context menu.
44
45
 */
45
 
class ContextManager : public QObject {
46
 
        Q_OBJECT
 
46
class ContextManager : public QObject
 
47
{
 
48
    Q_OBJECT
47
49
public:
48
 
        ContextManager(SortedDirModel*, QItemSelectionModel*, QObject* parent);
49
 
 
50
 
        ~ContextManager();
51
 
 
52
 
        void addItem(AbstractContextManagerItem* item);
53
 
 
54
 
        KUrl currentUrl() const;
55
 
 
56
 
        void setCurrentDirUrl(const KUrl&);
57
 
 
58
 
        KUrl currentDirUrl() const;
59
 
 
60
 
        void setCurrentUrl(const KUrl& currentUrl);
61
 
 
62
 
        KFileItemList selectedFileItemList() const;
63
 
 
64
 
        SortedDirModel* dirModel() const;
65
 
 
66
 
        /**
67
 
         * If true, selectedFileItemList() will only return current url
68
 
         * (useful in view mode)
69
 
         */
70
 
        void setOnlyCurrentUrl(bool onlyCurrentUrl);
 
50
    ContextManager(SortedDirModel*, QItemSelectionModel*, QObject* parent);
 
51
 
 
52
    ~ContextManager();
 
53
 
 
54
    void addItem(AbstractContextManagerItem* item);
 
55
 
 
56
    KUrl currentUrl() const;
 
57
 
 
58
    void setCurrentDirUrl(const KUrl&);
 
59
 
 
60
    KUrl currentDirUrl() const;
 
61
 
 
62
    void setCurrentUrl(const KUrl& currentUrl);
 
63
 
 
64
    KFileItemList selectedFileItemList() const;
 
65
 
 
66
    SortedDirModel* dirModel() const;
 
67
 
 
68
    /**
 
69
     * If true, selectedFileItemList() will only return current url
 
70
     * (useful in view mode)
 
71
     */
 
72
    void setOnlyCurrentUrl(bool onlyCurrentUrl);
71
73
 
72
74
Q_SIGNALS:
73
 
        void selectionChanged();
74
 
        void selectionDataChanged();
75
 
        void currentDirUrlChanged();
 
75
    void selectionChanged();
 
76
    void selectionDataChanged();
 
77
    void currentDirUrlChanged();
76
78
 
77
79
private Q_SLOTS:
78
 
        void slotDirModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
79
 
        void slotSelectionChanged();
80
 
        void slotCurrentChanged(const QModelIndex&);
81
 
        void emitQueuedSignals();
 
80
    void slotDirModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
 
81
    void slotSelectionChanged();
 
82
    void slotCurrentChanged(const QModelIndex&);
 
83
    void emitQueuedSignals();
82
84
 
83
85
private:
84
 
        ContextManagerPrivate* const d;
 
86
    ContextManagerPrivate* const d;
85
87
};
86
88
 
87
89
} // namespace