From 25b9640456c3238a10252691b772caf61f1281b7 Mon Sep 17 00:00:00 2001 From: Sebastian Trueg Date: Mon, 7 Dec 2009 16:41:37 +0000 Subject: Added all code necessary for clickable tags in the KTaggingWidget. As soon as we figured out how to only show links on hover we are good to go. This is actually a fix as resources in the rest of the info view are already clickable. CCMAIL: peter.penz@gmx.at svn path=/trunk/KDE/kdebase/apps/; revision=1059908 --- src/panels/information/kmetadatawidget.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/panels/information/kmetadatawidget.cpp') diff --git a/src/panels/information/kmetadatawidget.cpp b/src/panels/information/kmetadatawidget.cpp index 819e9f26d..8b658a03f 100644 --- a/src/panels/information/kmetadatawidget.cpp +++ b/src/panels/information/kmetadatawidget.cpp @@ -98,6 +98,8 @@ public: void slotLinkActivated(const QString& link); #ifdef HAVE_NEPOMUK + void slotTagActivated(const Nepomuk::Tag& tag); + /** * Disables the metadata widget and starts the job that * changes the meta data asynchronously. After the job @@ -189,6 +191,8 @@ KMetaDataWidget::Private::Private(KMetaDataWidget* parent) : m_taggingWidget = new KTaggingWidget(parent); connect(m_taggingWidget, SIGNAL(tagsChanged(const QList&)), q, SLOT(slotTagsChanged(const QList&))); + connect(m_taggingWidget, SIGNAL(tagActivated(const Nepomuk::Tag&)), + q, SLOT(slotTagActivated(const Nepomuk::Tag&))); m_commentWidget = new KCommentWidget(parent); connect(m_commentWidget, SIGNAL(commentChanged(const QString&)), @@ -425,6 +429,13 @@ void KMetaDataWidget::Private::slotCommentChanged(const QString& comment) #endif } +#ifdef HAVE_NEPOMUK +void KMetaDataWidget::Private::slotTagActivated(const Nepomuk::Tag& tag) +{ + emit q->urlActivated(tag.resourceUri()); +} +#endif + void KMetaDataWidget::Private::slotMetaDataUpdateDone() { #ifdef HAVE_NEPOMUK -- cgit v1.3.1