//This is file has been generated by xmltokross,you should not edit this file but the files used to generate it.

#include <QtCore/QObject>
#include <QtCore/QVariant>
#include <kross/core/object.h>
#include <kross/core/manager.h>
#include <kross/core/wrapperinterface.h>
#include <project/projectmodel.h>
#include <interfaces/iproject.h>

class KrossImplKDevelopProjectVisitor : public KDevelop::ProjectVisitor
{
	public:
		KrossImplKDevelopProjectVisitor(Kross::Object::Ptr _obj) : obj(_obj) {}
		void visit(KDevelop::IProject* x0)
		{
			Kross::Object* p=obj.data();
			if(!p->methodNames().contains("visit"))
				KDevelop::ProjectVisitor::visit(x0);
			else
				p->callMethod("visit", QVariantList() << qVariantFromValue<QObject*>(x0));
		}

		void visit(KDevelop::ProjectBuildFolderItem* x0)
		{
			Kross::Object* p=obj.data();
			if(!p->methodNames().contains("visit"))
				KDevelop::ProjectVisitor::visit(x0);
			else
				p->callMethod("visit", QVariantList() << Kross::Manager::self().metaTypeHandler("KDevelop::ProjectBuildFolderItem*")->callHandler(x0));
		}

		void visit(KDevelop::ProjectExecutableTargetItem* x0)
		{
			Kross::Object* p=obj.data();
			if(!p->methodNames().contains("visit"))
				KDevelop::ProjectVisitor::visit(x0);
			else
				p->callMethod("visit", QVariantList() << Kross::Manager::self().metaTypeHandler("KDevelop::ProjectExecutableTargetItem*")->callHandler(x0));
		}

		void visit(KDevelop::ProjectFolderItem* x0)
		{
			Kross::Object* p=obj.data();
			if(!p->methodNames().contains("visit"))
				KDevelop::ProjectVisitor::visit(x0);
			else
				p->callMethod("visit", QVariantList() << Kross::Manager::self().metaTypeHandler("KDevelop::ProjectFolderItem*")->callHandler(x0));
		}

		void visit(KDevelop::ProjectFileItem* x0)
		{
			Kross::Object* p=obj.data();
			if(!p->methodNames().contains("visit"))
				KDevelop::ProjectVisitor::visit(x0);
			else
				p->callMethod("visit", QVariantList() << Kross::Manager::self().metaTypeHandler("KDevelop::ProjectFileItem*")->callHandler(x0));
		}

		void visit(KDevelop::ProjectLibraryTargetItem* x0)
		{
			Kross::Object* p=obj.data();
			if(!p->methodNames().contains("visit"))
				KDevelop::ProjectVisitor::visit(x0);
			else
				p->callMethod("visit", QVariantList() << Kross::Manager::self().metaTypeHandler("KDevelop::ProjectLibraryTargetItem*")->callHandler(x0));
		}

	private:
		Kross::Object::Ptr obj;
};

class KrossImplKDevelopProjectBaseItem : public KDevelop::ProjectBaseItem
{
	public:
		KrossImplKDevelopProjectBaseItem(Kross::Object::Ptr _obj, KDevelop::IProject* x0, const QString& x1, QStandardItem* x2=0) : KDevelop::ProjectBaseItem(x0, x1, x2), obj(_obj) {}
		KDevelop::ProjectFolderItem* folder() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("folder"))
				return KDevelop::ProjectBaseItem::folder();
			else
				return dynamic_cast<KDevelop::ProjectFolderItem*>(p->callMethod("folder").value<QObject*>());
		}

		KDevelop::ProjectTargetItem* target() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("target"))
				return KDevelop::ProjectBaseItem::target();
			else
				return dynamic_cast<KDevelop::ProjectTargetItem*>(p->callMethod("target").value<QObject*>());
		}

		KDevelop::ProjectFileItem* file() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("file"))
				return KDevelop::ProjectBaseItem::file();
			else
				return dynamic_cast<KDevelop::ProjectFileItem*>(p->callMethod("file").value<QObject*>());
		}

		KDevelop::ProjectExecutableTargetItem* executable() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("executable"))
				return KDevelop::ProjectBaseItem::executable();
			else
				return dynamic_cast<KDevelop::ProjectExecutableTargetItem*>(p->callMethod("executable").value<QObject*>());
		}

	private:
		Kross::Object::Ptr obj;
};

class KrossImplKDevelopProjectFolderItem : public KDevelop::ProjectFolderItem
{
	public:
		KrossImplKDevelopProjectFolderItem(Kross::Object::Ptr _obj, KDevelop::IProject* x0, const KUrl& x1, QStandardItem* x2=0) : KDevelop::ProjectFolderItem(x0, x1, x2), obj(_obj) {}
		KDevelop::ProjectFolderItem* folder() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("folder"))
				return KDevelop::ProjectFolderItem::folder();
			else
				return dynamic_cast<KDevelop::ProjectFolderItem*>(p->callMethod("folder").value<QObject*>());
		}

		int type() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("type"))
				return KDevelop::ProjectFolderItem::type();
			else
				return p->callMethod("type").value<int>();
		}
		
	private:
		Kross::Object::Ptr obj;
};

class KrossImplKDevelopProjectBuildFolderItem : public KDevelop::ProjectBuildFolderItem
{
	public:
		KrossImplKDevelopProjectBuildFolderItem(Kross::Object::Ptr _obj, KDevelop::IProject* x0, const KUrl& x1, QStandardItem* x2=0) : KDevelop::ProjectBuildFolderItem(x0, x1, x2), obj(_obj) {}
		int type() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("type"))
				return KDevelop::ProjectBuildFolderItem::type();
			else
				return p->callMethod("type").value<int>();
		}

	private:
		Kross::Object::Ptr obj;
};

class KrossImplKDevelopProjectTargetItem : public KDevelop::ProjectTargetItem
{
	public:
		KrossImplKDevelopProjectTargetItem(Kross::Object::Ptr _obj, KDevelop::IProject* x0, const QString& x1, QStandardItem* x2=0) : KDevelop::ProjectTargetItem(x0, x1, x2), obj(_obj) {}
		int type() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("type"))
				return KDevelop::ProjectTargetItem::type();
			else
				return p->callMethod("type").value<int>();
		}

		KDevelop::ProjectTargetItem* target() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("target"))
				return KDevelop::ProjectTargetItem::target();
			else
				return dynamic_cast<KDevelop::ProjectTargetItem*>(p->callMethod("target").value<QObject*>());
		}

	private:
		Kross::Object::Ptr obj;
};

class KrossImplKDevelopProjectExecutableTargetItem : public KDevelop::ProjectExecutableTargetItem
{
	public:
		KrossImplKDevelopProjectExecutableTargetItem(Kross::Object::Ptr _obj, KDevelop::IProject* x0, const QString& x1, QStandardItem* x2=0) : KDevelop::ProjectExecutableTargetItem(x0, x1, x2), obj(_obj) {}
		KDevelop::ProjectExecutableTargetItem* executable() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("executable"))
				return KDevelop::ProjectExecutableTargetItem::executable();
			else
				return dynamic_cast<KDevelop::ProjectExecutableTargetItem*>(p->callMethod("executable").value<QObject*>());
		}

		int type() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("type"))
				return KDevelop::ProjectExecutableTargetItem::type();
			else
				return p->callMethod("type").value<int>();
		}

		KUrl builtUrl() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			return p->callMethod("builtUrl").value<KUrl>();
		}

		KUrl installedUrl() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			return p->callMethod("installedUrl").value<KUrl>();
		}

	private:
		Kross::Object::Ptr obj;
};

class KrossImplKDevelopProjectLibraryTargetItem : public KDevelop::ProjectLibraryTargetItem
{
	public:
		KrossImplKDevelopProjectLibraryTargetItem(Kross::Object::Ptr _obj, KDevelop::IProject* x0, const QString& x1, QStandardItem* x2=0) : KDevelop::ProjectLibraryTargetItem(x0, x1, x2), obj(_obj) {}
		int type() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("type"))
				return KDevelop::ProjectLibraryTargetItem::type();
			else
				return p->callMethod("type").value<int>();
		}

	private:
		Kross::Object::Ptr obj;
};

class KrossImplKDevelopProjectFileItem : public KDevelop::ProjectFileItem
{
	public:
		KrossImplKDevelopProjectFileItem(Kross::Object::Ptr _obj, KDevelop::IProject* x0, const KUrl& x1, QStandardItem* x2=0) : KDevelop::ProjectFileItem(x0, x1, x2), obj(_obj) {}
		int type() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("type"))
				return KDevelop::ProjectFileItem::type();
			else
				return p->callMethod("type").value<int>();
		}

		KDevelop::ProjectFileItem* file() const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("file"))
				return KDevelop::ProjectFileItem::file();
			else
				return dynamic_cast<KDevelop::ProjectFileItem*>(p->callMethod("file").value<QObject*>());
		}
		
	private:
		Kross::Object::Ptr obj;
};

class KrossImplKDevelopProjectModel : public KDevelop::ProjectModel
{
	public:
		KrossImplKDevelopProjectModel(Kross::Object::Ptr _obj, QObject* x0=0) : KDevelop::ProjectModel(x0), obj(_obj) {}
		Qt::ItemFlags flags(const QModelIndex& x0) const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("flags"))
				return KDevelop::ProjectModel::flags(x0);
// 			else
// 				return p->callMethod("flags", QVariantList() << QVariant()).value<int>();
		}

		void fetchMore(const QModelIndex& x0)
		{
			Kross::Object* p=obj.data();
			if(!p->methodNames().contains("fetchMore"))
				KDevelop::ProjectModel::fetchMore(x0);
			else
				p->callMethod("fetchMore", QVariantList() << QVariant());
		}

		bool canFetchMore(const QModelIndex& x0) const
		{
			Kross::Object* p=const_cast<Kross::Object*>(obj.constData());
			if(!p->methodNames().contains("canFetchMore"))
				return KDevelop::ProjectModel::canFetchMore(x0);
			else
				return p->callMethod("canFetchMore", QVariantList() << QVariant()).value<bool>();
		}

	private:
		Kross::Object::Ptr obj;
};

