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
7d1569ca
Commit
7d1569ca
authored
Jan 31, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Start mode configuration simplification.
parent
83210184
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
31 deletions
+45
-31
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+17
-13
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+1
-1
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+23
-17
modules/gui/qt4/qt4.hpp
modules/gui/qt4/qt4.hpp
+4
-0
No files found.
modules/gui/qt4/main_interface.cpp
View file @
7d1569ca
...
...
@@ -22,6 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
...
...
@@ -102,6 +103,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/**
* Configuration and settings
* Pre-building of interface
**/
settings
=
new
QSettings
(
"vlc"
,
"vlc-qt-interface"
);
settings
->
beginGroup
(
"MainWindow"
);
...
...
@@ -113,13 +115,10 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
setWindowOpacity
(
config_GetFloat
(
p_intf
,
"qt-opacity"
)
);
/* Set The Video In emebedded Mode or not */
videoEmbeddedFlag
=
false
;
if
(
config_GetInt
(
p_intf
,
"embedded-video"
)
)
videoEmbeddedFlag
=
true
;
videoEmbeddedFlag
=
config_GetInt
(
p_intf
,
"embedded-video"
);
/* Are we in the enhanced always-video mode or not ? */
alwaysVideoFlag
=
false
;
if
(
videoEmbeddedFlag
&&
config_GetInt
(
p_intf
,
"qt-always-video"
)
)
alwaysVideoFlag
=
true
;
i_visualmode
=
config_GetInt
(
p_intf
,
"qt-display-mode"
);
/* Set the other interface settings */
//TODO: I don't like that code
...
...
@@ -211,17 +210,14 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
if
(
b_systrayAvailable
&&
b_createSystray
)
createSystray
();
if
(
config_GetInt
(
p_intf
,
"qt-minimal-view"
)
)
toggleMinimalView
();
/********************
* Input Manager *
********************/
MainInputManager
::
getInstance
(
p_intf
);
/********************
* Various CONNECTs *
********************/
/********************
******
* Various CONNECTs
on IM
*
********************
******
/
/* Connect the input manager to the GUI elements it manages */
/* It is also connected to the control->slider, see the ControlsWidget */
...
...
@@ -295,6 +291,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
CONNECT
(
controls
,
advancedControlsToggled
(
bool
),
this
,
doComponentsUpdate
()
);
/* Size and placement of interface */
move
(
settings
->
value
(
"pos"
,
QPoint
(
0
,
0
)
).
toPoint
()
);
QSize
newSize
=
settings
->
value
(
"size"
,
QSize
(
350
,
60
)
).
toSize
();
...
...
@@ -307,6 +305,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
msg_Warn
(
p_intf
,
"Invalid size in constructor"
);
}
/* Playlist */
int
tgPlay
=
settings
->
value
(
"playlist-visible"
,
0
).
toInt
();
settings
->
endGroup
();
...
...
@@ -315,8 +314,12 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
togglePlaylist
();
}
updateGeometry
();
if
(
i_visualmode
==
QT_MINIMAL_MODE
)
toggleMinimalView
();
/* Update the geometry TODO: is it useful */
updateGeometry
();
}
MainInterface
::~
MainInterface
()
...
...
@@ -417,7 +420,8 @@ void MainInterface::handleMainUi( QSettings *settings )
#endif
/* And video Outputs */
if
(
alwaysVideoFlag
)
if
(
i_visualmode
==
QT_ALWAYS_VIDEO_MODE
||
i_visualmode
==
QT_MINIMAL_MODE
)
{
bgWidget
=
new
BackgroundWidget
(
p_intf
);
bgWidget
->
resize
(
...
...
modules/gui/qt4/main_interface.hpp
View file @
7d1569ca
...
...
@@ -121,10 +121,10 @@ private:
bool
videoIsActive
;
///< Having a video now / THEMIM->hasV
bool
videoEmbeddedFlag
;
///< Want an external Video Window
bool
playlistVisible
;
///< Is the playlist visible ?
bool
alwaysVideoFlag
;
///< Always show the background
bool
visualSelectorEnabled
;
bool
notificationEnabled
;
/// Systray Notifications
bool
b_remainingTime
;
/* showing elapsed or remaining time */
int
i_visualmode
;
///< Visual Mode
input_thread_t
*
p_input
;
///< Main input associated to the playlist
...
...
modules/gui/qt4/qt4.cpp
View file @
7d1569ca
...
...
@@ -57,16 +57,9 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define ALWAYS_VIDEO_TEXT N_( "Always show an area for information when " \
"no video is played" )
#define ALWAYS_VIDEO_LONGTEXT N_( "Start VLC with a cone image, and " \
"use this zone to show information as " \
"lyrics, album arts or visualisation " \
" when there is no video track." )
#define ADVANCED_PREFS_TEXT N_( "Show advanced prefs over simple ones" )
#define ADVANCED_PREFS_LONGTEXT N_( "Show advanced preferences and not simple "
\
"preferences when opening the preferences "
\
#define ADVANCED_PREFS_LONGTEXT N_( "Show advanced preferences and not simple "\
"preferences when opening the preferences "\
"dialog." )
#define SYSTRAY_TEXT N_( "Systray icon" )
...
...
@@ -103,12 +96,10 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define SHOWFLAGS_TEXT N_( "Define what columns to show in playlist window" )
#define SHOWFLAGS_LONGTEXT N_( "Enter the sum of the options that you want: \n" \
"Title: 1; Duration: 2; Artist: 4; Genre: 8; " \
"Copyright: 16; Collection/album: 32; Rating: 256." )
"Copyright: 16; Collection/album: 32; Rating: 256." )
#define ERROR_TEXT N_( "Show unimportant error and warnings dialogs" )
#define MINIMAL_TEXT N_( "Start in minimal view (menus hidden)." )
#define UPDATER_TEXT N_( "Activate the updates availability notification" )
#define UPDATER_LONGTEXT N_( "Activate the automatic notification of new " \
"versions of the software. It runs once a week." )
...
...
@@ -124,8 +115,25 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define PRIVACY_TEXT N_( "Ask for network policy at start" )
#define VIEWDETAIL_TEXT N_( "Show the opening dialog view in detail mode" )
#define QT_MODE_TEXT N_( "Selection of the starting mode and look " )
#define QT_MODE_LONGTEXT N_( "Start VLC with:\n" \
" - normal mode\n" \
" - a zone always present to show information" \
"as lyrics, album arts...\n" \
" - minimal mode with limited controls" )
#define QT_NORMAL_MODE_TEXT N_( "Classic look" )
#define QT_ALWAYS_VIDEO_MODE_TEXT N_( "Complete look with information area" )
#define QT_MINIMAL_MODE_TEXT N_( "Minimal look with no menus" )
static
int
i_mode_list
[]
=
{
QT_NORMAL_MODE
,
QT_ALWAYS_VIDEO_MODE
,
QT_MINIMAL_MODE
};
static
const
char
*
psz_mode_list_text
[]
=
{
QT_NORMAL_MODE_TEXT
,
QT_ALWAYS_VIDEO_MODE_TEXT
,
QT_MINIMAL_MODE_TEXT
};
vlc_module_begin
();
set_shortname
(
(
char
*
)
"Qt"
);
set_description
(
(
char
*
)
_
(
"Qt interface"
)
);
...
...
@@ -140,10 +148,9 @@ vlc_module_begin();
set_description
(
"Dialogs provider"
);
set_capability
(
"dialogs provider"
,
51
);
add_bool
(
"qt-always-video"
,
VLC_FALSE
,
NULL
,
ALWAYS_VIDEO_TEXT
,
ALWAYS_VIDEO_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"qt-minimal-view"
,
VLC_FALSE
,
NULL
,
MINIMAL_TEXT
,
MINIMAL_TEXT
,
VLC_TRUE
);
add_integer
(
"qt-display-mode"
,
QT_NORMAL_MODE
,
NULL
,
QT_MODE_TEXT
,
QT_MODE_LONGTEXT
,
VLC_FALSE
);
change_integer_list
(
i_mode_list
,
psz_mode_list_text
,
0
);
add_bool
(
"qt-notification"
,
VLC_TRUE
,
NULL
,
NOTIFICATION_TEXT
,
NOTIFICATION_LONGTEXT
,
VLC_FALSE
);
...
...
@@ -193,7 +200,6 @@ vlc_module_begin();
add_bool
(
"qt-privacy-ask"
,
VLC_TRUE
,
NULL
,
PRIVACY_TEXT
,
PRIVACY_TEXT
,
VLC_FALSE
);
set_callbacks
(
OpenDialogs
,
Close
);
vlc_module_end
();
...
...
modules/gui/qt4/qt4.hpp
View file @
7d1569ca
...
...
@@ -41,6 +41,10 @@
#define VLC_META_ENGINE_DURATION 0x00000002
#define VLC_META_DURATION N_( "Duration" )
#define QT_NORMAL_MODE 0
#define QT_ALWAYS_VIDEO_MODE 1
#define QT_MINIMAL_MODE 2
class
QApplication
;
class
QMenu
;
class
MainInterface
;
...
...
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