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
7cf4df92
Commit
7cf4df92
authored
Aug 27, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
preferences_widgets.*: Bool prefs widget
simple_preferences.cpp: Audio simple preferences category
parent
f293fd7b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
11 deletions
+88
-11
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+56
-0
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+10
-10
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+22
-1
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
7cf4df92
...
...
@@ -84,6 +84,18 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
p_control
=
new
IntegerConfigControl
(
p_this
,
p_item
,
parent
,
l
,
line
);
break
;
case
CONFIG_ITEM_FILE
:
fprintf
(
stderr
,
"Todo
\n
"
);
break
;
case
CONFIG_ITEM_BOOL
:
p_control
=
new
BoolConfigControl
(
p_this
,
p_item
,
parent
,
l
,
line
);
break
;
case
CONFIG_ITEM_FLOAT
:
if
(
p_item
->
f_min
||
p_item
->
f_max
)
fprintf
(
stderr
,
"Todo
\n
"
);
else
fprintf
(
stderr
,
"Todo
\n
"
);
break
;
default:
break
;
}
...
...
@@ -372,3 +384,47 @@ int IntegerListConfigControl::getValue()
{
return
combo
->
itemData
(
combo
->
currentIndex
()
).
toInt
();
}
/*********** Boolean **************/
BoolConfigControl
::
BoolConfigControl
(
vlc_object_t
*
_p_this
,
module_config_t
*
_p_item
,
QWidget
*
_parent
,
QGridLayout
*
l
,
int
line
)
:
VIntConfigControl
(
_p_this
,
_p_item
,
_parent
)
{
checkbox
=
new
QCheckBox
(
qfu
(
p_item
->
psz_text
)
);
finish
();
if
(
!
l
)
{
QHBoxLayout
*
layout
=
new
QHBoxLayout
();
layout
->
addWidget
(
checkbox
,
0
);
widget
->
setLayout
(
layout
);
}
else
{
l
->
addWidget
(
checkbox
,
line
,
0
);
}
}
BoolConfigControl
::
BoolConfigControl
(
vlc_object_t
*
_p_this
,
module_config_t
*
_p_item
,
QLabel
*
_label
,
QCheckBox
*
_checkbox
,
bool
bycat
)
:
VIntConfigControl
(
_p_this
,
_p_item
)
{
checkbox
=
_checkbox
;
finish
();
}
void
BoolConfigControl
::
finish
()
{
checkbox
->
setCheckState
(
p_item
->
i_value
==
VLC_TRUE
?
Qt
::
Checked
:
Qt
::
Unchecked
);
checkbox
->
setToolTip
(
qfu
(
p_item
->
psz_longtext
)
);
}
int
BoolConfigControl
::
getValue
()
{
return
checkbox
->
checkState
()
==
Qt
::
Checked
?
VLC_TRUE
:
VLC_FALSE
;
}
modules/gui/qt4/components/preferences_widgets.hpp
View file @
7cf4df92
...
...
@@ -29,15 +29,11 @@
#include <QLineEdit>
#include <QSpinBox>
#include <QComboBox>
#include <QCheckBox>
#include "ui/input_stats.h"
#include "qt4.hpp"
#include <assert.h>
class
QSpinBox
;
class
QString
;
class
QComboBox
;
class
QCheckBox
;
class
ConfigControl
:
public
QObject
{
Q_OBJECT
;
...
...
@@ -122,17 +118,21 @@ private:
QComboBox
*
combo
;
};
#if 0
class
BoolConfigControl
:
public
VIntConfigControl
{
public:
IntConfigControl( vlc_object_t *, module_config_t *, QWidget * );
virtual ~IntConfigControl();
BoolConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QWidget
*
,
QGridLayout
*
,
int
);
BoolConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QLabel
*
,
QCheckBox
*
,
bool
);
virtual
~
BoolConfigControl
()
{};
virtual
int
getValue
();
virtual
void
show
()
{
checkbox
->
show
();
}
virtual
void
hide
()
{
checkbox
->
hide
();
}
private:
wxCheckBox *checkbox;
QCheckBox
*
checkbox
;
void
finish
();
};
#endif
/*******************************************************
* Float-based controls
...
...
modules/gui/qt4/components/simple_preferences.cpp
View file @
7cf4df92
...
...
@@ -133,9 +133,30 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
switch
(
number
)
{
START_SPREFS_CAT
(
Video
);
CONFIG_GENERIC
(
"video"
,
Bool
,
NULL
,
enableVideo
);
CONFIG_GENERIC
(
"fullscreen"
,
Bool
,
NULL
,
fullscreen
);
CONFIG_GENERIC
(
"overlay"
,
Bool
,
NULL
,
overlay
);
CONFIG_GENERIC
(
"video-on-top"
,
Bool
,
NULL
,
alwaysOnTop
);
CONFIG_GENERIC
(
"video-deco"
,
Bool
,
NULL
,
windowDecorations
);
CONFIG_GENERIC
(
"vout"
,
Module
,
NULL
,
outputModule
);
CONFIG_GENERIC
(
"snapshot-path"
,
String
,
NULL
,
snapshotsDirectory
);
/* FIXME -> use file instead of string */
CONFIG_GENERIC
(
"snapshot-prefix"
,
String
,
NULL
,
snapshotsPrefix
);
CONFIG_GENERIC
(
"snapshot-sequential"
,
Bool
,
NULL
,
snapshotsSequentialNumbering
);
CONFIG_GENERIC
(
"snapshot-format"
,
StringList
,
NULL
,
snapshotsFormat
);
END_SPREFS_CAT
;
START_SPREFS_CAT
(
Audio
);
CONFIG_GENERIC
(
"audio"
,
Bool
,
NULL
,
enableAudio
);
END_SPREFS_CAT
;
case
SPrefsInputAndCodecs
:
break
;
...
...
@@ -149,7 +170,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_GENERIC
(
"subsdec-encoding"
,
StringList
,
NULL
,
encoding
);
CONFIG_GENERIC
(
"sub-language"
,
String
,
NULL
,
preferedLanguage
);
CONFIG_GENERIC
(
"freetype-font"
,
String
,
NULL
,
font
);
CONFIG_GENERIC
(
"freetype-font"
,
String
,
NULL
,
font
);
/* FIXME -> use file instead of string */
CONFIG_GENERIC
(
"freetype-color"
,
IntegerList
,
NULL
,
fontColor
);
CONFIG_GENERIC
(
"freetype-rel-fontsize"
,
IntegerList
,
NULL
,
fontSize
);
...
...
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