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
9123d53b
Commit
9123d53b
authored
Nov 30, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: use Qt4.7 clickLineEdit, if possible
parent
8a7513fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
modules/gui/qt4/qt4.hpp
modules/gui/qt4/qt4.hpp
+1
-0
modules/gui/qt4/util/searchlineedit.cpp
modules/gui/qt4/util/searchlineedit.cpp
+3
-3
modules/gui/qt4/util/searchlineedit.hpp
modules/gui/qt4/util/searchlineedit.hpp
+16
-2
No files found.
modules/gui/qt4/qt4.hpp
View file @
9123d53b
...
...
@@ -45,6 +45,7 @@
#endif
#define HAS_QT45 ( QT_VERSION >= 0x040500 )
#define HAS_QT47 ( QT_VERSION >= 0x040700 )
enum
{
DialogEventType
=
0
,
...
...
modules/gui/qt4/util/searchlineedit.cpp
View file @
9123d53b
...
...
@@ -40,6 +40,8 @@
#include <vlc_intf_strings.h>
#if QT_VERSION < 0x040700
ClickLineEdit
::
ClickLineEdit
(
const
QString
&
msg
,
QWidget
*
parent
)
:
QLineEdit
(
parent
)
{
mDrawClickMsg
=
true
;
...
...
@@ -99,9 +101,7 @@ void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
}
QLineEdit
::
focusOutEvent
(
ev
);
}
#endif
SearchLineEdit
::
SearchLineEdit
(
QWidget
*
parent
)
:
QLineEdit
(
parent
)
{
...
...
modules/gui/qt4/util/searchlineedit.hpp
View file @
9123d53b
...
...
@@ -29,6 +29,19 @@
#include <QLineEdit>
#include <qt4.hpp>
#if HAS_QT47
class
ClickLineEdit
:
public
QLineEdit
{
Q_OBJECT
public:
ClickLineEdit
(
const
QString
&
msg
,
QWidget
*
parent
)
:
QLineEdit
(
parent
)
{
QLineEdit
::
setPlaceholderText
(
msg
);
}
};
#else
/**
This class provides a QLineEdit which contains a greyed-out hinting
text as long as the user didn't enter any text
...
...
@@ -39,11 +52,11 @@
class
ClickLineEdit
:
public
QLineEdit
{
Q_OBJECT
Q_PROPERTY
(
QString
clickMessage
READ
clickMessage
WRITE
setPlaceholderText
)
Q_PROPERTY
(
QString
clickMessage
READ
placeholderText
WRITE
setPlaceholderText
)
public:
ClickLineEdit
(
const
QString
&
msg
,
QWidget
*
parent
);
void
setPlaceholderText
(
const
QString
&
msg
);
const
QString
&
clickMessage
()
const
{
return
mClickMessage
;
}
const
QString
&
placeholderText
()
const
{
return
mClickMessage
;
}
virtual
void
setText
(
const
QString
&
txt
);
protected:
virtual
void
paintEvent
(
QPaintEvent
*
e
);
...
...
@@ -54,6 +67,7 @@ private:
QString
mClickMessage
;
bool
mDrawClickMsg
;
};
#endif
class
QVLCFramelessButton
;
class
SearchLineEdit
:
public
QLineEdit
...
...
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