KDevelop API Documentation

AStylePart Class Reference

A plugin for formatting of sourcecode according to a specified set of rules. More...

#include <astyle_part.h>

Inheritance diagram for AStylePart:

KDevSourceFormatter KDevPlugin QObject KXMLGUIClient List of all members.

Public Member Functions

 AStylePart (QObject *parent, const char *name, const QStringList &)
 ~AStylePart ()
QString formatSource (const QString text)

Private Slots

void activePartChanged (KParts::Part *part)
void beautifySource ()
void configWidget (KDialogBase *dlg)

Private Member Functions

void cursorPos (KParts::Part *part, uint *col, uint *line)
void setCursorPos (KParts::Part *part, uint col, uint line)

Private Attributes

KAction_action

Detailed Description

A plugin for formatting of sourcecode according to a specified set of rules.

Author(s):
Matthias Hölzer-Klüpfel

Feature(s):
formats source code according to a specified set of rules

Bug:
bugs in astyle component at Bugzilla database

Definition at line 15 of file astyle_part.h.


Constructor & Destructor Documentation

AStylePart::AStylePart QObject parent,
const char *  name,
const QStringList
 

AStylePart::~AStylePart  ) 
 

Definition at line 51 of file astyle_part.cpp.


Member Function Documentation

void AStylePart::activePartChanged KParts::Part part  )  [private, slot]
 

Definition at line 103 of file astyle_part.cpp.

References _action, activePartChanged(), KURL::path(), KAction::setEnabled(), and KParts::ReadOnlyPart::url().

Referenced by activePartChanged().

void AStylePart::beautifySource  )  [private, slot]
 

Definition at line 56 of file astyle_part.cpp.

References KParts::PartManager::activePart(), cursorPos(), endl(), astyle::ASFormatter::hasMoreLines(), astyle::ASFormatter::init(), KTextEditor::EditInterface::insertText(), astyle::ASFormatter::nextLine(), KTextEditor::EditInterface::numLines(), KDevPlugin::partController(), KTextEditor::EditInterface::removeText(), setCursorPos(), KTextEditor::EditInterface::setText(), and KTextEditor::EditInterface::text().

void AStylePart::configWidget KDialogBase dlg  )  [private, slot]
 

Definition at line 95 of file astyle_part.cpp.

References KDialogBase::addVBoxPage(), and configWidget().

Referenced by configWidget().

void AStylePart::cursorPos KParts::Part part,
uint *  col,
uint *  line
[private]
 

Definition at line 152 of file astyle_part.cpp.

References cursorPos(), KTextEditor::ViewCursorInterface::cursorPositionReal(), and KParts::Part::widget().

Referenced by beautifySource(), and cursorPos().

QString AStylePart::formatSource const QString  text  )  [virtual]
 

Reimplemented from KDevSourceFormatter.

Definition at line 136 of file astyle_part.cpp.

References endl(), formatSource(), astyle::ASFormatter::hasMoreLines(), astyle::ASFormatter::init(), astyle::ASFormatter::nextLine(), and text().

Referenced by formatSource().

void AStylePart::setCursorPos KParts::Part part,
uint  col,
uint  line
[private]
 

Definition at line 163 of file astyle_part.cpp.

References setCursorPos(), KTextEditor::ViewCursorInterface::setCursorPositionReal(), and KParts::Part::widget().

Referenced by beautifySource(), and setCursorPos().


Member Data Documentation

KAction* AStylePart::_action [private]
 

Definition at line 42 of file astyle_part.h.

Referenced by activePartChanged().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:59 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003