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

« back to all changes in this revision

Viewing changes to app/kipiinterface.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:
1
 
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
 
1
// vim: set tabstop=4 shiftwidth=4 expandtab:
2
2
/*
3
3
Gwenview: an image viewer
4
4
Copyright 2000-2008 Aurélien Gâteau <agateau@kde.org>
29
29
 
30
30
class QAction;
31
31
 
32
 
namespace Gwenview {
 
32
namespace Gwenview
 
33
{
33
34
 
34
35
struct KIPIInterfacePrivate;
35
36
 
36
37
class MainWindow;
37
38
 
38
 
class KIPIInterface :public KIPI::Interface {
39
 
        Q_OBJECT
 
39
class KIPIInterface : public KIPI::Interface
 
40
{
 
41
    Q_OBJECT
40
42
 
41
43
public:
42
 
        KIPIInterface(MainWindow*);
43
 
        virtual ~KIPIInterface();
44
 
 
45
 
        KIPI::ImageCollection currentAlbum();
46
 
        KIPI::ImageCollection currentSelection();
47
 
        QList<KIPI::ImageCollection> allAlbums();
48
 
        KIPI::ImageInfo info( const KUrl& url);
49
 
        int features() const;
50
 
        virtual bool addImage(const KUrl&, QString& err);
51
 
        virtual void delImage( const KUrl& );
52
 
        virtual void refreshImages( const KUrl::List& urls );
53
 
 
54
 
        virtual KIPI::ImageCollectionSelector* imageCollectionSelector(QWidget *parent);
55
 
        virtual KIPI::UploadWidget* uploadWidget(QWidget *parent);
56
 
 
57
 
        QList<QAction*> pluginActions(KIPI::Category) const;
 
44
    KIPIInterface(MainWindow*);
 
45
    virtual ~KIPIInterface();
 
46
 
 
47
    KIPI::ImageCollection currentAlbum();
 
48
    KIPI::ImageCollection currentSelection();
 
49
    QList<KIPI::ImageCollection> allAlbums();
 
50
    KIPI::ImageInfo info(const KUrl& url);
 
51
    int features() const;
 
52
    virtual bool addImage(const KUrl&, QString& err);
 
53
    virtual void delImage(const KUrl&);
 
54
    virtual void refreshImages(const KUrl::List& urls);
 
55
 
 
56
    virtual KIPI::ImageCollectionSelector* imageCollectionSelector(QWidget *parent);
 
57
    virtual KIPI::UploadWidget* uploadWidget(QWidget *parent);
 
58
 
 
59
    QList<QAction*> pluginActions(KIPI::Category) const;
58
60
 
59
61
public Q_SLOTS:
60
 
        void loadPlugins();
 
62
    void loadPlugins();
61
63
 
62
64
private Q_SLOTS:
63
 
        void slotSelectionChanged();
64
 
        void slotDirectoryChanged();
65
 
        void init();
66
 
        void loadOnePlugin();
 
65
    void slotSelectionChanged();
 
66
    void slotDirectoryChanged();
 
67
    void init();
 
68
    void loadOnePlugin();
67
69
 
68
70
private:
69
 
        KIPIInterfacePrivate* const d;
 
71
    KIPIInterfacePrivate* const d;
70
72
};
71
73
 
72
 
class ImageCollection : public KIPI::ImageCollectionShared {
 
74
class ImageCollection : public KIPI::ImageCollectionShared
 
75
{
73
76
public:
74
 
        ImageCollection(KUrl dirURL, const QString& name, const KUrl::List& images)
75
 
        : KIPI::ImageCollectionShared()
76
 
    , mDirURL(dirURL)
77
 
    , mName(name)
78
 
    , mImages(images) {}
 
77
    ImageCollection(KUrl dirURL, const QString& name, const KUrl::List& images)
 
78
        : KIPI::ImageCollectionShared()
 
79
        , mDirURL(dirURL)
 
80
        , mName(name)
 
81
        , mImages(images) {}
79
82
 
80
 
        QString name()           { return mName; }
81
 
        QString comment()        { return QString(); }
82
 
        KUrl::List images()      { return mImages; }
83
 
        KUrl uploadRoot()        { return KUrl("/"); }
84
 
        KUrl uploadPath()        { return mDirURL; }
85
 
        QString uploadRootName() { return "/"; }
86
 
        bool isDirectory()       { return true; }
 
83
    QString name()           {
 
84
        return mName;
 
85
    }
 
86
    QString comment()        {
 
87
        return QString();
 
88
    }
 
89
    KUrl::List images()      {
 
90
        return mImages;
 
91
    }
 
92
    KUrl uploadRoot()        {
 
93
        return KUrl("/");
 
94
    }
 
95
    KUrl uploadPath()        {
 
96
        return mDirURL;
 
97
    }
 
98
    QString uploadRootName() {
 
99
        return "/";
 
100
    }
 
101
    bool isDirectory()       {
 
102
        return true;
 
103
    }
87
104
 
88
105
private:
89
106
    KUrl mDirURL;
90
 
        QString mName;
91
 
        KUrl::List mImages;
 
107
    QString mName;
 
108
    KUrl::List mImages;
92
109
};
93
110
 
94
111
} // namespace