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
14e11ab1
Commit
14e11ab1
authored
Aug 01, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve Qt interaction stuff
parent
1990bf6f
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
95 additions
and
260 deletions
+95
-260
include/vlc_interaction.h
include/vlc_interaction.h
+4
-3
include/vlc_symbols.h
include/vlc_symbols.h
+12
-7
modules/gui/macosx/interaction.m
modules/gui/macosx/interaction.m
+3
-3
modules/gui/qt4/Modules.am
modules/gui/qt4/Modules.am
+1
-4
modules/gui/qt4/dialogs/interaction.cpp
modules/gui/qt4/dialogs/interaction.cpp
+28
-33
modules/gui/qt4/dialogs/interaction.hpp
modules/gui/qt4/dialogs/interaction.hpp
+6
-6
modules/gui/qt4/playlist_model.cpp
modules/gui/qt4/playlist_model.cpp
+4
-8
modules/gui/qt4/ui/logindialog.ui
modules/gui/qt4/ui/logindialog.ui
+0
-47
modules/gui/qt4/ui/okcanceldialog.ui
modules/gui/qt4/ui/okcanceldialog.ui
+0
-71
modules/gui/qt4/ui/yesnocanceldialog.ui
modules/gui/qt4/ui/yesnocanceldialog.ui
+0
-78
modules/gui/qt4/util/qvlcframe.hpp
modules/gui/qt4/util/qvlcframe.hpp
+37
-0
No files found.
include/vlc_interaction.h
View file @
14e11ab1
...
...
@@ -54,9 +54,10 @@ struct interaction_dialog_t
int
i_type
;
///< Type identifier
char
*
psz_title
;
///< Title
char
*
psz_description
;
///< Descriptor string
char
*
psz_defaultButton
;
///< default button title (~OK)
char
*
psz_alternateButton
;
///< alternate button title (~NO)
char
*
psz_otherButton
;
///< other button title (optional,~Cancel)
char
*
psz_default_button
;
///< default button title (~OK)
char
*
psz_alternate_button
;
///< alternate button title (~NO)
/// other button title (optional,~Cancel)
char
*
psz_other_button
;
char
*
psz_returned
[
1
];
///< returned responses from the user
...
...
include/vlc_symbols.h
View file @
14e11ab1
...
...
@@ -432,11 +432,11 @@ struct module_symbols_t
int
(
*
__intf_Interact_inner
)
(
vlc_object_t
*
,
interaction_dialog_t
*
);
void
(
*
intf_InteractionManage_inner
)
(
playlist_t
*
);
void
(
*
intf_InteractionDestroy_inner
)
(
interaction_t
*
);
void
(
*
__intf_UserFatal_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
...);
void
(
*
__intf_UserFatal_inner
)
(
vlc_object_t
*
,
vlc_bool_t
,
const
char
*
,
const
char
*
,
...);
int
(
*
__intf_UserLoginPassword_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
char
**
,
char
**
);
int
(
*
__intf_UserYesNo_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
);
int
(
*
__intf_UserProgress_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
float
);
void
(
*
__intf_UserProgressUpdate_inner
)
(
vlc_object_t
*
,
int
,
const
char
*
,
float
);
int
(
*
__intf_UserYesNo_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
int
(
*
__intf_UserProgress_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
float
,
int
);
void
(
*
__intf_UserProgressUpdate_inner
)
(
vlc_object_t
*
,
int
,
const
char
*
,
float
,
int
);
void
(
*
__intf_UserHide_inner
)
(
vlc_object_t
*
,
int
);
void
*
__stats_Create_deprecated
;
int
(
*
__stats_Update_inner
)
(
vlc_object_t
*
,
counter_t
*
,
vlc_value_t
,
vlc_value_t
*
);
...
...
@@ -509,7 +509,7 @@ struct module_symbols_t
void
(
*
playlist_AddWhereverNeeded_inner
)
(
playlist_t
*
,
input_item_t
*
,
playlist_item_t
*
,
playlist_item_t
*
,
vlc_bool_t
,
int
);
int
(
*
playlist_DeleteFromItemId_inner
)
(
playlist_t
*
,
int
);
void
(
*
playlist_NodeDump_inner
)
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
,
int
i_level
);
int
(
*
__intf_UserOkayCancel_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
)
;
void
*
__intf_UserOkayCancel_deprecated
;
int
(
*
__intf_UserStringInput_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
char
**
);
void
(
*
playlist_NodesCreateForSD_inner
)
(
playlist_t
*
,
char
*
,
playlist_item_t
**
,
playlist_item_t
**
);
vlc_bool_t
(
*
input_AddSubtitles_inner
)
(
input_thread_t
*
,
char
*
,
vlc_bool_t
);
...
...
@@ -520,6 +520,8 @@ struct module_symbols_t
void
(
*
__intf_IntfProgressUpdate_inner
)
(
vlc_object_t
*
,
int
,
const
char
*
,
float
);
int
(
*
__intf_IntfProgress_inner
)
(
vlc_object_t
*
,
const
char
*
,
float
);
void
*
streaming_ChainToPsz_deprecated
;
void
(
*
__intf_UserWarn_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
...);
vlc_bool_t
(
*
__intf_UserProgressIsCancelled_inner
)
(
vlc_object_t
*
,
int
);
};
# if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
...
...
@@ -981,7 +983,6 @@ struct module_symbols_t
# define playlist_AddWhereverNeeded (p_symbols)->playlist_AddWhereverNeeded_inner
# define playlist_DeleteFromItemId (p_symbols)->playlist_DeleteFromItemId_inner
# define playlist_NodeDump (p_symbols)->playlist_NodeDump_inner
# define __intf_UserOkayCancel (p_symbols)->__intf_UserOkayCancel_inner
# define __intf_UserStringInput (p_symbols)->__intf_UserStringInput_inner
# define playlist_NodesCreateForSD (p_symbols)->playlist_NodesCreateForSD_inner
# define input_AddSubtitles (p_symbols)->input_AddSubtitles_inner
...
...
@@ -989,6 +990,8 @@ struct module_symbols_t
# define __stats_TimersClean (p_symbols)->__stats_TimersClean_inner
# define __intf_IntfProgressUpdate (p_symbols)->__intf_IntfProgressUpdate_inner
# define __intf_IntfProgress (p_symbols)->__intf_IntfProgress_inner
# define __intf_UserWarn (p_symbols)->__intf_UserWarn_inner
# define __intf_UserProgressIsCancelled (p_symbols)->__intf_UserProgressIsCancelled_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
...
...
@@ -1453,7 +1456,6 @@ struct module_symbols_t
((p_symbols)->playlist_AddWhereverNeeded_inner) = playlist_AddWhereverNeeded; \
((p_symbols)->playlist_DeleteFromItemId_inner) = playlist_DeleteFromItemId; \
((p_symbols)->playlist_NodeDump_inner) = playlist_NodeDump; \
((p_symbols)->__intf_UserOkayCancel_inner) = __intf_UserOkayCancel; \
((p_symbols)->__intf_UserStringInput_inner) = __intf_UserStringInput; \
((p_symbols)->playlist_NodesCreateForSD_inner) = playlist_NodesCreateForSD; \
((p_symbols)->input_AddSubtitles_inner) = input_AddSubtitles; \
...
...
@@ -1461,6 +1463,8 @@ struct module_symbols_t
((p_symbols)->__stats_TimersClean_inner) = __stats_TimersClean; \
((p_symbols)->__intf_IntfProgressUpdate_inner) = __intf_IntfProgressUpdate; \
((p_symbols)->__intf_IntfProgress_inner) = __intf_IntfProgress; \
((p_symbols)->__intf_UserWarn_inner) = __intf_UserWarn; \
((p_symbols)->__intf_UserProgressIsCancelled_inner) = __intf_UserProgressIsCancelled; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
(p_symbols)->__playlist_ItemCopy_deprecated = NULL; \
(p_symbols)->playlist_ItemAddParent_deprecated = NULL; \
...
...
@@ -1492,6 +1496,7 @@ struct module_symbols_t
(p_symbols)->stats_HandlerDestroy_deprecated = NULL; \
(p_symbols)->__stats_TimerDumpAll_deprecated = NULL; \
(p_symbols)->playlist_ItemNewFromInput_deprecated = NULL; \
(p_symbols)->__intf_UserOkayCancel_deprecated = NULL; \
(p_symbols)->stats_TimerClean_deprecated = NULL; \
(p_symbols)->stats_TimersClean_deprecated = NULL; \
(p_symbols)->streaming_ChainToPsz_deprecated = NULL; \
...
...
modules/gui/macosx/interaction.m
View file @
14e11ab1
...
...
@@ -138,9 +138,9 @@
NSString
*
o_title
=
[
NSString
stringWithUTF8String
:
p_dialog
->
psz_title
?
p_dialog
->
psz_title
:
_
(
"Error"
)];
NSString
*
o_description
=
[
NSString
stringWithUTF8String
:
p_dialog
->
psz_description
?
p_dialog
->
psz_description
:
""
];
NSString
*
o_defaultButton
=
p_dialog
->
psz_default
Button
?
[
NSString
stringWithUTF8String
:
p_dialog
->
psz_defaultB
utton
]
:
nil
;
NSString
*
o_alternateButton
=
p_dialog
->
psz_alternate
Button
?
[
NSString
stringWithUTF8String
:
p_dialog
->
psz_alternateB
utton
]
:
nil
;
NSString
*
o_otherButton
=
p_dialog
->
psz_other
Button
?
[
NSString
stringWithUTF8String
:
p_dialog
->
psz_otherB
utton
]
:
nil
;
NSString
*
o_defaultButton
=
p_dialog
->
psz_default
_button
?
[
NSString
stringWithUTF8String
:
p_dialog
->
psz_default_b
utton
]
:
nil
;
NSString
*
o_alternateButton
=
p_dialog
->
psz_alternate
_button
?
[
NSString
stringWithUTF8String
:
p_dialog
->
psz_alternate_b
utton
]
:
nil
;
NSString
*
o_otherButton
=
p_dialog
->
psz_other
_button
?
[
NSString
stringWithUTF8String
:
p_dialog
->
psz_other_b
utton
]
:
nil
;
vout_thread_t
*
p_vout
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_VOUT
,
FIND_ANYWHERE
);
if
(
p_vout
!=
NULL
)
...
...
modules/gui/qt4/Modules.am
View file @
14e11ab1
...
...
@@ -12,8 +12,7 @@
AUTOMAKE_OPTIONS
=
subdir-objects
TOUI
=
ui/input_stats ui/main_interface ui/file_open
\
ui/okcanceldialog ui/yesnocanceldialog ui/logindialog ui/inputdialog
\
ui/progressdialog
ui/logindialog ui/inputdialog ui/progressdialog
UIH
=
$(TOUI:%=%.h)
TOMOC
=
main_interface
\
...
...
@@ -120,8 +119,6 @@ EXTRA_DIST += \
ui/input_stats.ui
\
ui/file_open.ui
\
ui/main_interface.ui
\
ui/okcanceldialog.ui
\
ui/yesnocanceldialog.ui
\
ui/logindialog.ui
\
ui/inputdialog.ui
\
ui/progressdialog.ui
\
...
...
modules/gui/qt4/dialogs/interaction.cpp
View file @
14e11ab1
...
...
@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/
#include "dialogs/interaction.hpp"
#include "util/qvlcframe.hpp"
#include <vlc/intf.h>
#include "qt4.hpp"
...
...
@@ -28,43 +29,31 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf,
interaction_dialog_t
*
_p_dialog
)
:
QWidget
(
0
),
p_intf
(
_p_intf
),
p_dialog
(
_p_dialog
)
{
uiOkCancel
=
NULL
;
uiYesNoCancel
=
NULL
;
QVBoxLayout
*
layout
=
new
QVBoxLayout
;
uiLogin
=
NULL
;
uiProgress
=
NULL
;
uiInput
=
NULL
;
if
(
p_dialog
->
i_flags
&
DIALOG_YES_NO_CANCEL
)
if
(
p_dialog
->
i_flags
&
DIALOG_BLOCKING_ERROR
)
{
uiOkCancel
=
new
Ui
::
OKCancelDialog
;
uiOkCancel
->
setupUi
(
this
);
uiOkCancel
->
description
->
setText
(
qfu
(
p_dialog
->
psz_description
)
);
connect
(
uiOkCancel
->
okButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
OK
()
)
);
connect
(
uiOkCancel
->
cancelButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
cancel
()
)
);
}
else
if
(
p_dialog
->
i_flags
&
DIALOG_NONBLOCKING_ERROR
)
{
// Create instance of the errors dialog
}
else
if
(
p_dialog
->
i_flags
&
DIALOG_YES_NO_CANCEL
)
{
uiYesNoCancel
=
new
Ui
::
YesNoCancelDialog
;
uiYesNoCancel
->
setupUi
(
this
);
uiYesNoCancel
->
description
->
setText
(
qfu
(
p_dialog
->
psz_description
)
);
connect
(
uiYesNoCancel
->
yesButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
yes
()
)
);
connect
(
uiYesNoCancel
->
noButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
no
()
)
);
connect
(
uiYesNoCancel
->
cancelButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
cancel
()
)
);
description
=
new
QLabel
(
0
);
description
->
setText
(
qfu
(
p_dialog
->
psz_description
)
);
layout
->
addWidget
(
description
);
}
else
if
(
p_dialog
->
i_flags
&
DIALOG_LOGIN_PW_OK_CANCEL
)
{
uiLogin
=
new
Ui
::
LoginDialog
;
uiLogin
->
setupUi
(
this
);
uiLogin
->
description
->
setText
(
qfu
(
p_dialog
->
psz_description
)
);
connect
(
uiLogin
->
okButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
OK
()
)
);
connect
(
uiLogin
->
cancelButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
cancel
()
)
);
}
else
if
(
p_dialog
->
i_flags
&
DIALOG_USER_PROGRESS
)
{
...
...
@@ -75,6 +64,19 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf,
}
else
msg_Err
(
p_intf
,
"unknown dialog type"
);
QVLCFrame
::
doButtons
(
this
,
layout
,
defaultButton
,
p_dialog
->
psz_default_button
,
altButton
,
p_dialog
->
psz_alternate_button
,
otherButton
,
p_dialog
->
psz_other_button
);
if
(
p_dialog
->
psz_default_button
)
connect
(
defaultButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
defaultB
()
)
);
if
(
p_dialog
->
psz_alternate_button
)
connect
(
altButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
altB
()
)
);
if
(
p_dialog
->
psz_other_button
)
connect
(
otherButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
otherB
()
)
);
setLayout
(
layout
);
setWindowTitle
(
qfu
(
p_dialog
->
psz_title
)
);
}
...
...
@@ -84,27 +86,20 @@ void InteractionDialog::Update()
InteractionDialog
::~
InteractionDialog
()
{
if
(
uiYesNoCancel
)
delete
uiYesNoCancel
;
if
(
uiOkCancel
)
delete
uiOkCancel
;
if
(
uiInput
)
delete
uiInput
;
if
(
uiProgress
)
delete
uiProgress
;
if
(
uiLogin
)
delete
uiLogin
;
}
void
InteractionDialog
::
yes
()
void
InteractionDialog
::
defaultB
()
{
Finish
(
DIALOG_OK_YES
);
}
void
InteractionDialog
::
no
()
void
InteractionDialog
::
altB
()
{
Finish
(
DIALOG_NO
);
}
void
InteractionDialog
::
OK
()
{
Finish
(
DIALOG_OK_YES
);
}
void
InteractionDialog
::
cancel
()
void
InteractionDialog
::
otherB
()
{
Finish
(
DIALOG_CANCELLED
);
}
...
...
modules/gui/qt4/dialogs/interaction.hpp
View file @
14e11ab1
...
...
@@ -49,18 +49,18 @@ public:
private:
intf_thread_t
*
p_intf
;
interaction_dialog_t
*
p_dialog
;
Ui
::
OKCancelDialog
*
uiOkCancel
;
Ui
::
YesNoCancelDialog
*
uiYesNoCancel
;
Ui
::
LoginDialog
*
uiLogin
;
Ui
::
InputDialog
*
uiInput
;
Ui
::
ProgressDialog
*
uiProgress
;
QPushButton
*
defaultButton
,
*
otherButton
,
*
altButton
;
QLabel
*
description
;
void
Finish
(
int
);
private
slots
:
void
OK
();
void
yes
();
void
no
();
void
cancel
();
void
defaultB
();
void
altB
();
void
otherB
();
};
#endif
modules/gui/qt4/playlist_model.cpp
View file @
14e11ab1
...
...
@@ -315,8 +315,8 @@ PLItem *PLModel::FindByInput( PLItem *root, int i_id )
return
FindInner
(
root
,
i_id
,
true
);
}
#define CACHE( i, p )
i_cached_id = i; p_cached_item = p;
#define ICACHE( i, p )
i_cached_input_id = i; p_cached_item_bi = p;
#define CACHE( i, p )
{ i_cached_id = i; p_cached_item = p; }
#define ICACHE( i, p )
{ i_cached_input_id = i; p_cached_item_bi = p; }
PLItem
*
PLModel
::
FindInner
(
PLItem
*
root
,
int
i_id
,
bool
b_input
)
{
...
...
@@ -356,13 +356,9 @@ PLItem * PLModel::FindInner( PLItem *root, int i_id, bool b_input )
if
(
childFound
)
{
if
(
b_input
)
{
ICACHE
(
i_id
,
childFound
);
}
ICACHE
(
i_id
,
childFound
)
else
{
CACHE
(
i_id
,
childFound
);
}
CACHE
(
i_id
,
childFound
)
return
childFound
;
}
}
...
...
modules/gui/qt4/ui/logindialog.ui
View file @
14e11ab1
...
...
@@ -12,14 +12,6 @@
<height>129</height>
</rect>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
...
...
@@ -55,45 +47,6 @@
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="okButton" >
<property name="text" >
<string>_("OK")</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton" >
<property name="text" >
<string>_("Cancel")</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
...
...
modules/gui/qt4/ui/okcanceldialog.ui
deleted
100644 → 0
View file @
1990bf6f
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>OKCancelDialog</class>
<widget class="QWidget" name="OKCancelDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>122</height>
</rect>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="description" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="okButton" >
<property name="text" >
<string>_("OK")</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton" >
<property name="text" >
<string>_("Cancel")</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>
modules/gui/qt4/ui/yesnocanceldialog.ui
deleted
100644 → 0
View file @
1990bf6f
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>YesNoCancelDialog</class>
<widget class="QWidget" name="YesNoCancelDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>122</height>
</rect>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="description" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="yesButton" >
<property name="text" >
<string>_("Yes")</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="noButton" >
<property name="text" >
<string>_("No")</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton" >
<property name="text" >
<string>_("Cancel")</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>
modules/gui/qt4/util/qvlcframe.hpp
View file @
14e11ab1
...
...
@@ -24,10 +24,14 @@
#define _QVLCFRAME_H_
#include <QWidget>
#include <QSpacerItem>
#include <QHBoxLayout>
#include <QApplication>
#include <QSettings>
#include <QMainWindow>
#include <QPlastiqueStyle>
#include <QPushButton>
#include "qt4.hpp"
#include <vlc/vlc.h>
class
QVLCFrame
:
public
QWidget
...
...
@@ -52,6 +56,39 @@ public:
}
#endif
}
static
void
doButtons
(
QWidget
*
w
,
QBoxLayout
*
l
,
QPushButton
*
defaul
,
char
*
psz_default
,
QPushButton
*
alt
,
char
*
psz_alt
,
QPushButton
*
other
,
char
*
psz_other
)
{
#ifdef QT42
#else
QHBoxLayout
*
buttons_layout
=
new
QHBoxLayout
;
QSpacerItem
*
spacerItem
=
new
QSpacerItem
(
40
,
20
,
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
buttons_layout
->
addItem
(
spacerItem
);
if
(
psz_default
)
{
defaul
=
new
QPushButton
;
buttons_layout
->
addWidget
(
defaul
);
defaul
->
setText
(
qfu
(
psz_default
)
);
}
if
(
psz_alt
)
{
alt
=
new
QPushButton
;
buttons_layout
->
addWidget
(
alt
);
alt
->
setText
(
qfu
(
psz_alt
)
);
}
if
(
psz_other
)
{
other
=
new
QPushButton
;
buttons_layout
->
addWidget
(
other
);
other
->
setText
(
qfu
(
psz_other
)
);
}
l
->
addLayout
(
buttons_layout
);
#endif
};
QVLCFrame
(
intf_thread_t
*
_p_intf
)
:
QWidget
(
NULL
),
p_intf
(
_p_intf
)
{
...
...
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