6 /** Converts the files in batch mode, returns the exit code, implemented in batch.cpp */
7 int batchRun(const vector
<const char*> &fileNames
);
10 struct TestOpt
: public unary_function
<const char*,bool> {
11 bool operator()(const char *str
) const
15 int main(int argc
,char **argv
) {
17 ModuleFactory::init();
19 vector
<const char*> fileNames
;
20 remove_copy_if( argv
+1, argv
+argc
, back_inserter(fileNames
), TestOpt() );
22 if ( fileNames
.empty() ) { // no filenames passed -> GUI mode
23 QApplication
app(argc
,argv
);
25 ImageViewer
viewer(app
);
29 } else { // batch mode
30 QCoreApplication
app(argc
,argv
);
31 result
= batchRun(fileNames
);
34 ModuleFactory::destroy();