diff options
| -rw-r--r-- | src/corelib/doc/images/modelview-move-rows-1.svg | 169 | ||||
| -rw-r--r-- | src/corelib/doc/images/modelview-move-rows-2.svg | 169 | ||||
| -rw-r--r-- | src/corelib/doc/images/modelview-move-rows-3.svg | 108 | ||||
| -rw-r--r-- | src/corelib/doc/images/modelview-move-rows-4.svg | 108 | ||||
| -rw-r--r-- | src/corelib/itemmodels/qabstractitemmodel.cpp | 8 |
5 files changed, 558 insertions, 4 deletions
diff --git a/src/corelib/doc/images/modelview-move-rows-1.svg b/src/corelib/doc/images/modelview-move-rows-1.svg new file mode 100644 index 00000000000..1c90c42f730 --- /dev/null +++ b/src/corelib/doc/images/modelview-move-rows-1.svg @@ -0,0 +1,169 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="200" + height="440" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<g transform="translate(10,10)"> +<path d="m 0.5,0.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,30.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="82" font-family="arial" font-size="20px" + class="text-style">2</text> +<path d="m 0.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 0.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 0.5,180.5 h 30 v 30 h -30 z" stroke="black" fill="white" + stroke-dasharray="5, 5" + class="box-style" /> +<path d="m 0.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 0.5,240.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="262" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,270.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="292" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,300.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="322" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 0.5,330.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="352" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 0.5,360.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="382" font-family="arial" font-size="20px" + class="high-text-style">4</text> +<path d="m 0.5,390.5 h 30 V 420.5 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="412" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 58.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="82" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 58.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="112" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 58.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="142" font-family="arial" font-size="20px" + class="high-text-style">4</text> + +<path d="m 145.5,0.5 h 30 v 30.956 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 145.5,31.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 145.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="82" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 145.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="112" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 145.5,180.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="202" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">3</text> +<path d="m 145.5,210.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="232" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">4</text> +<path d="m 145.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="142" font-family="arial" font-size="20px" + class="high-text-style">4</text> +<path d="m 145.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="172" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">2</text> +<path d="m 145.5,240.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="262" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">5</text> + +<path d="m 145.5,330.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="352" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 145.5,360.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="382" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 145.5,390.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="412" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">5</text> + +<path d="M 58.5,60.5 h -25" stroke="black" + class="line-style" /> +<path d="M 31.5,60.5 l 10,-5 l 0,10 z" stroke="none" fill="black" + class="fill-style" /> +<path d="M 31.5,315.5 h 42 v -163" stroke="black" fill="none" + class="line-style" /> +<path d="M 73.5,151.5 l -5,10 l 10,0 z" stroke="none" fill="black" + class="fill-style" /> +</g> +</svg> diff --git a/src/corelib/doc/images/modelview-move-rows-2.svg b/src/corelib/doc/images/modelview-move-rows-2.svg new file mode 100644 index 00000000000..12ebfc43a16 --- /dev/null +++ b/src/corelib/doc/images/modelview-move-rows-2.svg @@ -0,0 +1,169 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="200" + height="440" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<g transform="translate(10,10)"> +<path d="m 0.5,0.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,30.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="82" font-family="arial" font-size="20px" + class="text-style">2</text> +<path d="m 0.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 0.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 0.5,180.5 h 30 v 30 h -30 z" stroke="black" fill="white" + stroke-dasharray="5, 5" + class="box-style" /> +<path d="m 0.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 0.5,240.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="262" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,270.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="292" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,300.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="322" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 0.5,330.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="352" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 0.5,360.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="382" font-family="arial" font-size="20px" + class="high-text-style">4</text> +<path d="m 0.5,390.5 h 30 V 420.5 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="412" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 58.5,180.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="202" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 58.5,210.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="232" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 58.5,240.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="262" font-family="arial" font-size="20px" + class="high-text-style">4</text> + +<path d="m 145.5,0.5 h 30 v 30.956 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 145.5,31.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 145.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="82" font-family="arial" font-size="20px" + class="text-style">2</text> +<path d="m 145.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 145.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 145.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> +<path d="m 145.5,180.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="202" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 145.5,210.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="232" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 145.5,240.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="262" font-family="arial" font-size="20px" + class="high-text-style">4</text> + +<path d="m 145.5,330.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="352" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 145.5,360.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="382" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 145.5,390.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="412" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">5</text> + +<path d="M 58.5,180.5 h -25" stroke="black" + class="line-style" /> +<path d="M 31.5,180.5 l 10,-5 l 0,10 z" stroke="none" fill="black" + class="fill-style" /> +<path d="M 31.5,315.5 h 42 v -43" stroke="black" fill="none" + class="line-style" /> +<path d="M 73.5,271.5 l -5,10 l 10,0 z" stroke="none" fill="black" + class="fill-style" /> +</g> +</svg> diff --git a/src/corelib/doc/images/modelview-move-rows-3.svg b/src/corelib/doc/images/modelview-move-rows-3.svg new file mode 100644 index 00000000000..21d9803eb91 --- /dev/null +++ b/src/corelib/doc/images/modelview-move-rows-3.svg @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="200" + height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<g transform="translate(10,10)"> +<path d="m 0.5,0.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,30.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="82" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 0.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 0.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 0.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 58.5,0.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="22" font-family="arial" font-size="20px" + class="high-text-style">2</text> + +<path d="m 145.5,0.5 h 30 v 30.956 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="22" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 145.5,31.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="52" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">0</text> +<path d="m 145.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="82" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">1</text> +<path d="m 145.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 145.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 145.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="M 58.5,0.5 h -25" stroke="black" fill="none" + class="line-style" /> +<path d="M 31.5,0.5 l 10,-5 l 0,10 z" stroke="none" fill="black" + class="fill-style" /> +<path d="M 31.5,75.5 h 42 v -43" stroke="black" fill="none" + class="line-style" /> +<path d="M 73.5,31.5 l -5,10 l 10,0 z" stroke="black" fill="black" + class="fill-style" /> +</g> +</svg> diff --git a/src/corelib/doc/images/modelview-move-rows-4.svg b/src/corelib/doc/images/modelview-move-rows-4.svg new file mode 100644 index 00000000000..708eb71f440 --- /dev/null +++ b/src/corelib/doc/images/modelview-move-rows-4.svg @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="200" + height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<g transform="translate(10,10)"> +<path d="m 0.5,0.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,30.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="82" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 0.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 0.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 0.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 58.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="142" font-family="arial" font-size="20px" + class="high-text-style">2</text> + +<path d="m 145.5,0.5 h 30 v 30.956 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 145.5,31.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 145.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="82" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">3</text> +<path d="m 145.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="112" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 145.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 145.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="M 58.5,120.5 h -25" stroke="black" fill="none" + class="line-style" /> +<path d="M 31.5,120.5 l 10,-5 l 0,10 z" stroke="black" fill="black" + class="fill-style" /> +<path d="M 31.5,75.5 h 42 v 43" stroke="black" fill="none" + class="line-style" /> +<path d="M 73.5,119.5 l -5,-10 l 10,0 z" stroke="black" fill="black" + class="fill-style" /> +</g> +</svg> diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index bcb45a3c4b0..58a057009ff 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -3055,7 +3055,7 @@ void QAbstractItemModelPrivate::executePendingOperations() const { } \table 80% \row - \li \inlineimage modelview-move-rows-1.png Moving rows to another parent + \li \inlineimage modelview-move-rows-1.svg Moving rows to another parent \li Specify the first and last row numbers for the span of rows in the source parent you want to move in the model. Also specify the row in the destination parent to move the span to. @@ -3069,7 +3069,7 @@ void QAbstractItemModelPrivate::executePendingOperations() const { } This moves the three rows rows 2, 3, and 4 in the source to become 2, 3 and 4 in the destination. Other affected siblings are displaced accordingly. \row - \li \inlineimage modelview-move-rows-2.png Moving rows to append to another parent + \li \inlineimage modelview-move-rows-2.svg Moving rows to append to another parent \li To append rows to another parent, move them to after the last row. For example, as shown in the diagram, we move three rows to a @@ -3079,7 +3079,7 @@ void QAbstractItemModelPrivate::executePendingOperations() const { } This moves the target rows to the end of the target parent as 6, 7 and 8. \row - \li \inlineimage modelview-move-rows-3.png Moving rows in the same parent up + \li \inlineimage modelview-move-rows-3.svg Moving rows in the same parent up \li To move rows within the same parent, specify the row to move them to. For example, as shown in the diagram, we move one item from row 2 to row 0, @@ -3094,7 +3094,7 @@ void QAbstractItemModelPrivate::executePendingOperations() const { } it is already) \row - \li \inlineimage modelview-move-rows-4.png Moving rows in the same parent down + \li \inlineimage modelview-move-rows-4.svg Moving rows in the same parent down \li To move rows within the same parent, specify the row to move them to. For example, as shown in the diagram, we move one item from row 2 to row 4, |
