~ubuntu-branches/ubuntu/intrepid/digikam/intrepid

« back to all changes in this revision

Viewing changes to digikam/libs/widgets/metadata/gpswidget.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2008-07-17 20:25:39 UTC
  • mfrom: (1.2.15 upstream) (3.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080717202539-6n7dtirbkoo7qvhd
Tags: 2:0.9.4-1
* New upstream release
  - digiKam 0.9.4 Release Plan (KDE3) ~ 13 July 08 (Closes: #490144)
* DEB_CONFIGURE_EXTRA_FLAGS := --without-included-sqlite3
* Debhelper compatibility level V7
* Install pixmaps in debian/*.install
* Add debian/digikam.lintian-overrides

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * Date        : 2006-02-22
7
7
 * Description : a tab widget to display GPS info
8
8
 *
9
 
 * Copyright (C) 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
9
 * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
10
10
 *
11
11
 * This program is free software; you can redistribute it
12
12
 * and/or modify it under the terms of the GNU General
150
150
    delete d;
151
151
}
152
152
 
153
 
int GPSWidget::getWebGPSLocator(void)
 
153
int GPSWidget::getWebGPSLocator()
154
154
{
155
155
    return ( d->detailsCombo->currentItem() );
156
156
}
160
160
    d->detailsCombo->setCurrentItem(locator);
161
161
}
162
162
    
163
 
void GPSWidget::slotGPSDetails(void)
 
163
void GPSWidget::slotGPSDetails()
164
164
{
165
165
    QString val, url;
166
166
 
215
215
    KApplication::kApplication()->invokeBrowser(url);
216
216
}
217
217
 
218
 
QString GPSWidget::getMetadataTitle(void)
 
218
QString GPSWidget::getMetadataTitle()
219
219
{
220
220
    return i18n("Global Positioning System Information");
221
221
}
279
279
    d->detailsCombo->setEnabled(false);
280
280
}
281
281
 
282
 
void GPSWidget::buildView(void)
283
 
{
284
 
    
 
282
void GPSWidget::buildView()
 
283
{    
285
284
    if (getMode() == SIMPLE)
286
285
    {
287
286
        setIfdList(getMetadataMap(), d->keysFilter, d->tagsfilter);
290
289
    {
291
290
        setIfdList(getMetadataMap(), d->keysFilter, QStringList());
292
291
    }
 
292
 
 
293
    MetadataWidget::buildView();
293
294
}
294
295
 
295
296
QString GPSWidget::getTagTitle(const QString& key)
296
297
{
297
 
    QString title = DMetadata::getExifTagTitle(key.ascii());
 
298
    DMetadata meta;
 
299
    QString title = meta.getExifTagTitle(key.ascii());
298
300
 
299
301
    if (title.isEmpty())
300
302
        return key.section('.', -1);
304
306
 
305
307
QString GPSWidget::getTagDescription(const QString& key)
306
308
{
307
 
    QString desc = DMetadata::getExifTagDescription(key.ascii());
 
309
    DMetadata meta;
 
310
    QString desc = meta.getExifTagDescription(key.ascii());
308
311
 
309
312
    if (desc.isEmpty())
310
313
        return i18n("No description available");
312
315
    return desc;
313
316
}
314
317
 
315
 
bool GPSWidget::decodeGPSPosition(void)
 
318
bool GPSWidget::decodeGPSPosition()
316
319
{
317
320
    double latitude=0.0, longitude=0.0, altitude=0.0;
318
321
    
327
330
    return true;
328
331
}
329
332
 
330
 
void GPSWidget::slotSaveMetadataToFile(void)
 
333
void GPSWidget::slotSaveMetadataToFile()
331
334
{
332
335
    KURL url = saveMetadataToFile(i18n("EXIF File to Save"),
333
336
                                  QString("*.exif|"+i18n("EXIF binary Files (*.exif)")));