Commit Graph

21 Commits

Author SHA1 Message Date
mgr
dd3417e1c4 Automatic switching of the editor mode according to data type #1537
A new checkable button and associated setting is added for automatically
switching the editor mode in the Edit Database Cell dock in accordance to
the loaded data. The switch is done after loading data from cell, after
importing new data to the cell and when checking the button.

If the button is unchecked the behaviour is as formerly.

Since XML is not currently detected, the mode only changes to XML when SVG
is supplied.

Default value is true, since the new behaviour is considered more useful
for the general case.
2018-09-21 20:48:16 +02:00
mgrojo
52ae85dd28 Added some "What's This" information
Added some texts to the "What's This" information of some buttons or other
widgets that lacked them. This will help the user to discover the provided
features.

Specifically, help is added for the filter fields and the remote dock.
See discussions in issues #1311 and #1312.
2018-02-02 21:27:58 +01:00
mgrojo
a0e0fc98ae XML mode for the cell editor
The new editor mode shares the same Scintilla widget as the JSON mode.
The JsonTextEdit class has been generalised. Future modes supported by
Scintilla could be added with the current pattern. As a consequence, the
EditMode is not always equal to the current stacked widget.

Some code in EditDialog has been refactored, so it is easier to understand
and modified with so many modes. textNullSet has been replaced by the use
of dataType as Null.

SVG is promoted to a new recognised data type, so it can be edited in the
XML mode.

The XML data is formatted and validated following the pattern established
by the JSON mode.

New modules are needed by the XML mode: the Qt XML module and some new
Scintilla files required by the HTML/XML lexer.

The indent_compact was incorrectly named in Setting::getDefaultValue.

See issue #1253.
2017-12-23 22:19:17 +01:00
mgrojo
232130bc60 Indent/Compact setting moved to Cell Editor
Removed the related check box in the Preferences Dialog. A new checkable
tool-button with icon from the Silk collection. When checked, the
indent-on-loading and compact-on-saving feature is enabled. When widget
is destroyed, the setting value is saved from this button state.

Currently it is only usable in the JSON mode, but could be reused in XML
and any other future modes.

See issue #1173.

Some tooltips in the Edit Dialog have been corrected, since it is not only
used for text.
2017-12-08 17:50:15 +01:00
mgrojo
c832d8a58c JSON mode for cell editor
Support for JSON in the Database Cell editor using the QScintilla library.

The lexJSON has been added to the compilation.

See issue #1173
2017-11-18 14:57:36 +01:00
mgr
9ce4b232ba New shortcut for Copy with Headers and some self-documented shortcuts
Ctrl+H invokes the Copy with Headersers action in the Extended Table Widget
as suggested in #1058.

The following options in context menu display now their shortcuts:
Set to Null, Copy, Copy with Headers and Paste.

Some other shortcuts are now displayed in the corresponding tooltips.
2017-11-12 19:26:39 +01:00
Martin Kleusberg
3a70b412e8 Turn some slots into normal functions
They aren't used for signal processing at the moment and don't look like
they can be used for that easily.
2017-10-30 13:15:43 +01:00
Justin Clift
47b1224bc2 Ugly workarounds :) for various small bugs in the Edit Cell
Fixes #726, and also a few other small issues at the same time
2016-08-13 16:34:07 +01:00
Justin Clift
b835ae800b Reimplement data loading and handling for the Edit Cell
This uses a somewhat different approach to the previous
one.  It now selectively stores the data into either
the text *or* hex widget buffer, and only copies the
data between them when the edit mode is changed.

Additionally, unneeded copy operations are minimised
where possible to reduce overall slowdown.:
2016-08-09 13:04:32 +01:00
Justin Clift
89baf3464d Adjust the layout of the Edit Cell as per #673 (#679) 2016-07-27 20:41:01 +01:00
Justin Clift
94fcfc1a66 Fix typo in label name 2016-07-20 19:25:51 +01:00
Justin Clift
4467b75782 Fix simple typo in EditDialog widget name 2016-07-13 13:41:02 +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
b407704959 EditDialog: Use Monospace font in text editor 2014-06-12 18:51:23 +02:00
Martin Kleusberg
ae4d04f9b1 EditDialog: Show warning when editing binary data in text mode 2014-05-25 17:30:57 +02:00
Martin Kleusberg
41296e3ac0 EditDialog: Increase size to fit the hex editor widget entirely 2014-05-25 17:15:28 +02:00
Martin Kleusberg
7b9a120d42 EditDialog: Improve handling of binary data in text mode
Make the EditDialog a bit more user friendly when editing binary data in
text mode:

Don't change back to the hex editor after changing any character.

Show the full binary data even if it contains a NULL byte.

Also (though a bit unrelated) disable rich text input for the text widget.

This partially fixes issue #19.
2014-05-25 11:53:31 +02:00
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
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
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
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