Demo Application for use of buttons and other controls inside HighGUI Module (Patch #2178) (Patch #2303)
Description
It demonstrates, how several controls can be configured in a *.cfg file.
The (modified) HighGUI Library reads in a *.cfg file and displays
all configured controls inside a button bar.
The former QAction icons for panning and zoom now consist out of
two grops now (4 elems each). Aditional e.g QLineEdit can be part of a button bar now.
buttonsqt.cpp can be compiled with Linux/Windows inside /samples/cpp.
But you see a buttonbar only in the case of an activated compile switch WITH_QT.
If WITH_QT was not set you can use 'p' or 'n' to change displayed image.
Random select for CV_WINDOW_NORMAL or CV_WINDOW_AUTOSIZE on startup of buttonsqt.
Names of buttons can be modified by a translation table.
An example for output + configuration is given by the attached file buttonqtdemo.jpg
Important:
buttonsqt.cpp is based on a new HighGUI – Library (Patch #2178)
It works with a button bar only in Qt Mode in the moment.
Used new functions from HighGUI:
cv::adjustWindowPos( const string& winname, int xp, int xwp, int yp, int yhp );
cv::getButtonBarContent(const string& winname, int idx, char * txt );
cv::setButtonBarContent(const string& winname, int etype, int idx, char * );
cv::getCommandVec( const string& winname, vector<string> & stringVec, char* cmd = NULL );
cv::dispInfoBox( const string& winname, char* caption, const string& text );
attached:
buttonsqt.cpp
buttonsqt.cfg
kmeans.cfg (will display a modified buttonbar comming from HighGUI )
buttonqtdemo.jpg ( one example for usage)
needed images (in executable directory):
baboon.jpg
board.jpg
building.jpg
fruits.jpg
lena.jpg
(all well known I think)
additional needed for runtime environment:
installed Qt / QtCore4.dll, QtGui4.dll …..
@Andrew, hope it helps to describe the interaction with the highgui Lib
hope no bugs inside....
Harald
Associated revisions
Merge pull request #2303 from jet47:gpu-canny-fix
History
Updated by Andrey Kamaev over 12 years ago
- Assignee deleted (
Andrey Kamaev)
Updated by Kirill Kornyakov about 12 years ago
May be related to https://github.com/Itseez/opencv/pull/333
- Affected version set to branch 'master' (2.4.9)
- Assignee set to Harald Schmidt
Updated by Harald Schmidt about 12 years ago
Yes it is substituted by https://github.com/Itseez/opencv/pull/333
Updated by Maksim Shabunin over 9 years ago
- HW Platform set to Any
- Operating System set to Any
- Affected version changed from branch 'master' (2.4.9) to branch 'master' (3.0-dev)
- Status changed from Open to Cancelled