"http://nepomuk.semanticdesktop.org"
)
+find_package(NepomukCore QUIET CONFIG)
+set_package_properties(NepomukCore PROPERTIES DESCRIPTION "The Nepomuk Core libraries" URL "http://www.kde.org" TYPE RECOMMENDED PURPOSE "Support for the Nepomuk semantic desktop system")
+
+
macro_log_feature(QJSON_FOUND
"QJson"
"Qt-based library that maps JSON data to QVariant objects"
target_link_libraries(kdenlive ${SDL_LIBRARY})
endif(SDL_FOUND)
-if(Nepomuk_FOUND)
- add_definitions(-DUSE_NEPOMUK)
- include_directories(${NEPOMUK_INCLUDES})
- target_link_libraries(kdenlive ${NEPOMUK_LIBRARIES})
-endif(Nepomuk_FOUND)
+if(NepomukCore_FOUND)
+ add_definitions(-DUSE_NEPOMUKCORE)
+ include_directories(${NEPOMUK_CORE_INCLUDE_DIR})
+ target_link_libraries(kdenlive ${NEPOMUK_CORE_LIBRARY})
+else(NepomukWidgets_FOUND)
+ if(Nepomuk_FOUND)
+ add_definitions(-DUSE_NEPOMUK)
+ include_directories(${NEPOMUK_INCLUDES})
+ target_link_libraries(kdenlive ${NEPOMUK_LIBRARIES})
+ endif(Nepomuk_FOUND)
+endif()
if(QJSON_FOUND)
add_definitions(-DUSE_QJSON)
#include <Nepomuk/Vocabulary/NIE>
#endif
#endif
+#ifdef USE_NEPOMUKCORE
+#include <Nepomuk2/Variant>
+#include <Nepomuk2/Resource>
+#include <Nepomuk2/ResourceManager>
+#include <Nepomuk2/Vocabulary/NIE>
+#endif
#include <QDir>
// Check for Nepomuk metadata
#ifdef USE_NEPOMUK
+
#if KDE_IS_VERSION(4,6,0)
if (!url.isEmpty()) {
Nepomuk::ResourceManager::instance()->init();
#else
m_view.clip_license->setHidden(true);
#endif
+
+#else
+
+#ifdef USE_NEPOMUKCORE
+
+ if (!url.isEmpty()) {
+ Nepomuk2::ResourceManager::instance()->init();
+ Nepomuk2::Resource res( url.path() );
+ // Check if file has a license
+ if (res.hasProperty(Nepomuk2::Vocabulary::NIE::license())) {
+ QString ltype = res.property(Nepomuk2::Vocabulary::NIE::licenseType()).toString();
+ m_view.clip_license->setText(i18n("License: %1", res.property(Nepomuk2::Vocabulary::NIE::license()).toString()));
+ if (ltype.startsWith("http")) {
+ m_view.clip_license->setUrl(ltype);
+ connect(m_view.clip_license, SIGNAL(leftClickedUrl(QString)), this, SLOT(slotOpenUrl(QString)));
+ }
+ }
+ else m_view.clip_license->setHidden(true);
+ }
+ else m_view.clip_license->setHidden(true);
#else
m_view.clip_license->setHidden(true);
#endif
-
+
+#endif
+
slotFillMarkersList(m_clip);
slotUpdateAnalysisData(m_clip);
//#include <nepomuk/tag.h>
#endif
+#ifdef USE_NEPOMUKCORE
+#include <nepomuk2/resourcemanager.h>
+#include <Nepomuk2/Resource>
+#endif
+
#include <QMouseEvent>
#include <QStylePainter>
#include <QPixmap>
}
}
#endif
+#ifdef USE_NEPOMUKCORE
+ if (KdenliveSettings::activate_nepomuk()) {
+ Nepomuk2::ResourceManager::instance()->init();
+ if (!Nepomuk2::ResourceManager::instance()->initialized()) {
+ kDebug() << "Cannot communicate with Nepomuk, DISABLING it";
+ KdenliveSettings::setActivate_nepomuk(false);
+ }
+ }
+#endif
+
}
ProjectList::~ProjectList()
#include <nepomuk/resource.h>
#endif
+#ifdef NEPOMUKCORE
+#include <nepomuk2/kratingpainter.h>
+#include <nepomuk2/resource.h>
+#endif
+
+
#include "definitions.h"
#include "timecode.h"
#include "kdenlivesettings.h"
#ifdef NEPOMUK
KRatingPainter::paintRating(painter, r1, Qt::AlignCenter, index.data().toInt());
#endif
+#ifdef NEPOMUKCORE
+ KRatingPainter::paintRating(painter, r1, Qt::AlignCenter, index.data().toInt());
+#endif
+
} else {
QStyledItemDelegate::paint(painter, option, index);
}
#endif
#endif
+#ifdef USE_NEPOMUKCORE
+#include <Nepomuk2/Variant>
+#include <Nepomuk2/Resource>
+#include <Nepomuk2/ResourceManager>
+#include <Nepomuk2/Vocabulary/NIE>
+#include <Nepomuk2/Vocabulary/NCO>
+#include <Nepomuk2/Vocabulary/NDO>
+#endif
+
ResourceWidget::ResourceWidget(const QString & folder, QWidget * parent) :
QDialog(parent),
m_folder(folder),
//res.setProperty( Soprano::Vocabulary::NAO::description(),
#endif
#endif
+
+#ifdef USE_NEPOMUKCORE
+ Nepomuk2::Resource res( filePath );
+ res.setProperty( Nepomuk2::Vocabulary::NIE::license(), (Nepomuk2::Variant) job->property("license") );
+ res.setProperty( Nepomuk2::Vocabulary::NIE::licenseType(), (Nepomuk2::Variant) job->property("licenseurl") );
+ res.setProperty( Nepomuk2::Vocabulary::NDO::copiedFrom(), (Nepomuk2::Variant) job->property("originurl") );
+ res.setProperty( Nepomuk2::Vocabulary::NCO::creator(), (Nepomuk2::Variant) job->property("author") );
+ //res.setDescription(item_description->toPlainText());
+ //res.setProperty( Soprano::Vocabulary::NAO::description(),
+#endif
+
emit addClip(filePath, stringMap());
}