kdevcreatefile.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
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
This file is part of the documentation for KDevelop Version 3.1.2.