summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/k3bproject/kfile_k3bprojectfileplugin.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 00:52:05 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 00:52:05 -0600
commitd796716f1dc9dd0b198863d974a03bf356f636e6 (patch)
tree1bab87345ab25163397b8033b7e1910360bd94fb /kfile-plugins/k3bproject/kfile_k3bprojectfileplugin.cpp
parent6f156aae95c8ea00b34ffb59e237df2f00cf8256 (diff)
downloadk3b-d796716f1dc9dd0b198863d974a03bf356f636e6.tar.gz
k3b-d796716f1dc9dd0b198863d974a03bf356f636e6.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'kfile-plugins/k3bproject/kfile_k3bprojectfileplugin.cpp')
-rw-r--r--kfile-plugins/k3bproject/kfile_k3bprojectfileplugin.cpp135
1 files changed, 0 insertions, 135 deletions
diff --git a/kfile-plugins/k3bproject/kfile_k3bprojectfileplugin.cpp b/kfile-plugins/k3bproject/kfile_k3bprojectfileplugin.cpp
deleted file mode 100644
index 953f0e7..0000000
--- a/kfile-plugins/k3bproject/kfile_k3bprojectfileplugin.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- *
- * $Id: sourceheader,v 1.3 2005/01/19 13:03:46 trueg Exp $
- * Copyright (C) 2005 Sebastian Trueg <trueg@k3b.org>
- *
- * This file is part of the K3b project.
- * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * See the file "COPYING" for the exact licensing terms.
- */
-
-
-#include <config.h>
-
-#include "kfile_k3bprojectfileplugin.h"
-#include "kostore/koStore.h"
-#include "kostore/koStoreDevice.h"
-
-#include <k3bdoc.h>
-
-#include <kgenericfactory.h>
-
-#include <tqtextstream.h>
-#include <tqdom.h>
-#include <tqfile.h>
-
-
-
-K_EXPORT_COMPONENT_FACTORY(kfile_k3b, KGenericFactory<K3bProjectFilePlugin>("kfile_k3b"))
-
-
-K3bProjectFilePlugin::K3bProjectFilePlugin( TQObject *parent, const char *name,
- const TQStringList &args)
- : KFilePlugin(parent, name, args)
-{
- KFileMimeTypeInfo* info = addMimeTypeInfo( "application/x-k3b" );
-
- KFileMimeTypeInfo::GroupInfo* group = addGroupInfo( info, "General", i18n("General") );
-
- addItemInfo( group, "documenttype", i18n("Document Type"), TQVariant::String );
-}
-
-
-bool K3bProjectFilePlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
-{
- if( !info.url().isLocalFile() ) {
- kdDebug() << "(K3bProjectFilePluginInfo) no local file." << endl;
- return false;
- }
-
- // open the file
- bool success = false;
- TQDomDocument xmlDoc;
-
- // try opening a store
- KoStore* store = KoStore::createStore( info.url().path(), KoStore::Read );
- if( store && !store->bad() && store->open( "maindata.xml" ) ) {
- TQIODevice* dev = store->device();
- dev->open( IO_ReadOnly );
- if( xmlDoc.setContent( dev ) )
- success = true;
- dev->close();
- store->close();
- }
- else
- kdDebug() << "(K3bProjectFilePluginInfo) failed to open the store." << endl;
-
- if( success ) {
- // check the documents DOCTYPE
- K3bDoc::DocType type = K3bDoc::AUDIO;
- if( xmlDoc.doctype().name() == "k3b_audio_project" )
- type = K3bDoc::AUDIO;
- else if( xmlDoc.doctype().name() == "k3b_data_project" )
- type = K3bDoc::DATA;
- else if( xmlDoc.doctype().name() == "k3b_vcd_project" )
- type = K3bDoc::VCD;
- else if( xmlDoc.doctype().name() == "k3b_mixed_project" )
- type = K3bDoc::MIXED;
- else if( xmlDoc.doctype().name() == "k3b_movix_project" )
- type = K3bDoc::MOVIX;
- else if( xmlDoc.doctype().name() == "k3b_movixdvd_project" )
- type = K3bDoc::MOVIX_DVD;
- else if( xmlDoc.doctype().name() == "k3b_dvd_project" )
- type = K3bDoc::DVD;
- else if( xmlDoc.doctype().name() == "k3b_video_dvd_project" )
- type = K3bDoc::VIDEODVD;
- else {
- kdDebug() << "(K3bDoc) unknown doc type: " << xmlDoc.doctype().name() << endl;
- success = false;
- }
-
- TQString stringType;
- switch( type ) {
- case K3bDoc::AUDIO:
- stringType = i18n("Audio CD");
- break;
- case K3bDoc::DATA:
- stringType = i18n("Data CD");
- break;
- case K3bDoc::MIXED:
- stringType = i18n("Mixed Mode CD");
- break;
- case K3bDoc::VCD:
- stringType = i18n("Video CD");
- break;
- case K3bDoc::MOVIX:
- stringType = i18n("eMovix CD");
- break;
- case K3bDoc::MOVIX_DVD:
- stringType = i18n("eMovix DVD");
- break;
- case K3bDoc::DVD:
- stringType = i18n("Data DVD");
- break;
- case K3bDoc::VIDEODVD:
- stringType = i18n("Video DVD");
- break;
- }
-
- // and finally display it!
- KFileMetaInfoGroup group = appendGroup(info, "General");
- appendItem( group, "documenttype", stringType );
- }
-
- delete store;
-
- return success;
-}
-
-#include "kfile_k3bprojectfileplugin.moc"
-