-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for QGoManualSegmentationDockWidget
git-svn-id: svn+ssh://orchestra.med.harvard.edu/svn/megason/Code/GoFigure2@1619 ef826fda-c0ae-4237-af8e-f8dcbcf7929c
- Loading branch information
Arnaud Gelas
committed
Oct 21, 2009
1 parent
30ba52a
commit 64f7e04
Showing
4 changed files
with
132 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
branches/GoFigure2Beta/Examples/GUI/lib/qgomanualsegmentationdockwidget.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include <QApplication> | ||
#include <QTimer> | ||
|
||
#include "QGoManualSegmentationDockWidget.h" | ||
|
||
int main( int argc, char** argv ) | ||
{ | ||
if( argc != 2 ) | ||
{ | ||
std::cerr <<"qgomanualsegmentationdockwidget requires 1 argument:" <<std::endl; | ||
std::cerr <<"1-test (boolean)" <<std::endl; | ||
return EXIT_FAILURE; | ||
} | ||
|
||
QApplication app( argc, argv ); | ||
QCoreApplication::setOrganizationName("MegasonLab"); | ||
QCoreApplication::setOrganizationDomain( "http://gofigure2.sourceforge.net" ); | ||
|
||
QGoManualSegmentationDockWidget* dock = new QGoManualSegmentationDockWidget; | ||
dock->show(); | ||
|
||
QTimer* timer = new QTimer; | ||
timer->setSingleShot( true ); | ||
QObject::connect( timer, SIGNAL( timeout() ), dock, SLOT( close() ) ); | ||
|
||
if( atoi( argv[1] ) == 1 ) | ||
{ | ||
timer->start( 100 ); | ||
} | ||
|
||
app.processEvents(); | ||
int output = app.exec(); | ||
app.closeAllWindows(); | ||
|
||
delete dock; | ||
|
||
return output; | ||
} |