From 114a878c64ce6f8223cfd22d76a20eb16d177e5e Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/astyle/astyle_adaptor.h | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 parts/astyle/astyle_adaptor.h (limited to 'parts/astyle/astyle_adaptor.h') diff --git a/parts/astyle/astyle_adaptor.h b/parts/astyle/astyle_adaptor.h new file mode 100644 index 00000000..2367c4d7 --- /dev/null +++ b/parts/astyle/astyle_adaptor.h @@ -0,0 +1,55 @@ +#ifndef __ASTYLE_ADAPTOR_H__ +#define __ASTYLE_ADAPTOR_H__ + + +#include +#include +#include +#include + +#include "astyle.h" + +#define GLOBALDOC_OPTIONS 1 +#define PROJECTDOC_OPTIONS 2 + + +class ASStringIterator : public astyle::ASSourceIterator +{ +public: + + ASStringIterator(const QString &string); + virtual ~ASStringIterator(); + + virtual bool hasMoreLines() const; + virtual string nextLine(); + + +private: + + QString _content; + QTextStream *_is; + +}; + +class AStyleWidget; + +class KDevFormatter : public astyle::ASFormatter +{ +public: + + KDevFormatter(const QMap& options); + KDevFormatter( AStyleWidget * widget ); + QString indentString() const + { + return m_indentString; + } + +private: + bool predefinedStyle( const QString & style ); + +private: + QString m_indentString; +}; + + +#endif -- cgit v1.2.1