~ubuntu-branches/ubuntu/maverick/digikam/maverick

« back to all changes in this revision

Viewing changes to utilities/cameragui/cameraiconviewtooltip.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Luka Renko
  • Date: 2009-03-17 23:07:56 UTC
  • mfrom: (1.2.20 upstream) (3.1.4 experimental)
  • Revision ID: james.westby@ubuntu.com-20090317230756-db5b8rqjwb2j35e5
Tags: 2:0.10.0-1ubuntu1
* Remaining changes to Debian (committed to Debian SVN):
  - Depends: kde-icons-oxygen dropped (included through kdelibs)
  - Recommends: kipi-plugins added (provides major functionality)
  - debian/digikamthemedesigner.manpage: add missing manpage
* Remaning change to Debian:
  - Section: devel for -dbg package (no debug in Jaunty)

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
        if (settings->getToolTipsShowImageType())
153
153
        {
154
154
            KMimeType::Ptr mt = KMimeType::mimeType(info->mime);
155
 
            tip += cnt.cellBeg + i18n("Type:") + cnt.cellMid + mt->comment() + cnt.cellEnd;
 
155
            if (mt)
 
156
                tip += cnt.cellBeg + i18n("Type:") + cnt.cellMid + mt->comment() + cnt.cellEnd;
156
157
        }
157
158
 
158
159
        if (settings->getToolTipsShowImageDim())
191
192
            {
192
193
                str = QString("%1 / %2").arg(photoInfo.make.isEmpty() ? cnt.unavailable : photoInfo.make)
193
194
                                        .arg(photoInfo.model.isEmpty() ? cnt.unavailable : photoInfo.model);
194
 
                if (str.length() > cnt.maxStringLenght) str = str.left(cnt.maxStringLenght-3) + "...";
 
195
                if (str.length() > cnt.maxStringLength) str = str.left(cnt.maxStringLength-3) + "...";
195
196
                metaStr += cnt.cellBeg + i18n("Make/Model:") + cnt.cellMid + Qt::escape(str) + cnt.cellEnd;
196
197
            }
197
198
 
200
201
                if (photoInfo.dateTime.isValid())
201
202
                {
202
203
                    str = KGlobal::locale()->formatDateTime(photoInfo.dateTime, KLocale::ShortDate, true);
203
 
                    if (str.length() > cnt.maxStringLenght) str = str.left(cnt.maxStringLenght-3) + "...";
 
204
                    if (str.length() > cnt.maxStringLength) str = str.left(cnt.maxStringLength-3) + "...";
204
205
                    metaStr += cnt.cellBeg + i18n("Created:") + cnt.cellMid + Qt::escape(str) + cnt.cellEnd;
205
206
                }
206
207
                else
219
220
                    str += QString(" / %1").arg(i18n("%1 (35mm: %2)",
220
221
                           photoInfo.focalLength, photoInfo.focalLength35mm));
221
222
 
222
 
                if (str.length() > cnt.maxStringLenght) str = str.left(cnt.maxStringLenght-3) + "...";
 
223
                if (str.length() > cnt.maxStringLength) str = str.left(cnt.maxStringLength-3) + "...";
223
224
                metaStr += cnt.cellBeg + i18n("Aperture/Focal:") + cnt.cellMid + Qt::escape(str) + cnt.cellEnd;
224
225
            }
225
226
 
229
230
                                             photoInfo.exposureTime)
230
231
                                        .arg(photoInfo.sensitivity.isEmpty() ? cnt.unavailable :
231
232
                                             i18n("%1 ISO", photoInfo.sensitivity));
232
 
                if (str.length() > cnt.maxStringLenght) str = str.left(cnt.maxStringLenght-3) + "...";
 
233
                if (str.length() > cnt.maxStringLength) str = str.left(cnt.maxStringLength-3) + "...";
233
234
                metaStr += cnt.cellBeg + i18n("Exposure/Sensitivity:") + cnt.cellMid + Qt::escape(str) + cnt.cellEnd;
234
235
            }
235
236
 
243
244
                    str = photoInfo.exposureProgram;
244
245
                else
245
246
                    str = QString("%1 / %2").arg(photoInfo.exposureMode).arg(photoInfo.exposureProgram);
246
 
                if (str.length() > cnt.maxStringLenght) str = str.left(cnt.maxStringLenght-3) + "...";
 
247
                if (str.length() > cnt.maxStringLength) str = str.left(cnt.maxStringLength-3) + "...";
247
248
                metaStr += cnt.cellBeg + i18n("Mode/Program:") + cnt.cellMid + Qt::escape(str) + cnt.cellEnd;
248
249
            }
249
250
 
250
251
            if (settings->getToolTipsShowPhotoFlash())
251
252
            {
252
253
                str = photoInfo.flash.isEmpty() ? cnt.unavailable : photoInfo.flash;
253
 
                if (str.length() > cnt.maxStringLenght) str = str.left(cnt.maxStringLenght-3) + "...";
 
254
                if (str.length() > cnt.maxStringLength) str = str.left(cnt.maxStringLength-3) + "...";
254
255
                metaStr += cnt.cellBeg + i18n("Flash:") + cnt.cellMid + Qt::escape(str) + cnt.cellEnd;
255
256
            }
256
257
 
257
258
            if (settings->getToolTipsShowPhotoWB())
258
259
            {
259
260
                str = photoInfo.whiteBalance.isEmpty() ? cnt.unavailable : photoInfo.whiteBalance;
260
 
                if (str.length() > cnt.maxStringLenght) str = str.left(cnt.maxStringLenght-3) + "...";
 
261
                if (str.length() > cnt.maxStringLength) str = str.left(cnt.maxStringLength-3) + "...";
261
262
                metaStr += cnt.cellBeg + i18n("White Balance:") + cnt.cellMid + Qt::escape(str) + cnt.cellEnd;
262
263
            }
263
264