• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Extension Interfaces Library
 

KDevelop Extension Interfaces Library

  • lib
  • interfaces
  • extensions
kdevcreatefile.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (C) 2003 Julian Rockey <linux@jrockey.com>
3 Copyright (C) 2003 Roberto Raggi <roberto@kdevelop.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20#ifndef KDEVCREATEFILE_H
21#define KDEVCREATEFILE_H
22
23#include <tqstring.h>
24
25#include <kdevplugin.h>
26
31
48class KDevCreateFile : public KDevPlugin
49{
50
51public:
53 class CreatedFile {
54
55 public:
57 enum Status {
58 STATUS_OK ,
59 STATUS_CANCELED ,
60 STATUS_NOTCREATED ,
61 STATUS_NOTWITHINPROJECT
62 };
63
66 CreatedFile()
67 : status( STATUS_NOTCREATED ) {}
68
69 CreatedFile( const CreatedFile& source )
70 : dir( source.dir ), filename( source.filename ),
71 ext( source.ext ), subtype( source.subtype ),
72 status( source.status ), addToProject(false) {}
73
74 CreatedFile& operator = ( const CreatedFile& source )
75 {
76 dir = source.dir;
77 filename = source.filename;
78 ext = source.ext;
79 subtype = source.subtype;
80 status = source.status;
81 addToProject = source.addToProject;
82 return( *this );
83 }
84
85 bool operator == ( const CreatedFile& source ) const
86 {
87 return
88 dir == source.dir &&
89 filename == source.filename &&
90 ext == source.ext &&
91 subtype == source.subtype &&
92 status == source.status &&
93 addToProject == source.addToProject;
94 }
95
96 // this should be private
98 TQString dir;
100 TQString filename;
103 TQString ext;
106 TQString subtype;
108 Status status;
110 bool addToProject;
111 };
112
113
114public:
115
125 KDevCreateFile(const KDevPluginInfo *info, TQObject * parent = 0, const char * name = 0)
126 :KDevPlugin(info, parent, name) {}
127
138 virtual CreatedFile createNewFile(TQString ext = TQString(),
139 TQString dir = TQString(),
140 TQString name = TQString(),
141 TQString subtype = TQString()) = 0;
142
143
144};
145
146#endif
KDevCreateFile::CreatedFile
File created with KDevCreateFile implementation.
Definition kdevcreatefile.h:53
KDevCreateFile::CreatedFile::status
Status status
Current status.
Definition kdevcreatefile.h:108
KDevCreateFile::CreatedFile::Status
Status
The status of a file.
Definition kdevcreatefile.h:57
KDevCreateFile::CreatedFile::STATUS_NOTCREATED
@ STATUS_NOTCREATED
File was not created due to error.
Definition kdevcreatefile.h:60
KDevCreateFile::CreatedFile::STATUS_NOTWITHINPROJECT
@ STATUS_NOTWITHINPROJECT
File was successfuly created but not added to a project.
Definition kdevcreatefile.h:61
KDevCreateFile::CreatedFile::STATUS_OK
@ STATUS_OK
File was successfuly created.
Definition kdevcreatefile.h:58
KDevCreateFile::CreatedFile::STATUS_CANCELED
@ STATUS_CANCELED
File was not created due to user intervention.
Definition kdevcreatefile.h:59
KDevCreateFile::CreatedFile::filename
TQString filename
The name (without directory path).
Definition kdevcreatefile.h:100
KDevCreateFile::CreatedFile::ext
TQString ext
The extension of a file.
Definition kdevcreatefile.h:103
KDevCreateFile::CreatedFile::addToProject
bool addToProject
true if the file should be added to a project.
Definition kdevcreatefile.h:110
KDevCreateFile::CreatedFile::dir
TQString dir
The directory.
Definition kdevcreatefile.h:98
KDevCreateFile::CreatedFile::subtype
TQString subtype
The subtype of a file.
Definition kdevcreatefile.h:106
KDevCreateFile::CreatedFile::CreatedFile
CreatedFile()
Constructor.
Definition kdevcreatefile.h:66
KDevCreateFile::createNewFile
virtual CreatedFile createNewFile(TQString ext=TQString(), TQString dir=TQString(), TQString name=TQString(), TQString subtype=TQString())=0
Creates a new file, within or without the project.
KDevCreateFile::KDevCreateFile
KDevCreateFile(const KDevPluginInfo *info, TQObject *parent=0, const char *name=0)
Constructor.
Definition kdevcreatefile.h:125

KDevelop Extension Interfaces Library

Skip menu "KDevelop Extension Interfaces Library"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDevelop Extension Interfaces Library

Skip menu "KDevelop Extension Interfaces Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Extension Interfaces Library by doxygen 1.15.0
This website is maintained by Timothy Pearson.