main.cpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. @Project: ThinkContacts
  3. @authors: Mirko Perkusich
  4. Taciana Rached
  5. */
  6. /*
  7. Copyright (c) 2010 Embedded Systems and Pervasive Laboratory, Federal
  8. University of Campina Grande, Brazil, Angelo Perkusich, Mirko Perkusich,
  9. Taciana Rached
  10. Permission is hereby granted, free of charge, to any person obtaining a
  11. copy of this software and associated documentation files (the
  12. "Software"), to deal in the Software without restriction, including
  13. without limitation the rights to use, copy, modify, merge, publish,
  14. distribute, sublicense, and/or sell copies of the Software, and to
  15. permit persons to whom the Software is furnished to do so, subject to
  16. the following conditions:
  17. The above copyright notice and this permission notice shall be included
  18. in all copies or substantial portions of the Software.
  19. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  20. OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  21. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  22. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  23. CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  24. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  25. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  26. */
  27. #include <QApplication>
  28. #include <QWidget>
  29. #include "mainwindow.h"
  30. /**
  31. * Main funtion thar runs the application
  32. */
  33. int main( int argc, char ** argv )
  34. {
  35. QApplication* app = new QApplication( argc, argv );
  36. /** Initialize MainWindow object */
  37. MainWindow* window = new MainWindow();
  38. /** Display MainWindow object */
  39. window->show();
  40. /** Quit application after the last window is closed */
  41. app->connect( app, SIGNAL(lastWindowClosed()), app, SLOT(quit()) );
  42. int result = app->exec();
  43. /** Clear memory */
  44. delete window;
  45. delete app;
  46. return result;
  47. }