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
62f327db
Commit
62f327db
authored
Apr 27, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt, help/update: code simplification
parent
25bf26b9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
38 deletions
+11
-38
modules/gui/qt4/dialogs/help.cpp
modules/gui/qt4/dialogs/help.cpp
+5
-23
modules/gui/qt4/dialogs/help.hpp
modules/gui/qt4/dialogs/help.hpp
+5
-12
modules/gui/qt4/util/qvlcframe.hpp
modules/gui/qt4/util/qvlcframe.hpp
+1
-3
No files found.
modules/gui/qt4/dialogs/help.cpp
View file @
62f327db
...
...
@@ -57,12 +57,14 @@ HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
setMinimumSize
(
350
,
300
);
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
QTextBrowser
*
helpBrowser
=
new
QTextBrowser
(
this
);
helpBrowser
->
setOpenExternalLinks
(
true
);
helpBrowser
->
setHtml
(
qtr
(
I_LONGHELP
)
);
QDialogButtonBox
*
closeButtonBox
=
new
QDialogButtonBox
(
Qt
::
Horizontal
,
this
);
QDialogButtonBox
*
closeButtonBox
=
new
QDialogButtonBox
(
this
);
closeButtonBox
->
addButton
(
new
QPushButton
(
qtr
(
"&Close"
)
,
this
),
QDialogButtonBox
::
RejectRole
);
new
QPushButton
(
qtr
(
"&Close"
)
),
QDialogButtonBox
::
RejectRole
);
closeButtonBox
->
setFocus
();
layout
->
addWidget
(
helpBrowser
);
...
...
@@ -77,11 +79,6 @@ HelpDialog::~HelpDialog()
writeSettings
(
"Help"
);
}
void
HelpDialog
::
close
()
{
toggleVisible
();
}
AboutDialog
::
AboutDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCDialog
(
(
QWidget
*
)
_p_intf
->
p_sys
->
p_mi
,
_p_intf
)
{
...
...
@@ -92,8 +89,8 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
setWindowTitle
(
qtr
(
"About"
)
);
setWindowRole
(
"vlc-about"
);
resize
(
600
,
500
);
setMinimumSize
(
600
,
500
);
resize
(
600
,
500
);
setWindowModality
(
Qt
::
WindowModal
);
CONNECT
(
ui
.
closeButtonBox
,
rejected
(),
this
,
close
()
);
...
...
@@ -133,15 +130,6 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
ui
.
authorsEdit
->
setText
(
qfu
(
psz_authors
)
);
}
AboutDialog
::~
AboutDialog
()
{
}
void
AboutDialog
::
close
()
{
toggleVisible
();
}
#ifdef UPDATE_CHECK
/*****************************************************************************
...
...
@@ -203,11 +191,6 @@ UpdateDialog::~UpdateDialog()
writeSettings
(
"Update"
);
}
void
UpdateDialog
::
close
()
{
toggleVisible
();
}
/* Check for updates */
void
UpdateDialog
::
UpdateOrDownload
()
{
...
...
@@ -283,4 +266,3 @@ void UpdateDialog::updateNotify( bool b_result )
}
#endif
modules/gui/qt4/dialogs/help.hpp
View file @
62f327db
...
...
@@ -25,7 +25,7 @@
#define QVLC_HELP_DIALOG_H_ 1
#ifdef HAVE_CONFIG_H
#include "config.h"
#
include "config.h"
#endif
#include "qt4.hpp"
...
...
@@ -35,12 +35,7 @@
#include "ui/about.h"
#include "ui/update.h"
class
QPushButton
;
class
QTextBrowser
;
class
QLabel
;
class
QEvent
;
class
QPushButton
;
class
QTextEdit
;
class
HelpDialog
:
public
QVLCFrame
,
public
Singleton
<
HelpDialog
>
{
...
...
@@ -50,23 +45,20 @@ private:
virtual
~
HelpDialog
();
public
slots
:
v
oid
close
();
v
irtual
void
close
()
{
toggleVisible
();
}
friend
class
Singleton
<
HelpDialog
>
;
};
class
AboutDialog
:
public
QVLCDialog
,
public
Singleton
<
AboutDialog
>
{
Q_OBJECT
private:
AboutDialog
(
intf_thread_t
*
);
virtual
~
AboutDialog
();
Ui
::
aboutWidget
ui
;
public
slots
:
v
oid
close
();
v
irtual
void
close
()
{
toggleVisible
();
}
friend
class
Singleton
<
AboutDialog
>
;
};
...
...
@@ -92,7 +84,8 @@ private:
bool
b_checked
;
private
slots
:
void
close
();
virtual
void
close
()
{
toggleVisible
();
}
void
UpdateOrDownload
();
friend
class
Singleton
<
UpdateDialog
>
;
...
...
modules/gui/qt4/util/qvlcframe.hpp
View file @
62f327db
...
...
@@ -188,9 +188,7 @@ protected:
class
QVLCMW
:
public
QMainWindow
{
public:
QVLCMW
(
intf_thread_t
*
_p_intf
)
:
QMainWindow
(
NULL
),
p_intf
(
_p_intf
)
{
}
virtual
~
QVLCMW
()
{};
QVLCMW
(
intf_thread_t
*
_p_intf
)
:
QMainWindow
(
NULL
),
p_intf
(
_p_intf
){}
void
toggleVisible
()
{
if
(
isVisible
()
)
hide
();
...
...
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