Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a23552a9
Commit
a23552a9
authored
Jul 05, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Untested] Save interface position
parent
8f270cb5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
10 deletions
+58
-10
modules/gui/qt4/dialogs/playlist.cpp
modules/gui/qt4/dialogs/playlist.cpp
+2
-0
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+3
-7
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+1
-2
modules/gui/qt4/util/qvlcframe.hpp
modules/gui/qt4/util/qvlcframe.hpp
+52
-1
No files found.
modules/gui/qt4/dialogs/playlist.cpp
View file @
a23552a9
...
...
@@ -32,8 +32,10 @@ PlaylistDialog::PlaylistDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
new
StandardPLPanel
(
this
,
p_intf
,
p_playlist
,
p_playlist
->
p_root_category
);
readSettings
(
"playlist"
,
QSize
(
500
,
500
)
);
}
PlaylistDialog
::~
PlaylistDialog
()
{
writeSettings
(
"playlist"
);
}
modules/gui/qt4/main_interface.cpp
View file @
a23552a9
...
...
@@ -31,11 +31,9 @@
#include <assert.h>
#include <QPushButton>
MainInterface
::
MainInterface
(
intf_thread_t
*
_p_intf
)
:
QMainWindow
(),
p_intf
(
_p_intf
)
MainInterface
::
MainInterface
(
intf_thread_t
*
_p_intf
)
:
QVLCMW
(
_p_intf
)
{
/* All UI stuff */
QVLCFrame
::
fixStyle
(
this
);
QWidget
*
main
=
new
QWidget
(
this
);
setCentralWidget
(
main
);
setWindowTitle
(
QString
::
fromUtf8
(
_
(
"VLC media player"
)
)
);
...
...
@@ -56,16 +54,14 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QMainWindow(),
ui
.
volLowLabel
->
setPixmap
(
QPixmap
(
":/pixmaps/volume-low.png"
)
);
ui
.
volHighLabel
->
setPixmap
(
QPixmap
(
":/pixmaps/volume-high.png"
)
);
// if( config_GetInt( p_intf, "embedded" ) )
{
videoWidget
=
new
VideoWidget
(
p_intf
);
videoWidget
->
resize
(
1
,
1
);
ui
.
vboxLayout
->
insertWidget
(
0
,
videoWidget
);
}
resize
(
QSize
(
500
,
121
)
);
i_saved_width
=
width
();
i_saved_height
=
height
();
readSettings
(
"MainWindow"
,
QSize
(
500
,
131
)
);
//QVLCMenu::createMenuBar();
...
...
modules/gui/qt4/main_interface.hpp
View file @
a23552a9
...
...
@@ -26,14 +26,13 @@
#include <vlc/intf.h>
#include "ui/main_interface.h"
#include "util/qvlcframe.hpp"
#include <QMainWindow>
class
InputManager
;
class
QCloseEvent
;
class
InputSlider
;
class
VideoWidget
;
class
MainInterface
:
public
Q
MainWindow
class
MainInterface
:
public
Q
VLCMW
{
Q_OBJECT
;
public:
...
...
modules/gui/qt4/util/qvlcframe.hpp
View file @
a23552a9
...
...
@@ -25,6 +25,8 @@
#include <QWidget>
#include <QApplication>
#include <QSettings>
#include <QMainWindow>
#include <QPlastiqueStyle>
#include <vlc/vlc.h>
...
...
@@ -52,7 +54,7 @@ public:
QVLCFrame
(
intf_thread_t
*
_p_intf
)
:
QWidget
(
NULL
),
p_intf
(
_p_intf
)
{
fixStyle
(
this
);
};
};
virtual
~
QVLCFrame
()
{};
void
toggleVisible
()
...
...
@@ -62,5 +64,54 @@ public:
}
protected:
intf_thread_t
*
p_intf
;
void
readSettings
(
QString
name
,
QSize
defSize
)
{
QSettings
settings
(
"VideoLAN"
,
"VLC"
);
settings
.
beginGroup
(
name
);
resize
(
settings
.
value
(
"size"
,
defSize
).
toSize
()
);
move
(
settings
.
value
(
"pos"
,
QPoint
(
0
,
0
)
).
toPoint
()
);
settings
.
endGroup
();
}
void
writeSettings
(
QString
name
)
{
QSettings
settings
(
"VideoLAN"
,
"VLC"
);
settings
.
beginGroup
(
name
);
settings
.
setValue
(
"size"
,
size
()
);
settings
.
setValue
(
"pos"
,
pos
()
);
settings
.
endGroup
();
}
};
class
QVLCMW
:
public
QMainWindow
{
public:
QVLCMW
(
intf_thread_t
*
_p_intf
)
:
QMainWindow
(
NULL
),
p_intf
(
_p_intf
)
{
QVLCFrame
::
fixStyle
(
this
);
}
virtual
~
QVLCMW
()
{};
protected:
intf_thread_t
*
p_intf
;
QSize
mainSize
;
void
readSettings
(
QString
name
,
QSize
defSize
)
{
QSettings
settings
(
"VideoLAN"
,
"VLC"
);
settings
.
beginGroup
(
name
);
mainSize
=
settings
.
value
(
"size"
,
defSize
).
toSize
();
resize
(
mainSize
);
move
(
settings
.
value
(
"pos"
,
QPoint
(
0
,
0
)
).
toPoint
()
);
settings
.
endGroup
();
}
void
writeSettings
(
QString
name
)
{
QSettings
settings
(
"VideoLAN"
,
"VLC"
);
settings
.
beginGroup
(
name
);
settings
.
setValue
(
"size"
,
size
()
);
settings
.
setValue
(
"pos"
,
pos
()
);
settings
.
endGroup
();
}
};
#endif
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