~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to libs/models/albumfiltermodel.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
public:
45
45
 
46
 
    AlbumFilterModel(QObject *parent = 0);
47
 
 
48
 
    void setSourceAlbumModel(AbstractAlbumModel *source);
49
 
    void setSourceAlbumModel(AlbumFilterModel *source);
50
 
 
51
 
    AbstractAlbumModel *sourceAlbumModel() const;
 
46
    AlbumFilterModel(QObject* parent = 0);
 
47
 
 
48
    void setSourceAlbumModel(AbstractAlbumModel* source);
 
49
    void setSourceAlbumModel(AlbumFilterModel* source);
 
50
 
 
51
    AbstractAlbumModel* sourceAlbumModel() const;
52
52
    QModelIndex mapToSourceAlbumModel(const QModelIndex& index) const;
53
53
    QModelIndex mapFromSourceAlbumModel(const QModelIndex& index) const;
54
54
 
55
55
    /// Convenience methods
56
 
    Album *albumForIndex(const QModelIndex& index) const;
57
 
    QModelIndex indexForAlbum(Album *album) const;
 
56
    Album* albumForIndex(const QModelIndex& index) const;
 
57
    QModelIndex indexForAlbum(Album* album) const;
58
58
    QModelIndex rootAlbumIndex() const;
59
59
 
60
60
    /**
142
142
     * in the album's title or in a child album's title, or if it is a special album (root)
143
143
     * that is never filtered out.
144
144
     **/
145
 
    MatchResult matchResult(Album *album) const;
 
145
    MatchResult matchResult(Album* album) const;
146
146
 
147
147
    /**
148
148
     * This method provides the basic match checking algorithm.
151
151
     *
152
152
     * @param album album to tell if it matches the filter criteria or not.
153
153
     */
154
 
    virtual bool matches(Album *album) const;
 
154
    virtual bool matches(Album* album) const;
155
155
 
156
156
    /**
157
157
     * Use setSourceAlbumModel.
167
167
protected:
168
168
 
169
169
    SearchTextSettings m_settings;
170
 
    AlbumFilterModel  *m_chainedModel;
 
170
    AlbumFilterModel*  m_chainedModel;
171
171
 
172
172
private:
173
173
 
177
177
     * @return <code>true</code> if the provided settings result in filtering
178
178
     *         the model
179
179
     */
180
 
    bool settingsFilter(const SearchTextSettings &settings) const;
 
180
    bool settingsFilter(const SearchTextSettings& settings) const;
181
181
 
182
182
};
183
183
 
189
189
{
190
190
    Q_OBJECT
191
191
public:
192
 
    CheckableAlbumFilterModel(QObject *parent = 0);
 
192
    CheckableAlbumFilterModel(QObject* parent = 0);
193
193
 
194
 
    void setSourceCheckableAlbumModel(AbstractCheckableAlbumModel *source);
195
 
    AbstractCheckableAlbumModel *sourceAlbumModel() const;
 
194
    void setSourceCheckableAlbumModel(AbstractCheckableAlbumModel* source);
 
195
    AbstractCheckableAlbumModel* sourceAlbumModel() const;
196
196
 
197
197
    void setFilterChecked(bool filter);
198
198
    void setFilterPartiallyChecked(bool filter);
201
201
 
202
202
protected:
203
203
 
204
 
    virtual bool matches(Album *album) const;
 
204
    virtual bool matches(Album* album) const;
205
205
 
206
 
    void setSourceAlbumModel(AbstractAlbumModel *source);
 
206
    void setSourceAlbumModel(AbstractAlbumModel* source);
207
207
 
208
208
    bool m_filterChecked;
209
209
    bool m_filterPartiallyChecked;
217
217
{
218
218
public:
219
219
 
220
 
    SearchFilterModel(QObject *parent = 0);
221
 
    void setSourceSearchModel(SearchModel *source);
222
 
    SearchModel *sourceSearchModel() const;
 
220
    SearchFilterModel(QObject* parent = 0);
 
221
    void setSourceSearchModel(SearchModel* source);
 
222
    SearchModel* sourceSearchModel() const;
223
223
 
224
224
    /** Set the DatabaseSearch::Type. */
225
225
    void setFilterSearchType(DatabaseSearch::Type);
237
237
 
238
238
protected:
239
239
 
240
 
    virtual bool matches(Album *album) const;
241
 
    void setSourceAlbumModel(AbstractAlbumModel *source);
 
240
    virtual bool matches(Album* album) const;
 
241
    void setSourceAlbumModel(AbstractAlbumModel* source);
242
242
 
243
243
    void setTypeFilter(int type);
244
 
    
 
244
 
245
245
    int                     m_searchType;
246
246
    bool                    m_listTemporary;
247
247
};