summaryrefslogtreecommitdiffstats
path: root/parts/astyle/astyle_adaptor.h
blob: 2367c4d7821c70415774eb1124e3c81488ddb9ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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