~ubuntu-branches/ubuntu/natty/digikam/natty

« back to all changes in this revision

Viewing changes to libs/widgets/common/searchtextbar.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-08-26 19:25:16 UTC
  • mfrom: (1.2.30 upstream)
  • Revision ID: james.westby@ubuntu.com-20100826192516-mkbdww0h5v2x4yoy
Tags: 2:1.4.0-0ubuntu1
* New upstream bugfix release (LP: #626751)
* Install the file NEWS as upstream changelog because "ChangeLog" is
  too verbose.
* Don't copy the desktop .pot file to imageplugins, not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
namespace Digikam
41
41
{
42
42
 
 
43
class AbstractAlbumModel;
43
44
class AlbumFilterModel;
44
45
 
45
46
class SearchTextBarPriv;
128
129
     * @param uniqueIdRole a role for which the model will return a unique integer for each entry
129
130
     * @param displayRole the role to retrieve the text for completion, default is Qt::DisplayRole.
130
131
     */
131
 
    void setModel(QPointer<QAbstractItemModel> model, int uniqueIdRole, int displayRole = Qt::DisplayRole);
 
132
    void setModel(QAbstractItemModel *model, int uniqueIdRole, int displayRole = Qt::DisplayRole);
 
133
    void setModel(AbstractAlbumModel *model);
 
134
 
132
135
 
133
136
    /**
134
137
     * Sets the filter model this text bar shall use to invoke filtering on and
139
142
     *                    connections need to be created with
140
143
     *                    signalSearchTextSettings and slotSearchResult
141
144
     */
142
 
    void setFilterModel(QPointer<AlbumFilterModel> filterModel);
 
145
    void setFilterModel(AlbumFilterModel *filterModel);
143
146
 
144
147
    /**
145
148
     * Tells the current highlighting state of the text input indicated via the
169
172
    void signalSearchTextSettings(const SearchTextSettings& settings);
170
173
 
171
174
public Q_SLOTS:
 
175
 
172
176
    void slotSearchResult(bool match);
173
177
 
174
178
private Q_SLOTS:
175
179
 
176
180
    void slotTextChanged(const QString&);
177
 
    void slotRowsInserted(const QModelIndex &parent, int start, int end);
178
 
    void slotRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
179
 
    void slotDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
180
 
    void slotModelReset();
181
181
 
182
182
protected:
183
183
 
187
187
private:
188
188
 
189
189
    void contextMenuEvent(QContextMenuEvent* e);
190
 
    void connectToModel(QAbstractItemModel *model);
191
 
    void disconnectFromModel(QAbstractItemModel *model);
192
 
    void sync(QAbstractItemModel *model);
193
 
    void sync(QAbstractItemModel *model, const QModelIndex &index);
194
190
 
195
191
    /**
196
192
     * If hasCaseSensitive returns <code>true</code> this tells the search