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

« back to all changes in this revision

Viewing changes to digikam/imagethumbnaildelegate.cpp

  • 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:
67
67
};
68
68
 
69
69
ImageThumbnailDelegate::ImageThumbnailDelegate(ImageCategorizedView* parent)
70
 
                      : ImageDelegate(*new ImageThumbnailDelegatePrivate, parent)
 
70
    : ImageDelegate(*new ImageThumbnailDelegatePrivate, parent)
71
71
{
72
72
}
73
73
 
102
102
}
103
103
 
104
104
bool ImageThumbnailDelegate::acceptsActivation(const QPoint& pos, const QRect& visualRect,
105
 
                                               const QModelIndex& index, QRect* activationRect) const
 
105
        const QModelIndex& index, QRect* activationRect) const
106
106
{
107
107
    // reuse implementation from grandparent
108
108
    return ItemViewImageDelegate::acceptsActivation(pos, visualRect, index, activationRect);
112
112
{
113
113
    Q_D(ImageThumbnailDelegate);
114
114
    int maxSize;
 
115
 
115
116
    if (d->flow == QListView::LeftToRight)
116
117
    {
117
118
        maxSize = d->viewSize.height();
120
121
    {
121
122
        maxSize = d->viewSize.width();
122
123
    }
 
124
 
123
125
    d->thumbSize = ThumbnailLoadThread::thumbnailPixmapSize(true, maxSize - 2*d->radius - 2*d->margin);
124
126
 
125
127
    ImageDelegate::updateContentWidth();
139
141
    }
140
142
 
141
143
    if (d->flow == QListView::LeftToRight)
 
144
    {
142
145
        d->gridSize  = QSize(d->rect.width() + d->spacing, d->rect.height());
 
146
    }
143
147
    else
 
148
    {
144
149
        d->gridSize  = QSize(d->rect.width(), d->rect.height() + d->spacing);
 
150
    }
145
151
}
146
152
 
147
153
} // namespace Digikam