mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-21 03:21:43 -06:00
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.
451 lines
12 KiB
XML
451 lines
12 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ui version="4.0">
|
|
<class>EditDialog</class>
|
|
<widget class="QDialog" name="EditDialog">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>618</width>
|
|
<height>382</height>
|
|
</rect>
|
|
</property>
|
|
<property name="windowTitle">
|
|
<string>Edit database cell</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
<item>
|
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
<item>
|
|
<widget class="QLabel" name="labelMode">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>Mode:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QComboBox" name="comboMode">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="whatsThis">
|
|
<string>This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell.</string>
|
|
</property>
|
|
<item>
|
|
<property name="text">
|
|
<string>Text</string>
|
|
</property>
|
|
</item>
|
|
<item>
|
|
<property name="text">
|
|
<string>Binary</string>
|
|
</property>
|
|
</item>
|
|
<item>
|
|
<property name="text">
|
|
<string>Image</string>
|
|
</property>
|
|
</item>
|
|
<item>
|
|
<property name="text">
|
|
<string>JSON</string>
|
|
</property>
|
|
</item>
|
|
<item>
|
|
<property name="text">
|
|
<string>XML</string>
|
|
</property>
|
|
</item>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QToolButton" name="buttonAutoSwitchMode">
|
|
<property name="toolTip">
|
|
<string>Automatically adjust the editor mode to the loaded data type</string>
|
|
</property>
|
|
<property name="statusTip">
|
|
<string>Automatically adjust the editor mode to the loaded data type</string>
|
|
</property>
|
|
<property name="whatsThis">
|
|
<string>This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>Auto-switch</string>
|
|
</property>
|
|
<property name="icon">
|
|
<iconset resource="icons/icons.qrc">
|
|
<normaloff>:/icons/keyword</normaloff>
|
|
<normalon>:/icons/cog_go.png</normalon>:/icons/keyword</iconset>
|
|
</property>
|
|
<property name="checkable">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<spacer name="horizontalSpacer">
|
|
<property name="orientation">
|
|
<enum>Qt::Horizontal</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>40</width>
|
|
<height>20</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
<item>
|
|
<widget class="QToolButton" name="buttonIndent">
|
|
<property name="enabled">
|
|
<bool>false</bool>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>Auto-format: pretty print on loading, compact on saving.</string>
|
|
</property>
|
|
<property name="statusTip">
|
|
<string>Auto-format: pretty print on loading, compact on saving.</string>
|
|
</property>
|
|
<property name="whatsThis">
|
|
<string>When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>Autoformat</string>
|
|
</property>
|
|
<property name="icon">
|
|
<iconset resource="icons/icons.qrc">
|
|
<normaloff>:/icons/text_indent</normaloff>:/icons/text_indent</iconset>
|
|
</property>
|
|
<property name="checkable">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="buttonImport">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>Import from file</string>
|
|
</property>
|
|
<property name="whatsThis">
|
|
<string>Opens a file dialog used to import any kind of data to this database cell.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>&Import</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="buttonExport">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>Export to file</string>
|
|
</property>
|
|
<property name="whatsThis">
|
|
<string>Opens a file dialog used to export the contents of this database cell to a file.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>&Export</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="buttonNull">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string>Set this cell to NULL</string>
|
|
</property>
|
|
<property name="whatsThis">
|
|
<string>Erases the contents of the cell</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>Set as &NULL</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item>
|
|
<widget class="QStackedWidget" name="editorStack">
|
|
<property name="currentIndex">
|
|
<number>0</number>
|
|
</property>
|
|
<widget class="QWidget" name="verticalLayout_4">
|
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
<item>
|
|
<widget class="QTextEdit" name="editorText">
|
|
<property name="font">
|
|
<font>
|
|
<family>Monospace</family>
|
|
</font>
|
|
</property>
|
|
<property name="whatsThis">
|
|
<string>This area displays information about the data present in this database cell</string>
|
|
</property>
|
|
<property name="acceptRichText">
|
|
<bool>false</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<widget class="QWidget" name="editorBinary"/>
|
|
<widget class="QScrollArea" name="editorImageScrollArea">
|
|
<property name="widgetResizable">
|
|
<bool>true</bool>
|
|
</property>
|
|
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>98</width>
|
|
<height>35</height>
|
|
</rect>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
<item>
|
|
<widget class="QLabel" name="editorImage">
|
|
<property name="text">
|
|
<string/>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</widget>
|
|
<widget class="QWidget" name="editorSci">
|
|
<property name="whatsThis">
|
|
<string>This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving.
|
|
|
|
Errors are indicated with a red squiggle underline.</string>
|
|
</property>
|
|
</widget>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
<item>
|
|
<layout class="QVBoxLayout" name="verticalLayout">
|
|
<item>
|
|
<widget class="QLabel" name="labelType">
|
|
<property name="text">
|
|
<string>Type of data currently in cell</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QLabel" name="labelSize">
|
|
<property name="text">
|
|
<string>Size of data currently in table</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item>
|
|
<spacer name="horizontalSpacer_2">
|
|
<property name="orientation">
|
|
<enum>Qt::Horizontal</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>40</width>
|
|
<height>20</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="buttonApply">
|
|
<property name="toolTip">
|
|
<string>Apply data to cell [Ctrl+Return]</string>
|
|
</property>
|
|
<property name="whatsThis">
|
|
<string>This button saves the changes performed in the cell editor to the database cell.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>Apply</string>
|
|
</property>
|
|
<property name="default">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<tabstops>
|
|
<tabstop>buttonExport</tabstop>
|
|
<tabstop>buttonNull</tabstop>
|
|
</tabstops>
|
|
<resources>
|
|
<include location="icons/icons.qrc"/>
|
|
</resources>
|
|
<connections>
|
|
<connection>
|
|
<sender>buttonImport</sender>
|
|
<signal>clicked()</signal>
|
|
<receiver>EditDialog</receiver>
|
|
<slot>importData()</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>400</x>
|
|
<y>28</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>60</x>
|
|
<y>0</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
<connection>
|
|
<sender>buttonExport</sender>
|
|
<signal>clicked()</signal>
|
|
<receiver>EditDialog</receiver>
|
|
<slot>exportData()</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>488</x>
|
|
<y>51</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>162</x>
|
|
<y>17</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
<connection>
|
|
<sender>buttonApply</sender>
|
|
<signal>clicked()</signal>
|
|
<receiver>EditDialog</receiver>
|
|
<slot>accept()</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>605</x>
|
|
<y>358</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>241</x>
|
|
<y>406</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
<connection>
|
|
<sender>comboMode</sender>
|
|
<signal>currentIndexChanged(int)</signal>
|
|
<receiver>EditDialog</receiver>
|
|
<slot>editModeChanged(int)</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>71</x>
|
|
<y>27</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>201</x>
|
|
<y>431</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
<connection>
|
|
<sender>buttonNull</sender>
|
|
<signal>clicked()</signal>
|
|
<receiver>EditDialog</receiver>
|
|
<slot>setNull()</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>528</x>
|
|
<y>28</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>723</x>
|
|
<y>58</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
<connection>
|
|
<sender>editorText</sender>
|
|
<signal>textChanged()</signal>
|
|
<receiver>EditDialog</receiver>
|
|
<slot>editTextChanged()</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>279</x>
|
|
<y>191</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>339</x>
|
|
<y>335</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
<connection>
|
|
<sender>buttonIndent</sender>
|
|
<signal>toggled(bool)</signal>
|
|
<receiver>EditDialog</receiver>
|
|
<slot>setMustIndentAndCompact(bool)</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>309</x>
|
|
<y>22</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>308</x>
|
|
<y>190</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
<connection>
|
|
<sender>buttonAutoSwitchMode</sender>
|
|
<signal>toggled(bool)</signal>
|
|
<receiver>EditDialog</receiver>
|
|
<slot>switchEditorMode(bool)</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>135</x>
|
|
<y>22</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>308</x>
|
|
<y>190</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
</connections>
|
|
<slots>
|
|
<slot>importData()</slot>
|
|
<slot>exportData()</slot>
|
|
<slot>editTextChanged()</slot>
|
|
<slot>editModeChanged(int)</slot>
|
|
<slot>setNull()</slot>
|
|
</slots>
|
|
</ui>
|