#include <KActionCollection>
#include <KUrlRequester>
-#ifdef NEPOMUK
+#ifdef USE_NEPOMUK
#include <nepomuk/global.h>
#include <nepomuk/resourcemanager.h>
+#include <Nepomuk/Resource>
//#include <nepomuk/tag.h>
#endif
m_listViewDelegate = new ItemDelegate(m_listView);
m_listView->setItemDelegate(m_listViewDelegate);
-#ifdef NEPOMUK
+#ifdef USE_NEPOMUK
if (KdenliveSettings::activate_nepomuk()) {
Nepomuk::ResourceManager::instance()->init();
if (!Nepomuk::ResourceManager::instance()->initialized()) {
monitorItemEditing(false);
clip->setText(1, properties.value("description"));
monitorItemEditing(true);
-#ifdef NEPOMUK
+#ifdef USE_NEPOMUK
if (KdenliveSettings::activate_nepomuk() && (type == AUDIO || type == VIDEO || type == AV || type == IMAGE || type == PLAYLIST)) {
// Use Nepomuk system to store clip description
Nepomuk::Resource f(clip->clipUrl().path());
}*/
KUrl url = clip->fileURL();
-#ifdef NEPOMUK
+#ifdef USE_NEPOMUK
if (!url.isEmpty() && KdenliveSettings::activate_nepomuk()) {
// if file has Nepomuk comment, use it
Nepomuk::Resource f(url.path());
#include <Solid/Networking>
#include <KRun>
+#ifdef USE_NEPOMUK
+#include <Nepomuk/Variant>
+#include <Nepomuk/Resource>
+#include <Nepomuk/ResourceManager>
+#include <Soprano/Vocabulary/NAO>
+#include <Nepomuk/Vocabulary/NIE>
+#include <Nepomuk/Vocabulary/NDO>
+#endif
+
#ifdef USE_QJSON
#include <qjson/parser.h>
#endif
connect(page_number, SIGNAL(valueChanged(int)), this, SLOT(slotStartSearch(int)));
sound_box->setEnabled(false);
search_text->setFocus();
+ Nepomuk::ResourceManager::instance()->init();
}
FreeSound::~FreeSound()
QString saveUrl = KFileDialog::getSaveFileName(KUrl(path), ext);
if (saveUrl.isEmpty()) return;
if (KIO::NetAccess::download(KUrl(m_currentUrl), saveUrl, this)) {
- emit addClip(KUrl(saveUrl), sound_name->url());
+ const KUrl filePath = KUrl(saveUrl);
+#ifdef USE_NEPOMUK
+ Nepomuk::Resource res( filePath );
+ res.setProperty( Nepomuk::Vocabulary::NIE::license(), (Nepomuk::Variant) item_license->text() );
+ res.setProperty( Nepomuk::Vocabulary::NIE::licenseType(), (Nepomuk::Variant) item_license->url() );
+ res.setProperty( Nepomuk::Vocabulary::NDO::copiedFrom(), sound_name->url() );
+ //res.setDescription(item_description->toPlainText());
+ //res.setProperty( Soprano::Vocabulary::NAO::description(),
+#endif
+ emit addClip(KUrl(saveUrl), QString());//, sound_name->url());
}
}