Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F621614
ReadOnlyLineEdit.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
737 B
Referenced Files
None
Subscribers
None
ReadOnlyLineEdit.cpp
View Options
#include
"ReadOnlyLineEdit.h"
#include
"main.h"
#include
"ApplicationGlobal.h"
#include
<QPainter>
ReadOnlyLineEdit
::
ReadOnlyLineEdit
(
QWidget
*
parent
)
:
QLineEdit
(
parent
)
{
setReadOnly
(
true
);
setFrame
(
false
);
setStyleSheet
(
"* { background: transparent; }"
);
}
void
ReadOnlyLineEdit
::
setText
(
QString
const
&
text
)
{
QLineEdit
::
setText
(
text
);
setSelection
(
0
,
0
);
}
void
ReadOnlyLineEdit
::
paintEvent
(
QPaintEvent
*
event
)
{
{
int
r
=
global
->
panel_bg_color
.
red
();
int
g
=
global
->
panel_bg_color
.
green
();
int
b
=
global
->
panel_bg_color
.
blue
();
r
=
r
*
4
/
5
;
g
=
g
*
4
/
5
;
b
=
b
*
4
/
5
;
QPainter
pr
(
this
);
int
y
=
height
()
-
1
;
pr
.
fillRect
(
0
,
y
,
width
(),
1
,
QColor
(
r
,
g
,
b
));
}
QLineEdit
::
paintEvent
(
event
);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sat, Nov 14, 7:19 PM (19 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
131166
Default Alt Text
ReadOnlyLineEdit.cpp (737 B)
Attached To
Mode
R77 Guitar
Attached
Detach File
Event Timeline