Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/backgroundlistmodel.h
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | 60 | public: | |||
---|---|---|---|---|---|
79 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; | 79 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; | ||
80 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override ; | 80 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override ; | ||
81 | bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override; | 81 | bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override; | ||
82 | KPackage::Package package(int index) const; | 82 | KPackage::Package package(int index) const; | ||
83 | 83 | | |||
84 | void reload(); | 84 | void reload(); | ||
85 | void reload(const QStringList &selected); | 85 | void reload(const QStringList &selected); | ||
86 | void addBackground(const QString &path); | 86 | void addBackground(const QString &path); | ||
87 | void removeBackground(const QString &path); | ||||
87 | Q_INVOKABLE int indexOf(const QString &path) const; | 88 | Q_INVOKABLE int indexOf(const QString &path) const; | ||
88 | virtual bool contains(const QString &bg) const; | 89 | virtual bool contains(const QString &bg) const; | ||
89 | 90 | | |||
90 | int count() const {return m_packages.size();} | 91 | int count() const {return m_packages.size();} | ||
91 | 92 | | |||
92 | Q_INVOKABLE void openContainingFolder(int rowIndex); | 93 | Q_INVOKABLE void openContainingFolder(int rowIndex); | ||
93 | Q_INVOKABLE void setPendingDeletion(int rowIndex, bool pendingDeletion); | 94 | Q_INVOKABLE void setPendingDeletion(int rowIndex, bool pendingDeletion); | ||
94 | const QStringList wallpapersAwaitingDeletion(); | 95 | const QStringList wallpapersAwaitingDeletion(); | ||
95 | 96 | | |||
96 | Q_SIGNALS: | 97 | Q_SIGNALS: | ||
97 | void countChanged(); | 98 | void countChanged(); | ||
98 | 99 | | |||
99 | protected Q_SLOTS: | 100 | protected Q_SLOTS: | ||
100 | void removeBackground(const QString &path); | | |||
101 | void showPreview(const KFileItem &item, const QPixmap &preview); | 101 | void showPreview(const KFileItem &item, const QPixmap &preview); | ||
102 | void previewFailed(const KFileItem &item); | 102 | void previewFailed(const KFileItem &item); | ||
103 | void sizeFound(const QString &path, const QSize &s); | 103 | void sizeFound(const QString &path, const QSize &s); | ||
104 | void backgroundsFound(const QStringList &paths, const QString &token); | 104 | void backgroundsFound(const QStringList &paths, const QString &token); | ||
105 | void processPaths(const QStringList &paths); | 105 | void processPaths(const QStringList &paths); | ||
106 | 106 | | |||
107 | protected: | 107 | protected: | ||
108 | QPointer<Image> m_wallpaper; | 108 | QPointer<Image> m_wallpaper; | ||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |