Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Esteban Blanc
proview
Commits
bba89bb4
Commit
bba89bb4
authored
Dec 04, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Simplified glow_curvewidget.
parent
d92a5bb2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
42 deletions
+4
-42
xtt/lib/glow/qt/glow_curvewidget_qt.cpp
xtt/lib/glow/qt/glow_curvewidget_qt.cpp
+4
-33
xtt/lib/glow/qt/glow_curvewidget_qt.h
xtt/lib/glow/qt/glow_curvewidget_qt.h
+0
-9
No files found.
xtt/lib/glow/qt/glow_curvewidget_qt.cpp
View file @
bba89bb4
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
static
void
scroll_callback
(
glow_sScroll
*
data
)
static
void
scroll_callback
(
glow_sScroll
*
data
)
{
{
widget_sScroll
*
scroll_data
=
(
widget_sScroll
*
)
data
->
scroll_data
;
widget_sScroll
*
scroll_data
=
(
widget_sScroll
*
)
data
->
scroll_data
;
CurveWidgetQt
*
curve
=
((
CurveWidgetQt
*
)
scroll_data
->
parent
);
QtScrollWidgetGlow
*
curve
=
((
QtScrollWidgetGlow
*
)
scroll_data
->
parent
);
initOneShotTimer
(
curve
->
scroll_timerid
,
SLOT
(
scroll_callback_cb
()),
200
);
initOneShotTimer
(
curve
->
scroll_timerid
,
SLOT
(
scroll_callback_cb
()),
200
);
...
@@ -51,7 +51,7 @@ static void scroll_callback(glow_sScroll* data)
...
@@ -51,7 +51,7 @@ static void scroll_callback(glow_sScroll* data)
static
int
curve_init_proc
(
QWidget
*
w
,
GlowCtx
*
fctx
,
void
*
client_data
)
static
int
curve_init_proc
(
QWidget
*
w
,
GlowCtx
*
fctx
,
void
*
client_data
)
{
{
CurveWidgetQt
*
curve
=
((
CurveWidgetQt
*
)
w
);
QtScrollWidgetGlow
*
curve
=
((
QtScrollWidgetGlow
*
)
w
);
CurveCtx
*
ctx
=
(
CurveCtx
*
)
curve
->
parent_ctx
;
CurveCtx
*
ctx
=
(
CurveCtx
*
)
curve
->
parent_ctx
;
if
(
curve
->
scroll_h
)
{
if
(
curve
->
scroll_h
)
{
...
@@ -67,46 +67,17 @@ static int curve_init_proc(QWidget* w, GlowCtx* fctx, void* client_data)
...
@@ -67,46 +67,17 @@ static int curve_init_proc(QWidget* w, GlowCtx* fctx, void* client_data)
return
(
curve
->
init_proc
)(
ctx
,
client_data
);
return
(
curve
->
init_proc
)(
ctx
,
client_data
);
}
}
void
CurveWidgetQt
::
realize
()
{
if
(
is_navigator
)
{
if
(
!
parent_ctx
)
{
CurveWidgetQt
*
main_curve
=
(
CurveWidgetQt
*
)
main_widget
;
if
(
!
main_curve
->
is_realized
)
{
main_curve
->
realize_navigator
=
1
;
main_curve
->
navigator_widget
=
this
;
}
else
{
parent_ctx
=
main_curve
->
parent_ctx
;
draw_ctx
=
main_curve
->
draw_ctx
;
((
GlowDrawQt
*
)
draw_ctx
)
->
init_nav
(
this
);
}
}
}
else
{
if
(
!
parent_ctx
)
{
draw_ctx
=
new
GlowDrawQt
(
this
,
&
parent_ctx
,
curve_init_proc
,
client_data
,
glow_eCtxType_Curve
);
}
if
(
realize_navigator
)
{
CurveWidgetQt
*
nav_curve
=
(
CurveWidgetQt
*
)
navigator_widget
;
nav_curve
->
parent_ctx
=
parent_ctx
;
nav_curve
->
draw_ctx
=
draw_ctx
;
((
GlowDrawQt
*
)
nav_curve
->
draw_ctx
)
->
init_nav
(
nav_curve
);
}
}
}
QWidget
*
curvewidgetqt_new
(
QWidget
*
curvewidgetqt_new
(
int
(
*
init_proc
)(
GlowCtx
*
ctx
,
void
*
client_data
),
void
*
client_data
)
int
(
*
init_proc
)(
GlowCtx
*
ctx
,
void
*
client_data
),
void
*
client_data
)
{
{
CurveWidgetQt
*
w
=
new
CurveWidgetQt
();
QtScrollWidgetGlow
*
w
=
new
QtScrollWidgetGlow
();
w
->
init
(
glow_eCtxType_Curve
,
init_proc
,
client_data
,
curve_init_proc
);
w
->
init
(
glow_eCtxType_Curve
,
init_proc
,
client_data
,
curve_init_proc
);
return
(
QWidget
*
)
w
;
return
(
QWidget
*
)
w
;
}
}
QWidget
*
curvenavwidgetqt_new
(
QWidget
*
main_curve
)
QWidget
*
curvenavwidgetqt_new
(
QWidget
*
main_curve
)
{
{
CurveWidgetQt
*
w
=
new
CurveWidgetQt
();
QtScrollWidgetGlow
*
w
=
new
QtScrollWidgetGlow
();
w
->
init
(
glow_eCtxType_Curve
,
main_curve
);
w
->
init
(
glow_eCtxType_Curve
,
main_curve
);
return
(
QWidget
*
)
w
;
return
(
QWidget
*
)
w
;
}
}
\ No newline at end of file
xtt/lib/glow/qt/glow_curvewidget_qt.h
View file @
bba89bb4
...
@@ -38,15 +38,6 @@
...
@@ -38,15 +38,6 @@
class
GlowDrawQt
;
class
GlowDrawQt
;
class
CurveWidgetQt
:
public
QtScrollWidgetGlow
{
public:
int
realize_navigator
;
QWidget
*
navigator_widget
;
protected:
void
realize
();
};
QWidget
*
curvewidgetqt_new
(
QWidget
*
curvewidgetqt_new
(
int
(
*
init_proc
)(
GlowCtx
*
ctx
,
void
*
client_data
),
void
*
client_data
);
int
(
*
init_proc
)(
GlowCtx
*
ctx
,
void
*
client_data
),
void
*
client_data
);
...
...
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