[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Access all the Kate-part method and properties in python.
From: "dangbinghoo () gmail ! com" <dangbinghoo () gmail ! com>
Date: 2015-01-21 1:47:37
Message-ID: CALM-Y9xENX4i=iHoca015hZGKt1VA8UjGhEfczJP75TOUent+g () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi all,
I'm programing in python to use kate part as my main editor component in an
IDE project. But I had problems using the api.
I can get an editor with the following code:
class EditorViewBase(QSplitter):
def __init__(self, parent=None):
QSplitter.__init__(self)
self.__editor = KTextEditor.EditorChooser.editor()
self.doc = self.__editor.createDocument(self)
self.edit = self.doc.createView(self)
however, I want to toggle the line-number on, and also fold-mark and
bookmarks and get the edit,copy,paste event handler and so on.
I found there's a abstract interface in cpp code:
KTextEditor::ConfigInterface,
*BUT* I don't know how to access the interface in python. I mean I want to
access all the properties with Kate.
Please can anybody help me ?
Thanks very much!
Best Regard,
Binghoo Dang
[Attachment #5 (text/html)]
<div dir="ltr"><div><div><div><div>Hi all,<br><br>I'm programing in python to use \
kate part as my main editor component in an IDE project. But I had problems using the \
api.</div><span class="im"><div><br></div><div>I can get an editor with the following \
code:</div><div><br></div><div><div><font face="monospace" color="#073763">class \
EditorViewBase(QSplitter):</font></div><div><font face="monospace" \
color="#073763"><span style="white-space:pre-wrap"> </span>def __init__(self, \
parent=None):</font></div><div><font face="monospace" color="#073763"><span \
style="white-space:pre-wrap"> </span>QSplitter.__init__(self)</font></div></div><div><div><font \
face="monospace" color="#073763"><span \
style="white-space:pre-wrap"> </span>self.__editor = \
KTextEditor.EditorChooser.editor()</font></div><div><font face="monospace" \
color="#073763"><span style="white-space:pre-wrap"> </span>self.doc = \
self.__editor.createDocument(self)</font></div><div><font color="#073763"><font \
face="monospace"><span style="white-space:pre-wrap"> </span>self.edit = \
self.doc.createView(self</font><font \
face="monospace">)</font></font></div></div><div><br></div><div>however, I want to \
toggle the line-number on, and also fold-mark and bookmarks and get the \
edit,copy,paste event handler and so on.<br></div><div><br></div><div>I found \
there's a abstract interface in cpp code: \
KTextEditor::ConfigInterface,</div><div><span \
style="color:rgb(0,0,255)"><b>BUT</b></span> I don't know how to access the \
interface in python. I mean I want to<br>access all the properties with \
Kate.<br></div><div><br></div></span>Please can anybody help me ?<br><br></div>Thanks \
very much!<br><br></div>Best Regard,<br><br></div>Binghoo Dang<br></div>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic