Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
92661c0e
Commit
92661c0e
authored
Feb 28, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: clean and cosmetics
parent
84a974e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
30 deletions
+37
-30
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+20
-20
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+17
-10
No files found.
modules/gui/qt4/main_interface.cpp
View file @
92661c0e
...
...
@@ -83,7 +83,6 @@ static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
MainInterface
::
MainInterface
(
intf_thread_t
*
_p_intf
)
:
QVLCMW
(
_p_intf
)
{
/* Variables initialisation */
// need_components_update = false;
bgWidget
=
NULL
;
videoWidget
=
NULL
;
playlistWidget
=
NULL
;
...
...
@@ -95,12 +94,12 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
controls
=
NULL
;
inputC
=
NULL
;
b_hideAfterCreation
=
false
;
b_hideAfterCreation
=
false
;
// --qt-start-minimized
playlistVisible
=
false
;
// FIXME remove
input_name
=
""
;
i_bg_height
=
0
;
/* Ask for Privacy */
FirstRun
::
CheckAndRun
(
this
,
p_intf
);
...
...
@@ -116,7 +115,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
setWindowOpacity
(
var_InheritFloat
(
p_intf
,
"qt-opacity"
)
);
/* Set The Video In emebedded Mode or not */
videoEmbeddedFlag
=
var_InheritBool
(
p_intf
,
"embedded-video"
);
b_videoEmbedded
=
var_InheritBool
(
p_intf
,
"embedded-video"
);
/* Does the interface resize to video size or the opposite */
b_keep_size
=
!
var_InheritBool
(
p_intf
,
"qt-video-autoresize"
);
...
...
@@ -125,7 +124,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
i_visualmode
=
var_InheritInteger
(
p_intf
,
"qt-display-mode"
);
/* Do we want anoying popups or not */
notificationEnabled
=
var_InheritBool
(
p_intf
,
"qt-notification"
);
b_
notificationEnabled
=
var_InheritBool
(
p_intf
,
"qt-notification"
);
/* Set the other interface settings */
settings
=
getSettings
();
...
...
@@ -343,8 +342,7 @@ MainInterface::~MainInterface()
settings
->
setValue
(
"mainBasedSize"
,
mainBasedSize
);
settings
->
setValue
(
"mainVideoSize"
,
mainVideoSize
);
if
(
bgWidget
)
settings
->
setValue
(
"backgroundSize"
,
bgWidget
->
size
()
);
settings
->
setValue
(
"backgroundSize"
,
bgWidget
->
size
()
);
/* Save this size */
QVLCTools
::
saveWidgetPosition
(
settings
,
this
);
...
...
@@ -364,6 +362,7 @@ MainInterface::~MainInterface()
*****************************/
void
MainInterface
::
recreateToolbars
()
{
// FIXME: do the same for the FSC
//msg_Dbg( p_intf, "Recreating the toolbars" );
settings
->
beginGroup
(
"MainWindow"
);
delete
controls
;
...
...
@@ -406,7 +405,7 @@ void MainInterface::createMainWidget( QSettings *settings )
/* And video Outputs */
if
(
videoEmbeddedFlag
)
if
(
b_videoEmbedded
)
{
videoWidget
=
new
VideoWidget
(
p_intf
);
stackCentralW
->
insertWidget
(
VIDEO_TAB
,
videoWidget
);
...
...
@@ -784,7 +783,7 @@ void MainInterface::debug()
{
#ifdef DEBUG_INTF
msg_Dbg
(
p_intf
,
"Stack Size: %i - %i"
,
stackCentralW
->
size
().
height
(),
size
().
width
()
);
if
(
videoEmbeddedFlag
)
if
(
b_videoEmbedded
)
msg_Dbg
(
p_intf
,
"Stack Size: %i - %i"
,
stackCentralW
->
widget
(
VIDEO_TAB
)
->
size
().
height
(),
stackCentralW
->
widget
(
VIDEO_TAB
)
->
size
().
width
()
);
...
...
@@ -863,23 +862,24 @@ void MainInterface::destroyPopupMenu()
QVLCMenu
::
PopupMenu
(
p_intf
,
false
);
}
void
MainInterface
::
toggleFSC
()
{
if
(
!
fullscreenControls
)
return
;
IMEvent
*
eShow
=
new
IMEvent
(
FullscreenControlToggle_Type
,
0
);
QApplication
::
postEvent
(
fullscreenControls
,
eShow
);
}
void
MainInterface
::
popupMenu
(
const
QPoint
&
p
)
{
/* Ow, that's ugly: don't show the popup menu if cursor over
/* FIXME
* Ow, that's ugly: don't show the popup menu if cursor over
* the main menu bar or the status bar */
if
(
!
childAt
(
p
)
||
(
(
childAt
(
p
)
!=
menuBar
()
)
&&
(
childAt
(
p
)
->
parentWidget
()
!=
statusBar
()
)
)
)
QVLCMenu
::
PopupMenu
(
p_intf
,
true
);
}
void
MainInterface
::
toggleFSC
()
{
if
(
!
fullscreenControls
)
return
;
IMEvent
*
eShow
=
new
IMEvent
(
FullscreenControlToggle_Type
,
0
);
QApplication
::
postEvent
(
fullscreenControls
,
eShow
);
}
/****************************************************************************
* Video Handling
****************************************************************************/
...
...
@@ -901,7 +901,7 @@ private:
/**
* NOTE:
* You must not
e
change the state of this object or other Qt4 UI objects,
* You must not change the state of this object or other Qt4 UI objects,
* from the video output thread - only from the Qt4 UI main loop thread.
* All window provider queries must be handled through signals or events.
* That's why we have all those emit statements...
...
...
@@ -1312,7 +1312,7 @@ void MainInterface::updateSystrayTooltipName( const QString& name )
else
{
sysTray
->
setToolTip
(
name
);
if
(
notificationEnabled
&&
(
isHidden
()
||
isMinimized
()
)
)
if
(
b_
notificationEnabled
&&
(
isHidden
()
||
isMinimized
()
)
)
{
sysTray
->
showMessage
(
qtr
(
"VLC media player"
),
name
,
QSystemTrayIcon
::
NoIcon
,
3000
);
...
...
modules/gui/qt4/main_interface.hpp
View file @
92661c0e
...
...
@@ -92,7 +92,7 @@ public:
protected:
void
dropEventPlay
(
QDropEvent
*
,
bool
);
#ifdef WIN32
bool
winEvent
(
MSG
*
,
long
*
);
virtual
bool
winEvent
(
MSG
*
,
long
*
);
#endif
virtual
void
dropEvent
(
QDropEvent
*
);
virtual
void
dragEnterEvent
(
QDragEnterEvent
*
);
...
...
@@ -105,21 +105,24 @@ protected:
virtual
void
resizeEvent
(
QResizeEvent
*
event
);
private:
/* Main Widgets Creation */
void
createMainWidget
(
QSettings
*
);
void
createStatusBar
();
void
createPlaylist
();
/* Systray */
void
handleSystray
();
void
createSystray
();
void
handleSystray
();
void
initSystray
();
/* Mess about stackWidget */
void
showTab
(
int
i_tab
);
void
restoreStackOldWidget
();
void
showVideo
()
{
showTab
(
VIDEO_TAB
);
}
void
showBg
()
{
showTab
(
BACKG_TAB
);
}
void
hideStackWidget
()
{
showTab
(
HIDDEN_TAB
);
}
/* */
QSettings
*
settings
;
#ifndef HAVE_MAEMO
QSystemTrayIcon
*
sysTray
;
...
...
@@ -131,6 +134,7 @@ private:
InputControlsWidget
*
inputC
;
FullscreenControllerWidget
*
fullscreenControls
;
QStackedWidget
*
stackCentralW
;
/* Video */
VideoWidget
*
videoWidget
;
...
...
@@ -151,19 +155,22 @@ private:
};
int
stackCentralOldState
;
// bool videoIsActive; ///< Having a video now / THEMIM->hasV
bool
videoEmbeddedFlag
;
///< Want an external Video Window
/* Flags */
bool
b_notificationEnabled
;
/// Systray Notifications
bool
b_keep_size
;
///< persistent resizeable window
bool
b_videoEmbedded
;
///< Want an external Video Window
bool
b_hideAfterCreation
;
int
i_visualmode
;
///< Visual Mode
/* States */
bool
playlistVisible
;
///< Is the playlist visible ?
bool
visualSelectorEnabled
;
bool
notificationEnabled
;
/// Systray Notifications
// bool videoIsActive; ///< Having a video now / THEMIM->hasV
// bool b_visualSelectorEnabled;
bool
b_plDocked
;
///< Is the playlist docked ?
bool
b_keep_size
;
///< persistent resizeable window
QSize
mainBasedSize
;
///< based Wnd (normal mode only)
QSize
mainVideoSize
;
///< Wnd with video (all modes)
int
i_visualmode
;
///< Visual Mode
bool
b_plDocked
;
int
i_bg_height
;
///< Save height of bgWidget
bool
b_hideAfterCreation
;
#ifdef WIN32
HIMAGELIST
himl
;
...
...
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