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

KDevelop Extension Interfaces Library

Public Member Functions | List of all members
KDevSourceFormatter Class Referenceabstract

#include <kdevsourceformatter.h>

Inherits KDevPlugin.

Public Member Functions

 KDevSourceFormatter (const KDevPluginInfo *info, TQObject *parent, const char *name)
 
virtual TQString formatSource (const TQString text)=0
 
virtual TQString indentString () const =0
 

Detailed Description

Source formatter interface.

This interface is responsible for formatting source files and strings of code.

Instances that implement this interface are available through extension architecture:

KDevSourceFormatter *sf = extension<KDevSourceFormatter>("TDevelop/SourceFormatter");
if (sf) {
// do something
} else {
// fail
}
See also
KDevPlugin::extension method documentation.
What is the TDevelop extension and Creating and using an extension sections of Platform API documentation.

Definition at line 45 of file kdevsourceformatter.h.

Constructor & Destructor Documentation

◆ KDevSourceFormatter()

KDevSourceFormatter::KDevSourceFormatter ( const KDevPluginInfo *  info,
TQObject *  parent,
const char *  name 
)
inline

Constructor.

Parameters
infoImportant 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.
parentThe parent object for the plugin. Parent object must implement KDevApi interface. Otherwise the plugin will not be constructed.
nameThe internal name which identifies the plugin.

Definition at line 57 of file kdevsourceformatter.h.

Member Function Documentation

◆ formatSource()

virtual TQString KDevSourceFormatter::formatSource ( const TQString  text)
pure virtual

Formats the source.

Parameters
textA string with a code.
Returns
The formatted string.

◆ indentString()

virtual TQString KDevSourceFormatter::indentString ( ) const
pure virtual
Returns
The indentation string. For example, tab or four spaces can be returned.

The documentation for this class was generated from the following file:
  • kdevsourceformatter.h

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.8.13
This website is maintained by Timothy Pearson.