summaryrefslogtreecommitdiffstats
path: root/parts/astyle/astyle_adaptor.h
blob: d1cb4e61c33e3f4105c5e099dba8172fd0e2b1d4 (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 <tqstring.h>
#include <tqtextstream.h>
#include <tqmap.h>
#include <tqvariant.h>

#include "astyle.h"

#define GLOBALDOC_OPTIONS 1
#define PROJECTDOC_OPTIONS 2


class ASStringIterator : public astyle::ASSourceIterator
{
public:

  ASStringIterator(const TQString &string);
  virtual ~ASStringIterator();

  virtual bool hasMoreLines() const;
  virtual string nextLine();


private:

  TQString _content;
  TQTextStream *_is;

};

class AStyleWidget;

class KDevFormatter : public astyle::ASFormatter
{
public:

  KDevFormatter(const TQStringVariantMap& options);
  KDevFormatter( AStyleWidget * widget );
  TQString indentString() const
  {
	  return m_indentString;
  }
  
private:
	bool predefinedStyle( const TQString & style );

private:
	TQString m_indentString;
};


#endif