Page 1 of 2

[cross-platform] QTblEditor - just another tbl editor

Posted: Thu Nov 18, 2010 6:11 pm
by kambala
So this is just another tbl editor. It is written in C++ using Qt library, hence it's a cross-platform application.

Translation of Median XL inspired me to create this application. When I was translating tbl files, I found existing editors very inconvenient to use, so I decided to create my own that fits my needs. I hope someone'll find it useful too.

Depending on your compiler and development environment, QTblEditor can run on any Windows version (starting from Win98), Mac OS X (Intel/PPC, starting from 10.5) and Linux (where Qt can be installed).

Windows and Mac OS X versions include binary, necessary Qt dynamic libraries (QtCore and QtGui) and russian translation. Source includes Visual Studio 2015 and QtCreator (qmake) project files; requires Qt 4 or Qt 5 (release is compiled with 4.8.7).

QTblEditor 1.4 downloads: https://github.com/kambala-decapitator/ ... es/tag/1.4 Older versions: http://www.mediafire.com/?p3x801yg1z3g6

Installation:
  • Windows: un7z wherever you want and run exe
  • Mac OS X: untxz and copy app bundle wherever you want (e.g., to /Applications)
  • Linux: you're the boss here
I placed some comments in the source code (mostly in the *.tbl file processing part), so that it'd be easier for one to understand how things work.

The code is distributed under MIT license.

Changelog
v1.3 (18.11.2018)
[f] multiple annoying bugs fixed, see GitHub commits

v1.2 (never released)
[+] some requested features

[no version change, v1.1 stays] (07.12.2010)
[f] made the app actually universal on Mac and made it work starting from 10.5
---
[c] updated .pro file (change affects only Mac version)

v1.1 (03.12.2010)
[+] "real" text preview
[+] custom colors support (Mac OS X users can find the customcolors.ini file in the <app bundle>/Contents/Resources)
[+] reopen table from disk menu command
[+] hex display of all numbers
[+] key hash display
[+] display rows with different keys and/or strings
[+] small/big rows display
[+] copy/paste (creates new rows)
[+] drag&drop (replaces existing rows)
---
[f] issue on WinXP (and earlier versions I guess) when file extension was appended in "save as" dialog
---
[c] some refactoring and code cleanup

v1.0 (18.11.2010)
- initial release


Plans for next version:
  • regexp support in search (is it really needed?)
  • creating "diff" file for 2 tables and various operations with it
  • tabbed UI (is it really needed?)
  • your suggestions
Credits: Jarulf, Afj666, L'Autour, other PhrozenKeep members whose names I can't remember (for their editors' source code and posts on *.tbl file structure), the guy who created this beautiful Baal icon (found it somewhere on the Internet), EmaStergam & Necrolis for suggestions, morlock for pointing on the PPC incompatibility.

Re: QTblEditor - just another tbl editor

Posted: Thu Nov 18, 2010 7:48 pm
by EmaStergam
Hi

Nice to have another tool good tool. With source :P .

Heres first impression ( 5 min test):
Nice interface, fast work, easy to use.

Bugs:
-Only thing i noticed is SaveAs don't save like txt or csv. Its save always as tbl.

Suggestions:
New features:
-Find redundant key and redundant key data. Will display that rows in new window or just their row numbers.
-Make some "real in-game" preview. Simple panel with reversed text order. If possible with coloring :P. Its should be accessed by right click on row.

Improvements:
-Add any file to open/save dialog. Any file should be opened like *.tbl or make user chose after click open. It is good for moder that has lots of backup copies like me. It is easier to open any file in program then finding its location , change extension, make changes, save then change extension back.
-Implement drag and drop when you have two tables. Of-course if its possible.
-Implement copy and paste. Its always good to have. Of-course if its possible.
-Add hexadecimal row number to bottom right info. It is good to have if you programmer and use actual row within your plug-in. Not hard to implement and can save lot time.
-And my last wish :D. Make option for "large" and "small" rows. Way rows is displayed now should be "large" and "small" should make rows had smaller height ( 1/3 of current, just one text row height). Why? Sometimes you want menage list not just change key data. So when you have greater view with copy and paste you can do organization very fast.
-Change "Save" to "Ok" in edit record window. This is my opinion. Because first time i dint sure will it save it directly to file or just to table. Remove help button on window border near close button ( upper - right corner) it is useless.
-Change shortcuts for insert and insert after to "ins" and "ctrl+ins" and delete and clear to "del" and "ctrl+del". Its seems to me more natural.

Huh its seems like lot to do but don't be discouraged. All you done till now is good. If you want make it the best it can be done :P.
Im not done jet. Will do futher test but not now.

This all is my opinions, you can implement it if you wish. This is just suggestions. Beside bugs section thats order :D.

Cya

Re: QTblEditor - just another tbl editor

Posted: Thu Nov 18, 2010 9:24 pm
by kambala
Hi. Thanks for the feedback :)
EmaStergam" wrote:Bugs:
-Only thing i noticed is SaveAs don't save like txt or csv. Its save always as tbl.
are you sure you selected the file format in the save file dialog? because *.tbl is selected by default
EmaStergam" wrote:Suggestions:
New features:
-Find redundant key and redundant key data. Will display that rows in new window or just their row numbers.
-Make some "real in-game" preview. Simple panel with reversed text order. If possible with coloring :P. Its should be accessed by right click on row.
1) I planned to add something like that (I called it "diff file" in the first post)
2) I thought about the "natural" text editing, but what stopped me was that after the string reverse these color codes should also be reversed in some strange manner. I'll think about it.
EmaStergam" wrote:-Add any file to open/save dialog. Any file should be opened like *.tbl or make user chose after click open. It is good for moder that has lots of backup copies like me. It is easier to open any file in program then finding its location , change extension, make changes, save then change extension back.
that's easy to do. I just wanted to prevent users from opening different garbage :)
EmaStergam" wrote: -Implement drag and drop when you have two tables. Of-course if its possible.
-Implement copy and paste. Its always good to have. Of-course if its possible.
everything is possible :P
EmaStergam" wrote: -Add hexadecimal row number to bottom right info. It is good to have if you programmer and use actual row within your plug-in. Not hard to implement and can save lot time.
I decided not to add hex display because I didn't know that it's actually used somewhere. Easy to do.
EmaStergam" wrote: -And my last wish :D. Make option for "large" and "small" rows. Way rows is displayed now should be "large" and "small" should make rows had smaller height ( 1/3 of current, just one text row height). Why? Sometimes you want menage list not just change key data. So when you have greater view with copy and paste you can do organization very fast.
sure, why not? :)
EmaStergam" wrote: -Change shortcuts for insert and insert after to "ins" and "ctrl+ins" and delete and clear to "del" and "ctrl+del". Its seems to me more natural.
no Ins for Mac :P But I think you're right here. (Macs will stick with the current hotkey I guess)


Also, a question to modders: do you frequently delete rows (not just remove the text)? Because currently it's a slow process (I was lazy to create a separate thread for it, which probably should speed it up :) ).

Re: QTblEditor - just another tbl editor

Posted: Thu Nov 18, 2010 10:50 pm
by EmaStergam
kambala" wrote:are you sure you selected the file format in the save file dialog? because *.tbl is selected by default
Yep i tried all 3 extension on SaveAs dialog and all save file with tbl extension.
kambala" wrote:Also, a question to modders: do you frequently delete rows (not just remove the text)? Because currently it's a slow process (I was lazy to create a separate thread for it, which probably should speed it up ).
Lucky for you modders are lazy too, so they change existing rows in most cases, rather then delete row and adding new one (witch must be edited). I thing that wont be problem because if you delete rows you do it only once :P and rarely.

Hmm found some glitch.

I loaded my file. One key has special characters. It use ascii>128 for some purpose. Here are display in two editors.

From Afj Tbl Editor:
\tan;‘’“\grey;
\grey;Magic Chest contains items listed below:

QTblEditor:
\tan;‘’“\grey;
\grey;Magic Chest contains items listed below:

If i enter those character manually its displayed correctly, but if i load it, then i get boxes. It work correctly when i re-save it even if i copy it to another location, in-game it work well. So its some display problem or maybe font related problem problem. If had time ill check code to see whats happens (lucky for me i had source :P ).

Re: QTblEditor - just another tbl editor

Posted: Thu Nov 18, 2010 11:55 pm
by kambala
EmaStergam" wrote:
kambala" wrote:are you sure you selected the file format in the save file dialog? because *.tbl is selected by default
Yep i tried all 3 extension on SaveAs dialog and all save file with tbl extension.
that's pretty strange... I never had such a problem either on Windows or Mac OS X. What's your OS?
and by the way does the extension in table filepath label change? e.g. label was "/a.tbl", you saved as txt, label should become "/a.txt".
EmaStergam" wrote:Hmm found some glitch.

I loaded my file. One key has special characters. It use ascii>128 for some purpose. Here are display in two editors.

From Afj Tbl Editor:
\tan;‘’“\grey;
\grey;Magic Chest contains items listed below:

QTblEditor:
\tan;‘’“\grey;
\grey;Magic Chest contains items listed below:

If i enter those character manually its displayed correctly, but if i load it, then i get boxes. It work correctly when i re-save it even if i copy it to another location, in-game it work well. So its some display problem or maybe font related problem problem. If had time ill check code to see whats happens (lucky for me i had source :P ).
I've noticed a similar glitch:
Original key: �01
Saved key: A?AAµ01
Key in txt: A?AAµ01
But in game all work flawlessly.

No idea what causes it.

Re: QTblEditor - just another tbl editor

Posted: Fri Nov 19, 2010 9:53 am
by EmaStergam
kambala" wrote:that's pretty strange... I never had such a problem either on Windows or Mac OS X. What's your OS?
Win XP sp2.
kambala" wrote:and by the way does the extension in table filepath label change? e.g. label was "/a.tbl", you saved as txt, label should become "/a.txt".
I try again. Its appear that bug happens only if directory contain file name with same name. If you had "asd.tbl" and wana save "asd.txt" it report
"D:\kkkk\asd.tbl already exists.
Do you want to replace it?"
Even if you select txt or csv. Saving as any other name work ok.

Re: QTblEditor - just another tbl editor

Posted: Fri Nov 19, 2010 11:00 am
by Necrolis
Looks nice, good job! However, some requests, goto index should accept hex values(really helps with programming), and along those lines, some form of hex index display and key hash(yes, i've used this before). Also, it would be nice if colors where softcoded(some of us don't abide by blizzards stuff :)), and along with that a drop down list of color insertions in the editor(the softcoded section need only define an index, a specifier, and a rgb color representation). Also what emastergen recommended, a preview mode, helps a lot for skill descs and the like :)

Re: QTblEditor - just another tbl editor

Posted: Fri Nov 19, 2010 3:29 pm
by kambala
EmaStergam" wrote:
kambala" wrote:that's pretty strange... I never had such a problem either on Windows or Mac OS X. What's your OS?
Win XP sp2.
kambala" wrote:and by the way does the extension in table filepath label change? e.g. label was "/a.tbl", you saved as txt, label should become "/a.txt".
I try again. Its appear that bug happens only if directory contain file name with same name. If you had "asd.tbl" and wana save "asd.txt" it report
"D:\kkkk\asd.tbl already exists.
Do you want to replace it?"
Even if you select txt or csv. Saving as any other name work ok.
Tried to "save as" on XP and understood the problem. When you press "save as", the name of the file contains its extension, but when you choose extension in the list, the extension in filename doesn't change (but in Win7 it does). So now just manually delete the extension and it'll be saved in the chosen format, and I'll make a workaround for this issue.
Necrolis" wrote:Looks nice, good job! However, some requests, goto index should accept hex values(really helps with programming), and along those lines, some form of hex index display and key hash(yes, i've used this before). Also, it would be nice if colors where softcoded(some of us don't abide by blizzards stuff :)), and along with that a drop down list of color insertions in the editor(the softcoded section need only define an index, a specifier, and a rgb color representation). Also what emastergen recommended, a preview mode, helps a lot for skill descs and the like :)
thanks :)

I guess it'd be easier to create a file with the list of colors (code and RGB value) so that you can easily modify it with your favorite text editor :) If the file is missing, then Blizzard's colors will be used, otherwise colors will be read from the file.

Re: QTblEditor - just another tbl editor

Posted: Fri Nov 19, 2010 8:32 pm
by kidpaddle94
seems great, i will test this later :D

Re: QTblEditor - just another tbl editor

Posted: Thu Nov 25, 2010 8:54 pm
by kambala
question to those who like custom colors: do you use the same color header as Blizzard's colors do - \u00FF\u0063 - and then just append some value (obviously less than \u002F or greater than \u003B)? or you use completely different codes?

and a question mainly to EmaStergam: did I understand your request about "small" and "large" rows correctly?
large:
Image
small:
Image

Re: QTblEditor - just another tbl editor

Posted: Thu Nov 25, 2010 10:58 pm
by EmaStergam
kambala" wrote:and a question mainly to EmaStergam: did I understand your request about "small" and "large" rows correctly?
large:
Yeah that i mean. It can be little smaller, like 1 pixel larger then font size. May be row height from 20 to 15 pixels.
Nice to see you still developing :P

cya

Re: QTblEditor - just another tbl editor

Posted: Fri Nov 26, 2010 5:07 am
by Necrolis
kambala" wrote:question to those who like custom colors: do you use the same color header as Blizzard's colors do - \u00FF\u0063 - and then just append some value (obviously less than \u002F or greater than \u003B)? or you use completely different codes?
i'm using the same format a blizzard, works well enough for my needs

Re: QTblEditor - just another tbl editor

Posted: Fri Dec 03, 2010 8:48 pm
by kambala
v1.1 released! more info in the first post.

Re: QTblEditor - just another tbl editor

Posted: Tue Dec 07, 2010 1:16 pm
by kambala
small update for the Mac OS X version. see first post for more info.

Re: QTblEditor - just another tbl editor

Posted: Sun Jan 08, 2012 11:42 pm
by nhoclesnar
This TBL editor save me! Thank you for your awesome tool. I made this acc just to thank you, even tho the confirmation code freaked me out. Thank you again!

Re: QTblEditor - just another tbl editor

Posted: Sun Nov 11, 2012 10:26 pm
by MarcoNecroX
hi - some features that could be added

1) Save user's parameters like: 'view small rows' activated.
2) Save user's last position (instead of always opening at the top string).
3) Save user's table parameters - for example; everytime I load the program I have the key column covering all screen, and string column is not visible so I have to fix the columns everytime I open the program.
4) Quick-Edit: right click on string and edit it without the pop up window (for fast edits). Many of us don't really need a preview, so this would be nice.
5) Allow up to 3 string files at same time - so you can have the 3 opened. After this, 'Search in All' feature ;) pure win.
6) When you have 2 files opened and scroll up/down , both files scroll instead of the one you have selected. Maybe add some 'active/unactive window' system.
7) Colorlist window pop-up (didn't find one, tbl has it).


cheers!

Re: QTblEditor - just another tbl editor

Posted: Wed Nov 21, 2012 12:18 am
by kambala
1) I agree
2) but it's saved... on next launch last opened table is opened and last selected row is active
3) good idea
4) good idea too, quick edit can also be triggered with F2
5) I was thinking about switching to tab interface where each tab will allow up to 2 tables
6) this and previous point (opening just 2 tables) were chosen by me to ease the translating of .tbls. With tabbed interface tables in different tabs will of course scroll separately, and I think it'll be worth adding your suggestion on a per-tab basis.
7) Image

I've been thinking about almost complete re-write of the application (e.g. use Model/View instead of QTableWidget), adding some more features and putting the source on github. But I don't know when I'm going to start doing that...

p.s. for some reason I'm not notified about replies any more, that's why I'm answering with a delay

Re: QTblEditor - just another tbl editor

Posted: Fri Jun 28, 2013 9:19 am
by kambala

Re: [cross-platform] QTblEditor - just another tbl editor

Posted: Sun Aug 18, 2013 9:48 pm
by kambala
pre-v1.2 build a5ef3c9d7b with a number of bugfixes: http://www.mediafire.com/download/c9ys7 ... Editor.exe

Re: [cross-platform] QTblEditor - just another tbl editor

Posted: Thu Dec 12, 2013 5:16 am
by cla$$ics
I can confirm that this doesn't work on vanilla Windows 2000 due to lack of MSVCP20.dll (Visual Studio runtime, I believe). Should maybe include the DLL with the package? (or perhaps I installed it wrong)

P.S., appreciate the move of the source onto Github, very nice job there.

Re: [cross-platform] QTblEditor - just another tbl editor

Posted: Thu Dec 12, 2013 7:38 am
by Necrolis
Seeing as this got bumped (love the tool btw), I'm curious as to what license the source in released under? (I want to re-purpose it to some other formats)

Re: [cross-platform] QTblEditor - just another tbl editor

Posted: Thu Dec 12, 2013 7:51 am
by kidpaddle94
Necrolis" wrote:Seeing as this got bumped (love the tool btw), I'm curious as to what license the source in released under? (I want to re-purpose it to some other formats)
Kambala" wrote:I haven't included any license information, but you may copy and modify the code as you wish, so I guess it's the GPL license. However, mentioning me in credits would be nice

Re: [cross-platform] QTblEditor - just another tbl editor

Posted: Thu Dec 12, 2013 8:51 am
by kambala
cla$$ics" wrote:I can confirm that this doesn't work on vanilla Windows 2000 due to lack of MSVCP20.dll (Visual Studio runtime, I believe). Should maybe include the DLL with the package? (or perhaps I installed it wrong)

P.S., appreciate the move of the source onto Github, very nice job there.
pre-v1.2 binary has been built with VS2012, which sets minimal windows version to XP SP2. you can build with VS2008 or earlier to support win2k.

v1.1 has been built with VS2008 though, so I believe you just need to install vc2008redist or put its dlls near the .exe
Necrolis" wrote:Seeing as this got bumped (love the tool btw), I'm curious as to what license the source in released under? (I want to re-purpose it to some other formats)
added MIT license

Re: [cross-platform] QTblEditor - just another tbl editor

Posted: Thu Dec 12, 2013 1:54 pm
by Necrolis
kidpaddle94" wrote:
Necrolis" wrote:Seeing as this got bumped (love the tool btw), I'm curious as to what license the source in released under? (I want to re-purpose it to some other formats)
Kambala" wrote:I haven't included any license information, but you may copy and modify the code as you wish, so I guess it's the GPL license. However, mentioning me in credits would be nice
Was checking the github repo and not here, guess I need to lrn2read more...

kambala" wrote:
Necrolis" wrote:Seeing as this got bumped (love the tool btw), I'm curious as to what license the source in released under? (I want to re-purpose it to some other formats)
added MIT license
Cool, MIT license is way nicer than GPL (as much as I like open source, GPL is a curse, LGPL is at least a good compromise); whatever I do with the code will likely remain private (ie: its only for my personal use), if I add some new features etc I'll try push them through as a patch :) thanks again for open-sourcing this (been looking for an excuse to fiddle with Qt).

Re: [cross-platform] QTblEditor - just another tbl editor

Posted: Thu Jan 15, 2015 12:01 pm
by kambala
it has always been open-source, but the code was distributed as archive :P

looking forward to pull requests!

edit: added link to Chinese translation by Cai_Miao-BTH