Hey,
is there any update on the QCodeEdit / QCodeModel 2 development? :-)
The framework looked fairly impressive the last time I checked it out.
Hey,
is there any update on the QCodeEdit / QCodeModel 2 development? :-)
The framework looked fairly impressive the last time I checked it out.
"If you lie to the compiler, it will get its revenge." - Henry Spencer
There have loads of improvements since I last talked about it here but since I did not get much feedback I stopped reporting progress.... The code is still available through in Edyuk SVN trunk and be tested both independently (a minimal example is provided) and within Edyuk. QCodeModel 2 is fairly mature (try out Edyuk completion...) and QCodeEdit 2 works pretty well but it will need more testing/polishing before I can release anything (the search functionnalities are quite limited ATM for instance).
Current Qt projects : QCodeEdit, RotiDeCode
This editor looks like it could be very useful to me. In particular I like the ability to extend the syntax highlighting just with XML, as I have a couple of obscure languages I want to support.
I have it starting up inside my application, but cannot figure out how to make it go to a chosen line number. I need this for locating items in the source when the user clicks on them in my structure view.
Is this possible?
I am using the version from Edyuk beta 3.
Thanks in advance.
And another thing...
Does it work on your machine with a variable width font? Here, unless I go for the default fixed with font, selecting part of a line causes corruption of the text. For example, choose a proportional font, and select a the word in the middle of a line and let me know if the line is still readable for you.
As it was meant to be a code editor I decided, to make it both simpler to code and faster to run, to restrict the fonts to fixed width... With some slight modifications in a few spots it could be adapted to support variable width fonts but do you really need this???
As for going to a given line it is extremely simple :
Qt Code:
// editor being of type QEditor* editor->setCursor(editor->document()->cursor(line, colum));To copy to clipboard, switch view to plain text mode
If you want to use bleeding edge QCodeEdit you can get it from Edyuk SVN repository...
P.S : if you bring support for new languages (or improve the existing ones) please consider sending me the new syntax definition files![]()
Current Qt projects : QCodeEdit, RotiDeCode
I am trying to make this interface as attractive as possible, and would be reluctant to restrict the users choice of fonts so harshly.
This worked a treat, thanks!
The plan is that the application I am writing will one day be released commercially. So my use of this editor assumes that you are willing to release the code with a commercial license. Obviously you would expect something in return, so we could pay you or contribute all the language templates we create. Do you have a price for commercial use?
I have nothing against releasing my code under a commercial license and I'm sure we could find an agreement on the "price" (the word is way softer when it's something you get than when you have to pay it) if it were legally possible... What I mean is simple : I wrote QCodeEdit using Qt Open Source Edition and I'll probably never be able to use a Commercial Edition so I don't know if I am allowed to release my code under a commercial license, even if you DO have a Qt Commercial Edition... I guess we'd need to discuss this with Trolltech...
Last edited by fullmetalcoder; 21st October 2007 at 16:52. Reason: spelling error
Current Qt projects : QCodeEdit, RotiDeCode
I just started creating a new language file, and have a quick question.
The language I am creating is not case sensitive, i.e. Begin, BEGIN, begin, bEGIN etc are all keywords, indeed all the same keyword.
Is there some tag I can insert into a .qnfa file to instruct it do case insensitive comparisons?
Thanks in advance.
Support for variable width font has at last been brought (available in the SVN...)
Done.Originally Posted by Usability
A new attribute has been added : caseSensitive. It is supported by all tags (except, obviously, by the <embed> one). All element that do not set it inherit the value of their parent and the default value of the root element is "true".BTW, as all boolean attributes it can be set indifferently using "true", "false", "enabled", "disabled", "0" or "1"
I'm thinking about it. I admit it would be extremely nice to have but it's not that easy to implement...Originally Posted by croftj
Current Qt projects : QCodeEdit, RotiDeCode
Cool!
I confirm I see proportional fonts and the case sensitivity flag works. To save others working back through this thread and dealing with the abbreviated links, here is the svn command to get this.
Qt Code:
svn checkout http://edyuk.svn.sourceforge.net/svnroot/edyuk/trunk/3rdparty/qcodeeditTo copy to clipboard, switch view to plain text mode
There appear to be a few glitches.
- On my system, when I use a proportional font, find doesn't work.
- Also with proportional fonts, the text that is made bold by the syntax highlighting does not increase in character spacing, so gets squashed together.
- With a fixed width font the find backwards icon (up arrow) behaves strangely. The first reverse find sometimes updates the line number in the status bar, but does not move the cursor at all. Other times it just does nothing.
Well... Quite unsurprisingly it does work for me whatever the font is. However it sometimes isn't triggered when pressing enter from the line edit... That's weird and I'll look into it ASAP
The bold text looked normal to me at first but you're right, spacing could be a little bigger and I'll solve this easily for I know why it happens
The find backward is known not to work... However I didn't have time to fix it lately. I'll try my best...
Current Qt projects : QCodeEdit, RotiDeCode
Your right, the font has nothing to do with it. Find stops working for a while if you search for something thats not in the file, or you repeat the find after the last occurance. Having done this, neither the enter or find forward button work even if you change the search for something that does exist.
Clicking the reverse find brings it back to life again.
Find now works as expected:
- it no longer tries a backward search when asked for a forward one
- it is now able to perform proper backward searches
- it now respects boundaries (i.e search within selection)
- focus is now sent back to the line edit every time a checkbox of the search panel is (un)checked so that pressing enter afterwards triggers search as expected
BTW I tried to increase spacing for bold fonts by using a proper QFontMetrics object operating on a bold font (instead of the default document font) but it didn't appeared to change much... however as bold characters didn't get squashed on my box it might solve the glitches on yours...
Current Qt projects : QCodeEdit, RotiDeCode
Getting better all the time!
I confirm find in both directions works now, and that syntax highlighting in bold on proportional fonts is nicely spaced.
One gremlin I did notice was that if you select some bold text, the background shading breaks up. Its OK if you select a complete line, or if the text isn't bold, its specifically the word selection of bold text that is not working quite right. I attached a snapshot of this below.
Also I noticed my previous svn command was wrong. Here is the (hopefully) correct version
Qt Code:
svn checkout http://edyuk.svn.sourceforge.net/svnroot/edyuk/trunk/3rdparty/qcodeedit2To copy to clipboard, switch view to plain text mode
Side effect of the previous fix... Looks like QFontMetrics behaves differently on Linux and Windows BTW for I did not notice this (could also be my variable width font being more "bold-friendly" ...). Anyway I just fixed it (or so I believe, but I need a confirmation...)
Current Qt projects : QCodeEdit, RotiDeCode
Indeed you fixed it, and stunningly quickly too! Thank you.
You are going to hate me for this, but I found one more....
When you click on a line that has some bold words to the left of where the mouse cursor was when you clicked, the text cursor is not placed under the mouse cursor. It appears a few characters to the right of where the mouse was.
If you click on a line with no bold, it works fine. The text cursor is inserted where the mouse cursor was.
Bookmarks