/aboutFrame.cpp

http://cutefootball.googlecode.com/ · C++ · 49 lines · 26 code · 4 blank · 19 comment · 2 complexity · c65784ae8bb995016d1ae2099ba851f5 MD5 · raw file

  1. /*
  2. * Copyright 2010,2011 Timothy Rochford
  3. *
  4. * This file is part of CuteFootball.
  5. *
  6. * CuteFootball is free software: you can redistribute it and/or modify
  7. * it under the terms of the Lesser GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * CuteFootball is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * Lesser GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the Lesser GNU General Public License
  17. * along with CuteFootball. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. #include "aboutFrame.h"
  21. #include "ui_aboutFrame.h"
  22. #include "version.h"
  23. aboutFrame::aboutFrame(MWindow *parent) :
  24. QFrame(parent),
  25. uiAbout(new Ui::aboutFrame)
  26. {
  27. uiAbout->setupUi(this);
  28. uiAbout->versionLabel->setText(KVersionNumber);
  29. connect(parent, SIGNAL(setFrame(MWindow::Frame)),
  30. this, SLOT(showFrame(MWindow::Frame)));
  31. connect(uiAbout->mainMenuBtn, SIGNAL(clicked()),
  32. parent, SLOT(hideAboutFrame()));
  33. }
  34. aboutFrame::~aboutFrame()
  35. {
  36. delete uiAbout;
  37. }
  38. void aboutFrame::showFrame(MWindow::Frame f)
  39. {
  40. qDebug() << "aboutFrame::showFrame" << f;
  41. if ( f == MWindow::About )
  42. showMaximized();
  43. else
  44. setVisible(false);
  45. }