summaryrefslogtreecommitdiffstats
path: root/parts/astyle/astyle_adaptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'parts/astyle/astyle_adaptor.h')
-rw-r--r--parts/astyle/astyle_adaptor.h55
1 files changed, 55 insertions, 0 deletions
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 <qstring.h>
+#include <qtextstream.h>
+#include <qmap.h>
+#include <qvariant.h>
+
+#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<QString, QVariant>& options);
+ KDevFormatter( AStyleWidget * widget );
+ QString indentString() const
+ {
+ return m_indentString;
+ }
+
+private:
+ bool predefinedStyle( const QString & style );
+
+private:
+ QString m_indentString;
+};
+
+
+#endif