Commit ef71969a authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

factoring

parent 26beacbc
......@@ -83,19 +83,16 @@ public:
KTabWidget* tabWidget;
Interface* interface;
EXIFEditWidget* tabExif;
IPTCEditWidget* tabIptc;
XMPEditWidget* tabXmp;
};
MetadataEditDialog::MetadataEditDialog(QWidget* const parent, const KUrl::List& urls, Interface* const iface)
MetadataEditDialog::MetadataEditDialog(QWidget* const parent, const KUrl::List& urls)
: KPToolDialog(parent), d(new MetadataEditDialogPrivate)
{
d->urls = urls;
d->interface = iface;
d->currItem = d->urls.begin();
d->urls = urls;
d->currItem = d->urls.begin();
setCaption(i18n("Metadata edit dialog"));
d->tabWidget = new KTabWidget(this);
......@@ -184,11 +181,6 @@ KUrl::List::iterator MetadataEditDialog::currentItem() const
return d->currItem;
}
Interface* MetadataEditDialog::iface() const
{
return d->interface;
}
void MetadataEditDialog::slotModified()
{
bool modified = false;
......@@ -230,7 +222,7 @@ void MetadataEditDialog::slotApply()
d->tabIptc->apply();
d->tabXmp->apply();
slotItemChanged();
d->interface->refreshImages(*d->currItem);
iface()->refreshImages(*d->currItem);
}
void MetadataEditDialog::slotNext()
......
......@@ -57,11 +57,10 @@ class MetadataEditDialog : public KPToolDialog
public:
MetadataEditDialog(QWidget* const parent, const KUrl::List& urls, Interface* const iface);
MetadataEditDialog(QWidget* const parent, const KUrl::List& urls);
~MetadataEditDialog();
KUrl::List::iterator currentItem() const;
Interface* iface() const;
public Q_SLOTS:
......
......@@ -151,7 +151,7 @@ void Plugin_MetadataEdit::slotEditAllMetadata()
if ( !images.isValid() || images.images().isEmpty() )
return;
QPointer<MetadataEditDialog> dialog = new MetadataEditDialog(kapp->activeWindow(), images.images(), d->interface);
QPointer<MetadataEditDialog> dialog = new MetadataEditDialog(kapp->activeWindow(), images.images());
dialog->exec();
delete dialog;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment