Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
b74a7b1a
Commit
b74a7b1a
authored
Dec 18, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: info_panels: use validation mask for tracknumber/total input
parent
712c81e7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
19 deletions
+21
-19
modules/gui/qt4/components/info_panels.cpp
modules/gui/qt4/components/info_panels.cpp
+20
-17
modules/gui/qt4/components/info_panels.hpp
modules/gui/qt4/components/info_panels.hpp
+1
-2
No files found.
modules/gui/qt4/components/info_panels.cpp
View file @
b74a7b1a
...
...
@@ -107,16 +107,12 @@ MetaPanel::MetaPanel( QWidget *parent,
label
->
setFont
(
smallFont
);
label
->
setContentsMargins
(
3
,
2
,
0
,
0
);
metaLayout
->
addWidget
(
label
,
line
-
1
,
7
,
1
,
3
);
seqnum_text
=
new
QLineEdit
;
seqnum_text
->
setMaximumWidth
(
60
);
metaLayout
->
addWidget
(
seqnum_text
,
line
,
7
,
1
,
1
);
tracknumber_text
=
new
QLineEdit
;
tracknumber_text
->
setAlignment
(
Qt
::
AlignRight
);
tracknumber_text
->
setInputMask
(
"0000/0000"
);
tracknumber_text
->
setMaximumWidth
(
128
);
metaLayout
->
addWidget
(
tracknumber_text
,
line
,
7
,
1
,
-
1
);
label
=
new
QLabel
(
"/"
);
label
->
setFont
(
smallFont
);
metaLayout
->
addWidget
(
label
,
line
,
8
,
1
,
1
);
seqtot_text
=
new
QLineEdit
;
seqtot_text
->
setMaximumWidth
(
60
);
metaLayout
->
addWidget
(
seqtot_text
,
line
,
9
,
1
,
1
);
line
++
;
/* Rating - on the same line */
...
...
@@ -165,8 +161,7 @@ MetaPanel::MetaPanel( QWidget *parent,
metaLayout
->
setRowStretch
(
line
,
10
);
#undef ADD_META
CONNECT
(
seqnum_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
seqtot_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
tracknumber_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
date_text
,
textEdited
(
QString
),
this
,
enterEditMode
()
);
CONNECT
(
THEMIM
->
getIM
(),
artChanged
(
QString
),
this
,
enterEditMode
()
);
...
...
@@ -231,8 +226,16 @@ void MetaPanel::update( input_item_t *p_item )
UPDATE_META
(
EncodedBy
,
encodedby_text
);
UPDATE_META
(
Date
,
date_text
);
UPDATE_META
(
TrackNum
,
seqnum_text
);
UPDATE_META
(
TrackTotal
,
seqtot_text
);
QString
trackposition
(
"%1/%2"
);
psz_meta
=
input_item_GetTrackNum
(
p_item
);
trackposition
=
trackposition
.
arg
(
psz_meta
);
free
(
psz_meta
);
psz_meta
=
input_item_GetTrackTotal
(
p_item
);
trackposition
=
trackposition
.
arg
(
psz_meta
);
free
(
psz_meta
);
tracknumber_text
->
setText
(
trackposition
);
// UPDATE_META( Setting, setting_text );
// UPDATE_META_INT( Rating, rating_text );
...
...
@@ -281,8 +284,9 @@ void MetaPanel::saveMeta()
input_item_SetArtist
(
p_input
,
qtu
(
artist_text
->
text
()
)
);
input_item_SetAlbum
(
p_input
,
qtu
(
collection_text
->
text
()
)
);
input_item_SetGenre
(
p_input
,
qtu
(
genre_text
->
text
()
)
);
input_item_SetTrackNum
(
p_input
,
qtu
(
seqnum_text
->
text
()
)
);
input_item_SetTrackTotal
(
p_input
,
qtu
(
seqtot_text
->
text
()
)
);
QStringList
trackparts
=
tracknumber_text
->
text
().
split
(
"/"
);
input_item_SetTrackNum
(
p_input
,
qtu
(
trackparts
[
0
]
)
);
input_item_SetTrackTotal
(
p_input
,
qtu
(
trackparts
[
1
]
)
);
input_item_SetDate
(
p_input
,
qtu
(
date_text
->
text
()
)
);
input_item_SetCopyright
(
p_input
,
qtu
(
copyright_text
->
text
()
)
);
...
...
@@ -324,8 +328,7 @@ void MetaPanel::clear()
genre_text
->
clear
();
copyright_text
->
clear
();
collection_text
->
clear
();
seqnum_text
->
clear
();
seqtot_text
->
clear
();
tracknumber_text
->
clear
();
description_text
->
clear
();
date_text
->
clear
();
language_text
->
clear
();
...
...
modules/gui/qt4/components/info_panels.hpp
View file @
b74a7b1a
...
...
@@ -72,8 +72,7 @@ private:
QLineEdit
*
genre_text
;
QLineEdit
*
copyright_text
;
QLineEdit
*
collection_text
;
QLineEdit
*
seqnum_text
;
QLineEdit
*
seqtot_text
;
QLineEdit
*
tracknumber_text
;
QTextEdit
*
description_text
;
// QSpinBox *rating_text;
...
...
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