KDevelop API Documentation

lib/interfaces/kdevcreatefile.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project 00002 Copyright (C) 2003 Julian Rockey <linux@jrockey.com> 00003 Copyright (C) 2003 Roberto Raggi <roberto@kdevelop.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 00019 */ 00020 00021 #ifndef _KDEVCREATEFILE_H_ 00022 #define _KDEVCREATEFILE_H_ 00023 00024 #include <qstring.h> 00025 00026 #include "kdevplugin.h" 00027 00032 class KDevCreateFile : public KDevPlugin 00033 { 00034 00035 public: 00036 class CreatedFile { 00037 00038 public: 00039 enum Status { STATUS_OK, STATUS_NOTCREATED, STATUS_NOTWITHINPROJECT }; 00040 00041 CreatedFile() 00042 : status( STATUS_NOTCREATED ) {} 00043 00044 CreatedFile( const CreatedFile& source ) 00045 : dir( source.dir ), filename( source.filename ), 00046 ext( source.ext ), subtype( source.subtype ), 00047 status( source.status ), addToProject(false) {} 00048 00049 CreatedFile& operator = ( const CreatedFile& source ) 00050 { 00051 dir = source.dir; 00052 filename = source.filename; 00053 ext = source.ext; 00054 subtype = source.subtype; 00055 status = source.status; 00056 addToProject = source.addToProject; 00057 return( *this ); 00058 } 00059 00060 bool operator == ( const CreatedFile& source ) const 00061 { 00062 return 00063 dir == source.dir && 00064 filename == source.filename && 00065 ext == source.ext && 00066 subtype == source.subtype && 00067 status == source.status && 00068 addToProject == source.addToProject; 00069 } 00070 00071 // this should be private 00072 QString dir; 00073 QString filename; 00074 QString ext; 00075 QString subtype; 00076 Status status; 00077 bool addToProject; 00078 }; 00079 00080 00081 public: 00082 00083 KDevCreateFile(const QString& pluginName, const QString& icon, QObject * parent = 0, const char * name = 0); 00084 virtual ~KDevCreateFile(); 00085 00092 virtual CreatedFile createNewFile(QString ext = QString::null, 00093 QString dir = QString::null, 00094 QString name = QString::null, 00095 QString subtype = QString::null) = 0; 00096 00097 00098 }; 00099 00100 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 6 17:39:08 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003