From 114a878c64ce6f8223cfd22d76a20eb16d177e5e Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/filecreate/filecreate_filetype.h | 63 ++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 parts/filecreate/filecreate_filetype.h (limited to 'parts/filecreate/filecreate_filetype.h') diff --git a/parts/filecreate/filecreate_filetype.h b/parts/filecreate/filecreate_filetype.h new file mode 100644 index 00000000..9b8e039c --- /dev/null +++ b/parts/filecreate/filecreate_filetype.h @@ -0,0 +1,63 @@ +/*************************************************************************** + * Copyright (C) 2003 by Julian Rockey * + * linux@jrockey.com * + * * + * 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. * + ***************************************************************************/ + +#ifndef __FILECREATE_FILETYPE_H__ +#define __FILECREATE_FILETYPE_H__ + +#include +#include + +namespace FileCreate { + +class FileType { + +public: + + FileType() : m_enabled(false) { + m_subtypes.setAutoDelete(true); + } + + void setName(const QString & name) { m_name = name; } + QString name() const { return m_name; } + void setExt(const QString & ext) { m_ext = ext; } + QString ext() const { return m_ext; } + void setCreateMethod(const QString & createMethod) { m_createMethod = createMethod; } + QString createMethod() const { return m_createMethod; } + void setSubtypeRef(const QString & subtypeRef) { m_subtypeRef = subtypeRef; } + QString subtypeRef() const { return m_subtypeRef; } + void setIcon(const QString & iconName) { m_iconName = iconName; } + QString icon() const { return m_iconName; } + void setDescr(const QString & descr) { m_descr = descr; } + QString descr() const { return m_descr; } + void setEnabled(bool on) { m_enabled = on; } + bool enabled() const { return m_enabled; } + + void setSubtypesEnabled(bool enabled = true); + + void addSubtype(const FileType * subtype) { m_subtypes.append(subtype); } + QPtrList subtypes() const { return m_subtypes; } + +private: + QString m_name; + QString m_ext; + QString m_createMethod; + QString m_subtypeRef; + QString m_iconName; + QString m_descr; + + bool m_enabled; + + QPtrList m_subtypes; + +}; + +} + +#endif -- cgit v1.2.3