Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
ffe7bdf6
Commit
ffe7bdf6
authored
Jul 23, 2010
by
Yannick Verdie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ticket 490:
bool not defined ? -> changed everything in int
parent
60a4e81a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
17 deletions
+23
-17
highgui_c.h
modules/highgui/include/opencv2/highgui/highgui_c.h
+2
-2
window_QT.cpp
modules/highgui/src/window_QT.cpp
+16
-10
window_QT.h
modules/highgui/src/window_QT.h
+5
-5
No files found.
modules/highgui/include/opencv2/highgui/highgui_c.h
View file @
ffe7bdf6
...
...
@@ -96,7 +96,7 @@ CVAPI(void) cvStopLoop();
typedef
void
(
CV_CDECL
*
CvButtonCallback
)(
int
state
,
void
*
userdata
);
enum
{
CV_PUSH_BUTTON
=
0
,
CV_CHECKBOX
=
1
,
CV_RADIOBOX
=
2
};
CVAPI
(
int
)
cvCreateButton
(
const
char
*
button_name
CV_DEFAULT
(
NULL
),
CvButtonCallback
on_change
CV_DEFAULT
(
NULL
),
void
*
userdata
CV_DEFAULT
(
NULL
)
,
int
button_type
CV_DEFAULT
(
CV_PUSH_BUTTON
),
bool
initial_button_state
CV_DEFAULT
(
0
));
CVAPI
(
int
)
cvCreateButton
(
const
char
*
button_name
CV_DEFAULT
(
NULL
),
CvButtonCallback
on_change
CV_DEFAULT
(
NULL
),
void
*
userdata
CV_DEFAULT
(
NULL
)
,
int
button_type
CV_DEFAULT
(
CV_PUSH_BUTTON
),
int
initial_button_state
CV_DEFAULT
(
0
));
//----------------------
...
...
@@ -154,7 +154,7 @@ typedef void (CV_CDECL *CvTrackbarCallback)(int pos);
/* create trackbar and display it on top of given window, set callback */
CVAPI
(
int
)
cvCreateTrackbar
(
const
char
*
trackbar_name
,
const
char
*
window_name
,
int
*
value
,
int
count
,
CvTrackbarCallback
on_change
);
int
*
value
,
int
count
,
CvTrackbarCallback
on_change
CV_DEFAULT
(
NULL
)
);
typedef
void
(
CV_CDECL
*
CvTrackbarCallback2
)(
int
pos
,
void
*
userdata
);
...
...
modules/highgui/src/window_QT.cpp
View file @
ffe7bdf6
...
...
@@ -515,14 +515,17 @@ CV_IMPL int cvCreateTrackbar( const char* name_bar, const char* window_name, int
CV_IMPL
int
cvCreateButton
(
const
char
*
button_name
,
CvButtonCallback
on_change
,
void
*
userdata
,
int
button_type
,
bool
initial_button_state
)
CV_IMPL
int
cvCreateButton
(
const
char
*
button_name
,
CvButtonCallback
on_change
,
void
*
userdata
,
int
button_type
,
int
initial_button_state
)
{
if
(
initial_button_state
<
0
||
initial_button_state
>
1
)
return
0
;
QMetaObject
::
invokeMethod
(
&
guiMainThread
,
"addButton"
,
Qt
::
AutoConnection
,
Q_ARG
(
QString
,
QString
(
button_name
)),
Q_ARG
(
int
,
button_type
),
Q_ARG
(
bool
,
initial_button_state
),
Q_ARG
(
int
,
initial_button_state
),
Q_ARG
(
void
*
,
(
void
*
)
on_change
),
Q_ARG
(
void
*
,
userdata
)
);
...
...
@@ -865,7 +868,7 @@ void GuiReceiver::resizeWindow(QString name, int width, int height)
w
->
resize
(
width
,
height
);
}
void
GuiReceiver
::
addButton
(
QString
button_name
,
int
button_type
,
bool
initial_button_state
,
void
*
on_change
,
void
*
userdata
)
void
GuiReceiver
::
addButton
(
QString
button_name
,
int
button_type
,
int
initial_button_state
,
void
*
on_change
,
void
*
userdata
)
{
if
(
!
global_control_panel
)
...
...
@@ -1058,7 +1061,7 @@ void CvButtonbar::setLabel()
label
->
setText
(
nameNormalized
);
}
void
CvButtonbar
::
addButton
(
QString
name
,
CvButtonCallback
call
,
void
*
userdata
,
int
button_type
,
bool
initial_button_state
)
void
CvButtonbar
::
addButton
(
QString
name
,
CvButtonCallback
call
,
void
*
userdata
,
int
button_type
,
int
initial_button_state
)
{
QString
button_name
=
name
;
...
...
@@ -1107,10 +1110,11 @@ CvPushButton::CvPushButton(CvButtonbar* arg1, QString arg2, CvButtonCallback arg
void
CvPushButton
::
callCallBack
()
{
callback
(
-
1
,
userdata
);
if
(
callback
)
callback
(
-
1
,
userdata
);
}
CvCheckBox
::
CvCheckBox
(
CvButtonbar
*
arg1
,
QString
arg2
,
CvButtonCallback
arg3
,
void
*
arg4
,
bool
initial_button_state
)
CvCheckBox
::
CvCheckBox
(
CvButtonbar
*
arg1
,
QString
arg2
,
CvButtonCallback
arg3
,
void
*
arg4
,
int
initial_button_state
)
{
myparent
=
arg1
;
button_name
=
arg2
;
...
...
@@ -1124,10 +1128,11 @@ CvCheckBox::CvCheckBox(CvButtonbar* arg1, QString arg2, CvButtonCallback arg3, v
void
CvCheckBox
::
callCallBack
()
{
callback
(
this
->
isChecked
(),
userdata
);
if
(
callback
)
callback
(
this
->
isChecked
(),
userdata
);
}
CvRadioButton
::
CvRadioButton
(
CvButtonbar
*
arg1
,
QString
arg2
,
CvButtonCallback
arg3
,
void
*
arg4
,
bool
initial_button_state
)
CvRadioButton
::
CvRadioButton
(
CvButtonbar
*
arg1
,
QString
arg2
,
CvButtonCallback
arg3
,
void
*
arg4
,
int
initial_button_state
)
{
myparent
=
arg1
;
button_name
=
arg2
;
...
...
@@ -1141,7 +1146,8 @@ CvRadioButton::CvRadioButton(CvButtonbar* arg1, QString arg2, CvButtonCallback a
void
CvRadioButton
::
callCallBack
()
{
callback
(
this
->
isChecked
(),
userdata
);
if
(
callback
)
callback
(
this
->
isChecked
(),
userdata
);
}
...
...
@@ -1363,7 +1369,7 @@ void CvWindow::showTools()
CvWinProperties
*
CvWindow
::
createParameterWindow
()
{
QString
name_paraWindow
=
"Global control panel
"
;
QString
name_paraWindow
=
QFileInfo
(
QApplication
::
applicationFilePath
()).
fileName
()
+
" settings
"
;
CvWinProperties
*
result
=
new
CvWinProperties
(
name_paraWindow
,
this
);
return
result
;
...
...
modules/highgui/src/window_QT.h
View file @
ffe7bdf6
...
...
@@ -135,7 +135,7 @@ public slots:
void
loadWindowParameters
(
QString
name
);
void
setOpenGLCallback
(
QString
window_name
,
void
*
callbackOpenGL
,
void
*
userdata
);
void
putText
(
void
*
arg1
,
QString
text
,
QPoint
org
,
void
*
font
);
void
addButton
(
QString
button_name
,
int
button_type
,
bool
initial_button_state
,
void
*
on_change
,
void
*
userdata
);
void
addButton
(
QString
button_name
,
int
button_type
,
int
initial_button_state
,
void
*
on_change
,
void
*
userdata
);
};
...
...
@@ -155,7 +155,7 @@ class CvButtonbar : public CvBar
public
:
CvButtonbar
(
QWidget
*
arg
,
QString
bar_name
);
~
CvButtonbar
();
void
addButton
(
QString
button_name
,
CvButtonCallback
call
,
void
*
userdata
,
int
button_type
,
bool
initial_button_state
);
void
addButton
(
QString
button_name
,
CvButtonCallback
call
,
void
*
userdata
,
int
button_type
,
int
initial_button_state
);
private
:
void
setLabel
();
...
...
@@ -187,7 +187,7 @@ class CvCheckBox : public QCheckBox
{
Q_OBJECT
public
:
CvCheckBox
(
CvButtonbar
*
par
,
QString
button_name
,
CvButtonCallback
call
,
void
*
userdata
,
bool
initial_button_state
);
CvCheckBox
(
CvButtonbar
*
par
,
QString
button_name
,
CvButtonCallback
call
,
void
*
userdata
,
int
initial_button_state
);
private
:
CvButtonbar
*
myparent
;
...
...
@@ -203,7 +203,7 @@ class CvRadioButton : public QRadioButton
{
Q_OBJECT
public
:
CvRadioButton
(
CvButtonbar
*
par
,
QString
button_name
,
CvButtonCallback
call
,
void
*
userdata
,
bool
initial_button_state
);
CvRadioButton
(
CvButtonbar
*
par
,
QString
button_name
,
CvButtonCallback
call
,
void
*
userdata
,
int
initial_button_state
);
private
:
CvButtonbar
*
myparent
;
...
...
@@ -284,7 +284,7 @@ public:
//parameters (will be save/load)
QString
param_name
;
QPointer
<
CvWinProperties
>
parameters_window
;
CvWinProperties
*
parameters_window
;
int
param_flags
;
int
param_gui_mode
;
QVector
<
QAction
*>
vect_QActions
;
...
...
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