示例#1
0
CommandLineOptions ParseCommandLineOptions(unsigned int argc, char* argv[])
{
  bool AutoFixPlaylists = false;
  bool AutoFixAlbums= false;
  bool SimulateTransfers= false;
  bool DebugOutput = false;
  for (unsigned int i =0; i < argc; i ++)
  {
    QString str(argv[i]);
    str = str.toLower();
    cout << "param: " << str.toStdString() << endl;
    if (str == "--fixbadplaylists")
    {
      AutoFixPlaylists = true;
      cout << "FOUND PL FIX!!!" << endl;
    }
    else if (str == "--autofixalbums")
    {
      AutoFixAlbums = true;
      cout << "FOUND ALBUM FIX!!!" << endl;
    }
    else if (str == "--simulate")
    {
      SimulateTransfers = true;
      cout << "FOUND SIMULATE TRANSFERS FIX!!!" << endl;
    }
    else if (str == "--debug")
    {
      DebugOutput = true;
    }
  }

  return CommandLineOptions(AutoFixPlaylists, AutoFixAlbums, SimulateTransfers, DebugOutput);
}
示例#2
0
文件: main.cpp 项目: amitch/tuxcards
int main(int argc, char* argv[]){

  if (argc > 1 ){
    CommandLineOptions(argc, argv);
  }

  QApplication app(argc, argv);

  MainWindow tux(argc>1 ? argv[1] : "");
  app.setMainWidget( &tux );
  return app.exec();

}