Commit Graph

9 Commits

Author SHA1 Message Date
Martin Kleusberg
66b1a62fa4 Better image file handling in EditDialog
Put the image editor into a scrollarea so the dialog doesn't screw up
when importing a large image file.

When importing a file add a filter to the file dialog to only show image
files.
2013-03-17 13:02:49 +01:00
Martin Kleusberg
67c141c192 Fix minor UI issues with blob editing
By default, use the overwrite mode in the hex edit widget. This way text
and hex editor start in the same mode, making it less confusing to press
the INS key to change the mode.

When editing the data using the hex editor also update the text editor.
2013-03-17 12:39:17 +01:00
Martin Kleusberg
b5bade6d52 Allow user to switch between text and hex editor
Allow the user to change between the text editor and the hex editor.

Allow the user to change between insert and overwrite mode in both
editors.

This makes it possible to enter any binary data into an empty cell.
2013-03-17 02:54:07 +01:00
Martin Kleusberg
15f685a1eb Simplify EditDialog code and improve the new multiple editor feature
Remove quite a bit of old code from the EditDialog.

Fix various smaller issues with the multiple editors added in the last
commit.
2013-03-17 02:29:45 +01:00
Martin Kleusberg
b88fd9316e Use different editors in EditDialog depending on the data type
Only show the old text edit widget when there is actually a text to be
edited. If the data is a image file show the image instead of some
random garbage. If it is some other binary data show the hex editor.
2013-03-17 02:11:12 +01:00
Martin Kleusberg
6c8712d804 Change the internal data type for cell contents to a binary type
Store the data of a DB cell in a QByteArray, i.e. a binary data type,
instead of putting it in a QString, thus converting it to a UTF8 string.

Rewrite the reading and writing of DB cells to correctly handle binary
data containing 0x00 bytes.

Change the edit dialog to actually do all the data checks etc. on a
currently invisible QHexEdit widget instead of a QTextEdit.

All these changes combined make it possible to actually store binary
data without it being corrupted. You can for example import pictures
now, export them and actually open the exported file. So this is an
improvement.
2013-03-17 01:38:48 +01:00
Peinthor Rene
c5dafe9617 avoid useless string copies and fix a bug with logSQL because of that 2013-01-26 10:23:04 +01:00
Martin Kleusberg
d05e90e495 Improve translatability of the application
Head towards a translatable application by loading translation files for
the current locale and using tr() where ever it's needed.
2013-01-18 18:11:07 +01:00
Martin Kleusberg
ab2a4e6479 Rewrite EditDialog using Qt Designer
Create a Qt Designer form file for the edit dialog.

Clean up the edit dialog code removing some not working and not used
functionality e.g. for blob editing.
2013-01-09 16:25:45 +01:00