File: DocWrapper.h

package info (click to toggle)
juffed 0.10-89-g3690b60-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,160 kB
  • sloc: cpp: 21,060; ansic: 446; xml: 329; sh: 68; makefile: 16
file content (34 lines) | stat: -rw-r--r-- 945 bytes parent folder | download | duplicates (5)
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
#ifndef __ZEN_DOC_WRAPPER_H__
#define __ZEN_DOC_WRAPPER_H__

#include <QObject>
#include "Document.h"
#include "EditorSettings.h"

class DocWrapper : public QObject {
Q_OBJECT
public:
	DocWrapper() : QObject() {}
	void setDoc(Juff::Document* doc);
	
	Q_INVOKABLE bool usesTabs();
	Q_INVOKABLE int tabWidth();
	Q_INVOKABLE QString fileName();
	Q_INVOKABLE long selectionStart();
	Q_INVOKABLE long selectionEnd();
	Q_INVOKABLE void createSelection(const QVariant&, const QVariant&);
	Q_INVOKABLE void moveCursor(const QVariant&);
	Q_INVOKABLE long cursorPosition();
	Q_INVOKABLE QString selectedText();
	Q_INVOKABLE QString text();
	Q_INVOKABLE QString currentLineText();
	Q_INVOKABLE int currentLineLength();
	Q_INVOKABLE long currentLinePosition();
	Q_INVOKABLE void replaceContent(const QVariant&, const QVariant&, const QVariant&, const QVariant&);
	Q_INVOKABLE int eol();
	
private:
	Juff::Document* doc_;
};

#endif // __ZEN_DOC_WRAPPER_H__