Marlin  01.17.01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
main.cpp
Go to the documentation of this file.
1 #include <QApplication>
2 
3 #include "marlin/Parser.h"
5 
6 #include "mainwindow.h"
7 #include <algorithm>
8 
9 int main(int argc, char *argv[])
10 {
11  std::cout << "\nLoading GUI...\n";
12 
13 //#ifndef MARLIN_NO_DLL
14 
15  //------ load shared libraries with processors ------
16 
17  StringVec libs ;
18  LCTokenizer t( libs, ':' ) ;
19 
20  std::string marlinProcs("") ;
21 
22  char * var = getenv("MARLIN_DLL" ) ;
23 
24  if( var != 0 ) {
25  marlinProcs = var ;
26  } else {
27  std::cout << std::endl << " You have no MARLIN_DLL variable in your environment "
28  " - so no processors will be loaded. ! " << std::endl << std::endl ;
29  }
30 
31  std::for_each( marlinProcs.begin(), marlinProcs.end(), t ) ;
32 
33  ProcessorLoader loader( libs.begin() , libs.end() ) ;
34 
35  //------- end processor libs -------------------------
36 
37 //#endif
38 
39  QApplication app(argc, argv);
40 
41  //set the selection color to blue instead of black ;)
42  QPalette pal = QApplication::palette();
43  pal.setColor(QPalette::Highlight, QColor(0,90,126, 128) );
44  QApplication::setPalette(pal);
45 
46  MainWindow window;
47 
48  if( argc == 2 ){
49  window.setMarlinSteerCheck(argv[1]);
50  }
51 
52  window.show();
53 
54  return app.exec();
55 }
void setMarlinSteerCheck(const char *filename=NULL)
Definition: mainwindow.cpp:538
T endl(T...args)
Processor loader - loads shared libraries with marlin processors.
T end(T...args)
STL class.
Helper class for Parser.
Definition: Parser.h:90
T begin(T...args)
T for_each(T...args)
int main(int argc, char *argv[])
Definition: main.cpp:9