KDevelop API Documentation

filecreate_filetype.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Julian Rockey                                   *
00003  *   linux@jrockey.com                                                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 
00011 #ifndef __FILECREATE_FILETYPE_H__
00012 #define __FILECREATE_FILETYPE_H__
00013 
00014 #include <qstring.h>
00015 #include <qptrlist.h>
00016 
00017 namespace FileCreate {
00018 
00019 class FileType {
00020 
00021 public:
00022 
00023   FileType() : m_enabled(false) {
00024     m_subtypes.setAutoDelete(true);
00025   }
00026 
00027   void setName(const QString & name) { m_name = name; }
00028   QString name() const { return m_name; }
00029   void setExt(const QString & ext) { m_ext = ext; }
00030   QString ext() const { return m_ext; }
00031   void setCreateMethod(const QString & createMethod) { m_createMethod = createMethod; }
00032   QString createMethod() const { return m_createMethod; }
00033   void setSubtypeRef(const QString & subtypeRef) { m_subtypeRef = subtypeRef; }
00034   QString subtypeRef() const { return m_subtypeRef; }
00035   void setIcon(const QString & iconName) { m_iconName = iconName; }
00036   QString icon() const { return m_iconName; }
00037   void setDescr(const QString & descr) { m_descr = descr; }
00038   QString descr() const { return m_descr; }
00039   void setEnabled(bool on) { m_enabled = on; }
00040   bool enabled() const { return m_enabled; }
00041 
00042   void setSubtypesEnabled(bool enabled = true);
00043   
00044   void addSubtype(const FileType * subtype) { m_subtypes.append(subtype); }
00045   QPtrList<FileType> subtypes() const { return m_subtypes; }
00046   
00047 private:
00048   QString m_name;
00049   QString m_ext;
00050   QString m_createMethod;
00051   QString m_subtypeRef;
00052   QString m_iconName;
00053   QString m_descr;
00054 
00055   bool m_enabled;
00056   
00057   QPtrList<FileType> m_subtypes;
00058 
00059 };
00060 
00061 }
00062 
00063 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:40 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003