Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
5026ce2b
Commit
5026ce2b
authored
Feb 11, 2021
by
Jean-Baptiste Mardelle
Browse files
Subtitle edit: switch to KTextEdit so we get spell check
parent
ee13f34b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dialogs/subtitleedit.cpp
View file @
5026ce2b
...
...
@@ -69,10 +69,10 @@ SubtitleEdit::SubtitleEdit(QWidget *parent)
auto
*
keyFilter
=
new
ShiftEnterFilter
(
this
);
subText
->
installEventFilter
(
keyFilter
);
connect
(
keyFilter
,
&
ShiftEnterFilter
::
triggerUpdate
,
this
,
&
SubtitleEdit
::
updateSubtitle
);
connect
(
subText
,
&
QPlain
TextEdit
::
textChanged
,
[
this
]()
{
connect
(
subText
,
&
K
TextEdit
::
textChanged
,
[
this
]()
{
buttonApply
->
setEnabled
(
true
);
});
connect
(
subText
,
&
QPlain
TextEdit
::
cursorPositionChanged
,
[
this
]()
{
connect
(
subText
,
&
K
TextEdit
::
cursorPositionChanged
,
[
this
]()
{
buttonCut
->
setEnabled
(
true
);
});
...
...
src/ui/editsub_ui.ui
View file @
5026ce2b
...
...
@@ -6,56 +6,11 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
392
</width>
<height>
366
</height>
<width>
246
</width>
<height>
281
</height>
</rect>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
<item
row=
"2"
column=
"0"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QToolButton"
name=
"buttonPrev"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
<property
name=
"arrowType"
>
<enum>
Qt::LeftArrow
</enum>
</property>
</widget>
</item>
<item>
<widget
class=
"QToolButton"
name=
"buttonNext"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
<property
name=
"arrowType"
>
<enum>
Qt::RightArrow
</enum>
</property>
</widget>
</item>
<item>
<widget
class=
"QToolButton"
name=
"buttonAdd"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QToolButton"
name=
"buttonCut"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QToolButton"
name=
"buttonApply"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"2"
column=
"1"
>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
...
...
@@ -69,6 +24,19 @@
</property>
</spacer>
</item>
<item
row=
"0"
column=
"0"
colspan=
"3"
>
<widget
class=
"KTextEdit"
name=
"subText"
>
<property
name=
"tabChangesFocus"
>
<bool>
true
</bool>
</property>
<property
name=
"acceptRichText"
>
<bool>
false
</bool>
</property>
<property
name=
"checkSpellingEnabled"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"2"
column=
"2"
>
<widget
class=
"QToolButton"
name=
"buttonDelete"
>
<property
name=
"text"
>
...
...
@@ -163,15 +131,60 @@
</layout>
</widget>
</item>
<item
row=
"0"
column=
"0"
colspan=
"3"
>
<widget
class=
"QPlainTextEdit"
name=
"subText"
>
<property
name=
"tabChangesFocus"
>
<bool>
true
</bool>
</property>
</widget>
<item
row=
"2"
column=
"0"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QToolButton"
name=
"buttonPrev"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
<property
name=
"arrowType"
>
<enum>
Qt::LeftArrow
</enum>
</property>
</widget>
</item>
<item>
<widget
class=
"QToolButton"
name=
"buttonNext"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
<property
name=
"arrowType"
>
<enum>
Qt::RightArrow
</enum>
</property>
</widget>
</item>
<item>
<widget
class=
"QToolButton"
name=
"buttonAdd"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QToolButton"
name=
"buttonCut"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QToolButton"
name=
"buttonApply"
>
<property
name=
"text"
>
<string>
...
</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>
KTextEdit
</class>
<extends>
QTextEdit
</extends>
<header>
ktextedit.h
</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment