KDevCreateFile Class Referenceabstract
#include <kdevcreatefile.h>
Inherits KDevPlugin.
Classes | |
class | CreatedFile |
Public Member Functions | |
KDevCreateFile (const KDevPluginInfo *info, TQObject *parent=0, const char *name=0) | |
virtual CreatedFile | createNewFile (TQString ext=TQString(), TQString dir=TQString(), TQString name=TQString(), TQString subtype=TQString())=0 |
Detailed Description
File creation facility interface.
An abstract class for all extensions that are responsible for file creation.
Instances that implement this interface are available through extension architecture:
KDevCreateFile *cf = extension<KDevCreateFile>("TDevelop/CreateFile");
if (cf) {
// do something
} else {
// fail
}
- See also
- KDevPlugin::extension method documentation.
Definition at line 48 of file kdevcreatefile.h.
Constructor & Destructor Documentation
◆ KDevCreateFile()
|
inline |
Constructor.
- Parameters
-
info Important information about the plugin - plugin internal and generic (GUI) name, description, a list of authors, etc. That information is used to show plugin information in various places like "about application" dialog, plugin selector dialog, etc. Plugin does not take ownership on info object, also its lifetime should be equal to the lifetime of the plugin. parent The parent object for the plugin. Parent object must implement KDevApi interface. Otherwise the plugin will not be constructed. name The internal name which identifies the plugin.
Definition at line 125 of file kdevcreatefile.h.
Member Function Documentation
◆ createNewFile()
|
pure virtual |
Creates a new file, within or without the project.
Supply as much information as you know. Leave what you don't know as TQString(). The user will be prompted as necessary for the missing information, and the file created, and added to the project as necessary.
- Parameters
-
ext File extension (type). dir The absolute path to a directory. name The name of a file. subtype The subtype, pass this only if an extension is not enough to find the file template.
- Returns
- CreatedFile instance with information about file and file creation process.
The documentation for this class was generated from the following file: