Demo Application for use of buttons and other controls inside HighGUI Module (Patch #2178) (Patch #2810)
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 #2810 from ilya-lavrenov:tapi_copytomask
History
Updated by Harald Schmidt about 12 years ago
Excuse me, it was my mistake to generate this patch,
I thought to be able just to modify pull request field but "duplicate" did what it said...
Updated by Andrey Kamaev almost 12 years ago
- Status changed from Open to Cancelled