main.cpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
  3. * Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
  4. *
  5. * Version: MPL 1.1
  6. *
  7. * The contents of this file are subject to the Mozilla Public License Version
  8. * 1.1 (the "License"); you may not use this file except in compliance with
  9. * the License. You may obtain a copy of the License at
  10. * http://www.mozilla.org/MPL/
  11. *
  12. * Software distributed under the License is distributed on an "AS IS" basis,
  13. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  14. * for the specific language governing rights and limitations under the
  15. * License.
  16. *
  17. * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
  18. *
  19. * The Initial Developer of the Original Code is
  20. * Anthony Minessale II <anthm@freeswitch.org>
  21. * Portions created by the Initial Developer are Copyright (C)
  22. * the Initial Developer. All Rights Reserved.
  23. *
  24. * Contributor(s):
  25. *
  26. * Joao Mesquita <jmesquita@freeswitch.org>
  27. *
  28. */
  29. #include <QtGui/QApplication>
  30. #include <QSplashScreen>
  31. #include "mainwindow.h"
  32. #include "isettings.h"
  33. int main(int argc, char *argv[])
  34. {
  35. QApplication a(argc, argv);
  36. QApplication::setOrganizationDomain("freeswitch.org");
  37. QPixmap image(":/images/splash.png");
  38. QSplashScreen *splash = new QSplashScreen(image);
  39. splash->show();
  40. splash->showMessage("Loading core, please wait...", Qt::AlignRight|Qt::AlignBottom, Qt::blue);
  41. g_FSHost = new FSHost();
  42. QObject::connect(g_FSHost, SIGNAL(loadingModules(QString,int,QColor)), splash, SLOT(showMessage(QString,int,QColor)));
  43. QObject::connect(g_FSHost, SIGNAL(ready()), splash, SLOT(close()));
  44. MainWindow w;
  45. QObject::connect(g_FSHost, SIGNAL(ready()), &w, SLOT(show()));
  46. g_FSHost->start();
  47. return a.exec();
  48. }