Commit Graph

16 Commits

Author SHA1 Message Date
Martin Kleusberg
540b12a57a EditDialog: Allow opening dialog/updating dock in read-only mode for views
See #441.
2015-12-21 11:22:43 +01:00
Martin Kleusberg
0e17990583 EditDialog: Better behaviour when pressing escape key in dock mode
See issue #441.
2015-12-20 12:15:13 +01:00
Martin Kleusberg
672b6f693b EditDialog: Make edit dock more keyboard friendly to use
See #440, #441.
2015-12-19 14:05:45 +01:00
Martin Kleusberg
f26df79961 Add edit cell dock to main window
Add a new option for replacing the edit data dialog by an edit data dock
widget which is added to the main window and remains visible. This might
be interesting for people who otherwise would have to open the edit
dialog many times by doing tons of double clicks.
2015-12-15 22:29:15 +01:00
Martin Kleusberg
1788678732 EditDialog: Set position to center of parent dialog when opening dialog
See issues #342 and #394.
2015-08-18 23:12:48 +02:00
Martin Kleusberg
ba75bd16fe Use common format for all include guards and avoid leading underscores
Use a common format for all include guards, make sure each header file
has one and make sure it's named after the file name.

And as a random extra in this commit: Make sure the gen_version.h file
generated by cmake ends with a line break.

Closes #59.
2014-07-31 21:32:58 +02:00
Peinthor Rene
1bac11348f include cleanup 2013-09-19 22:55:35 +02:00
Martin Kleusberg
2165e544a2 Move all settings logic to the preferences dialog
Read and write the settings only from the preferences dialog.

Remove all the copies of some settings which were stored in nearly every
dialog class individually.

Simplify the settings dialog code by removing all those not really
needed slots.
2013-03-17 16:09:28 +01:00
Martin Kleusberg
57f4d996ca EditDialog: Don't update the DB when no changes were made
Even when clicking the OK button don't write to the database when no
changes were made.
2013-03-17 13:07:57 +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
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
e4e840dc38 Make many methods and attributes of classes private
Make most variables, functions, slots etc. private instead of public.

Also make the constructors explicit.
2013-01-20 16:00:09 +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