63eaa3a989
Visualize what's going on with tst_QTextCursor::insertMarkdown() at least. But this could be expanded for other purposes. It's also interesting to test drag-and-drop with this. And you can save the result to any supported text format. Change-Id: I363c32ff9b1bd7c53c562b08c58de95a69be0aa9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
223 lines
6.8 KiB
XML
223 lines
6.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ui version="4.0">
|
|
<class>Widget</class>
|
|
<widget class="QWidget" name="Widget">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>1200</width>
|
|
<height>600</height>
|
|
</rect>
|
|
</property>
|
|
<property name="windowTitle">
|
|
<string>Try inserting (or dragging) text on right into text on left</string>
|
|
</property>
|
|
<layout class="QGridLayout" name="gridLayout">
|
|
<item row="0" column="0">
|
|
<widget class="QTextEdit" name="textEdit">
|
|
<property name="html">
|
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
|
|
p, li { white-space: pre-wrap; }
|
|
hr { height: 1px; border-width: 0; }
|
|
li.unchecked::marker { content: "\2610"; }
|
|
li.checked::marker { content: "\2612"; }
|
|
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
|
<ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;">
|
|
<li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">bread</li>
|
|
<li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">milk</li></ol></body></html></string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="0" column="1">
|
|
<widget class="QPlainTextEdit" name="plainTextEdit">
|
|
<property name="plainText">
|
|
<string>0) eggs
|
|
1) maple syrup</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="0">
|
|
<layout class="QFormLayout" name="formLayout">
|
|
<item row="2" column="0">
|
|
<widget class="QLabel" name="label">
|
|
<property name="text">
|
|
<string>List</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="2" column="1">
|
|
<widget class="QLabel" name="listDesc">
|
|
<property name="text">
|
|
<string/>
|
|
</property>
|
|
<property name="textFormat">
|
|
<enum>Qt::PlainText</enum>
|
|
</property>
|
|
<property name="wordWrap">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="0" column="1">
|
|
<widget class="QComboBox" name="richTextCB"/>
|
|
</item>
|
|
<item row="0" column="0">
|
|
<widget class="QLabel" name="label_2">
|
|
<property name="text">
|
|
<string>Change to</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="0">
|
|
<widget class="QLabel" name="label_3">
|
|
<property name="text">
|
|
<string>Block</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="1">
|
|
<widget class="QLabel" name="blockDesc">
|
|
<property name="text">
|
|
<string/>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="4" column="0">
|
|
<widget class="QPushButton" name="saveButton">
|
|
<property name="text">
|
|
<string>Save</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="3" column="0">
|
|
<spacer name="verticalSpacer">
|
|
<property name="orientation">
|
|
<enum>Qt::Vertical</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>20</width>
|
|
<height>40</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item row="1" column="1">
|
|
<layout class="QVBoxLayout" name="verticalLayout">
|
|
<item>
|
|
<widget class="QComboBox" name="plainTextCB"/>
|
|
</item>
|
|
<item>
|
|
<widget class="QGroupBox" name="groupBox_2">
|
|
<property name="title">
|
|
<string>Before</string>
|
|
</property>
|
|
<layout class="QGridLayout" name="gridLayout_2">
|
|
<item row="4" column="0">
|
|
<widget class="QCheckBox" name="newBlockBeforeCB">
|
|
<property name="text">
|
|
<string>new block</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="0" column="2">
|
|
<widget class="QRadioButton" name="moveToEndRB">
|
|
<property name="text">
|
|
<string>move to end of block</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="0" column="1">
|
|
<widget class="QRadioButton" name="moveToBeginningRB">
|
|
<property name="text">
|
|
<string>move to beginning of block</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="0" column="0">
|
|
<widget class="QRadioButton" name="radioButton">
|
|
<property name="text">
|
|
<string>nothing</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="4" column="1">
|
|
<widget class="QCheckBox" name="defaultBlockFormatCB">
|
|
<property name="text">
|
|
<string>default block format</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QGroupBox" name="groupBox">
|
|
<property name="title">
|
|
<string>Insert</string>
|
|
</property>
|
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
<item>
|
|
<widget class="QPushButton" name="insertMarkdownButton">
|
|
<property name="text">
|
|
<string>Markdown</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="insertHtmlButton">
|
|
<property name="text">
|
|
<string>HTML</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="insertPlainButton">
|
|
<property name="text">
|
|
<string>Plain</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QGroupBox" name="groupBox_3">
|
|
<property name="title">
|
|
<string>After</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
<item>
|
|
<widget class="QCheckBox" name="newBlockAfterCB">
|
|
<property name="text">
|
|
<string>new block</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>false</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<resources/>
|
|
<connections/>
|
|
</ui>
|