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
766acd38
Commit
766acd38
authored
Apr 05, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Make Open dialog KDE/GNOME/WIN32 compliant for buttons...
parent
f5a1e36b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
56 deletions
+51
-56
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.cpp
+41
-16
modules/gui/qt4/dialogs/open.hpp
modules/gui/qt4/dialogs/open.hpp
+5
-1
modules/gui/qt4/ui/open.ui
modules/gui/qt4/ui/open.ui
+5
-39
No files found.
modules/gui/qt4/dialogs/open.cpp
View file @
766acd38
...
@@ -47,6 +47,7 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -47,6 +47,7 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
setWindowTitle
(
qtr
(
"Open"
)
);
setWindowTitle
(
qtr
(
"Open"
)
);
resize
(
500
,
300
);
resize
(
500
,
300
);
/* Tab definition and creation */
fileOpenPanel
=
new
FileOpenPanel
(
ui
.
Tab
,
p_intf
);
fileOpenPanel
=
new
FileOpenPanel
(
ui
.
Tab
,
p_intf
);
diskOpenPanel
=
new
DiskOpenPanel
(
ui
.
Tab
,
p_intf
);
diskOpenPanel
=
new
DiskOpenPanel
(
ui
.
Tab
,
p_intf
);
netOpenPanel
=
new
NetOpenPanel
(
ui
.
Tab
,
p_intf
);
netOpenPanel
=
new
NetOpenPanel
(
ui
.
Tab
,
p_intf
);
...
@@ -57,8 +58,38 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -57,8 +58,38 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
ui
.
Tab
->
addTab
(
netOpenPanel
,
qtr
(
"&Network"
)
);
ui
.
Tab
->
addTab
(
netOpenPanel
,
qtr
(
"&Network"
)
);
ui
.
Tab
->
addTab
(
captureOpenPanel
,
qtr
(
"Capture &Device"
)
);
ui
.
Tab
->
addTab
(
captureOpenPanel
,
qtr
(
"Capture &Device"
)
);
/* Hide the advancedPanel */
ui
.
advancedFrame
->
hide
();
ui
.
advancedFrame
->
hide
();
/* Buttons Creation */
QSizePolicy
buttonSizePolicy
(
static_cast
<
QSizePolicy
::
Policy
>
(
7
),
static_cast
<
QSizePolicy
::
Policy
>
(
1
));
buttonSizePolicy
.
setHorizontalStretch
(
0
);
buttonSizePolicy
.
setVerticalStretch
(
0
);
playButton
=
new
QToolButton
();
playButton
->
setText
(
qtr
(
"&Play"
)
);
playButton
->
setSizePolicy
(
buttonSizePolicy
);
playButton
->
setMinimumSize
(
QSize
(
90
,
0
));
playButton
->
setPopupMode
(
QToolButton
::
MenuButtonPopup
);
playButton
->
setToolButtonStyle
(
Qt
::
ToolButtonTextOnly
);
cancelButton
=
new
QToolButton
();
cancelButton
->
setText
(
qtr
(
"&Cancel"
)
);
cancelButton
->
setSizePolicy
(
buttonSizePolicy
);
QMenu
*
openButtonMenu
=
new
QMenu
(
"Open"
);
QMenu
*
openButtonMenu
=
new
QMenu
(
"Open"
);
openButtonMenu
->
addAction
(
qtr
(
"&Enqueue"
),
this
,
SLOT
(
enqueue
()
),
QKeySequence
(
"Alt+E"
)
);
openButtonMenu
->
addAction
(
qtr
(
"&Play"
),
this
,
SLOT
(
play
()
),
QKeySequence
(
"Alt+P"
)
);
openButtonMenu
->
addAction
(
qtr
(
"&Stream"
),
this
,
SLOT
(
stream
()
)
,
QKeySequence
(
"Alt+S"
)
);
playButton
->
setMenu
(
openButtonMenu
);
ui
.
buttonsBox
->
addButton
(
playButton
,
QDialogButtonBox
::
AcceptRole
);
ui
.
buttonsBox
->
addButton
(
cancelButton
,
QDialogButtonBox
::
RejectRole
);
/* Force MRL update on tab change */
/* Force MRL update on tab change */
CONNECT
(
ui
.
Tab
,
currentChanged
(
int
),
this
,
signalCurrent
());
CONNECT
(
ui
.
Tab
,
currentChanged
(
int
),
this
,
signalCurrent
());
...
@@ -79,20 +110,12 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -79,20 +110,12 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
CONNECT
(
ui
.
slaveText
,
textChanged
(
QString
),
this
,
updateMRL
());
CONNECT
(
ui
.
slaveText
,
textChanged
(
QString
),
this
,
updateMRL
());
CONNECT
(
ui
.
cacheSpinBox
,
valueChanged
(
int
),
this
,
updateMRL
());
CONNECT
(
ui
.
cacheSpinBox
,
valueChanged
(
int
),
this
,
updateMRL
());
openButtonMenu
->
addAction
(
qtr
(
"&Enqueue"
),
this
,
SLOT
(
enqueue
()
),
/* Buttons action */
QKeySequence
(
"Alt+E"
)
);
BUTTONACT
(
playButton
,
play
());
openButtonMenu
->
addAction
(
qtr
(
"&Play"
),
this
,
SLOT
(
play
()
),
BUTTONACT
(
cancelButton
,
cancel
());
QKeySequence
(
"Alt+P"
)
);
openButtonMenu
->
addAction
(
qtr
(
"&Stream"
),
this
,
SLOT
(
stream
()
)
,
QKeySequence
(
"Alt+S"
)
);
ui
.
playButton
->
setMenu
(
openButtonMenu
);
BUTTONACT
(
ui
.
playButton
,
play
());
if
(
b_stream_after
)
setAfter
();
if
(
b_stream_after
)
setAfter
();
BUTTONACT
(
ui
.
cancelButton
,
cancel
());
BUTTONACT
(
ui
.
advancedCheckBox
,
toggleAdvancedPanel
()
);
BUTTONACT
(
ui
.
advancedCheckBox
,
toggleAdvancedPanel
()
);
/* Initialize caching */
/* Initialize caching */
...
@@ -110,13 +133,13 @@ void OpenDialog::setAfter()
...
@@ -110,13 +133,13 @@ void OpenDialog::setAfter()
{
{
if
(
!
b_stream_after
)
if
(
!
b_stream_after
)
{
{
ui
.
playButton
->
setText
(
qtr
(
"&Play"
)
);
playButton
->
setText
(
qtr
(
"&Play"
)
);
BUTTONACT
(
ui
.
playButton
,
play
()
);
BUTTONACT
(
playButton
,
play
()
);
}
}
else
else
{
{
ui
.
playButton
->
setText
(
qtr
(
"&Stream"
)
);
playButton
->
setText
(
qtr
(
"&Stream"
)
);
BUTTONACT
(
ui
.
playButton
,
stream
()
);
BUTTONACT
(
playButton
,
stream
()
);
}
}
}
}
...
@@ -132,7 +155,9 @@ void OpenDialog::signalCurrent() {
...
@@ -132,7 +155,9 @@ void OpenDialog::signalCurrent() {
}
}
}
}
/* Actions */
/***********
* Actions *
***********/
/* If Cancel is pressed or escaped */
/* If Cancel is pressed or escaped */
void
OpenDialog
::
cancel
()
void
OpenDialog
::
cancel
()
...
...
modules/gui/qt4/dialogs/open.hpp
View file @
766acd38
...
@@ -34,6 +34,8 @@
...
@@ -34,6 +34,8 @@
#include <QBoxLayout>
#include <QBoxLayout>
#include <QString>
#include <QString>
class
QToolButton
;
class
OpenDialog
:
public
QVLCDialog
class
OpenDialog
:
public
QVLCDialog
{
{
Q_OBJECT
;
Q_OBJECT
;
...
@@ -78,7 +80,9 @@ private:
...
@@ -78,7 +80,9 @@ private:
int
advHeight
,
mainHeight
;
int
advHeight
,
mainHeight
;
bool
b_stream_after
;
bool
b_stream_after
;
QStringList
SeparateEntries
(
QString
);
QStringList
SeparateEntries
(
QString
);
QToolButton
*
cancelButton
;
QToolButton
*
playButton
;
void
playOrEnqueue
(
bool
);
void
playOrEnqueue
(
bool
);
private
slots
:
private
slots
:
...
...
modules/gui/qt4/ui/open.ui
View file @
766acd38
...
@@ -186,44 +186,12 @@
...
@@ -186,44 +186,12 @@
</spacer>
</spacer>
</item>
</item>
<item>
<item>
<widget class="QToolButton" name="cancelButton" >
<widget class="QDialogButtonBox" name="buttonsBox" >
<property name="sizePolicy" >
<property name="orientation" >
<sizepolicy>
<enum>Qt::Horizontal</enum>
<hsizetype>7</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>&Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="playButton" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text" >
<string>&Play</string>
</property>
<property name="popupMode" >
<enum>QToolButton::MenuButtonPopup</enum>
</property>
</property>
<property name="
toolButtonStyle
" >
<property name="
standardButtons
" >
<
enum>Qt::ToolButtonTextOnly</enum
>
<
set>QDialogButtonBox::NoButton</set
>
</property>
</property>
</widget>
</widget>
</item>
</item>
...
@@ -235,8 +203,6 @@
...
@@ -235,8 +203,6 @@
<tabstop>cacheSpinBox</tabstop>
<tabstop>cacheSpinBox</tabstop>
<tabstop>advancedLineInput</tabstop>
<tabstop>advancedLineInput</tabstop>
<tabstop>Tab</tabstop>
<tabstop>Tab</tabstop>
<tabstop>playButton</tabstop>
<tabstop>cancelButton</tabstop>
</tabstops>
</tabstops>
<resources/>
<resources/>
<connections>
<connections>
...
...
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