debugconsole.cpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. = StarPU-Top for StarPU =
  3. Copyright (C) 2011
  4. William Braik
  5. Yann Courtois
  6. Jean-Marie Couteyen
  7. Anthony Roy
  8. This library is free software; you can redistribute it and/or
  9. modify it under the terms of the GNU Lesser General Public
  10. License as published by the Free Software Foundation; either
  11. version 2.1 of the License, or (at your option) any later version.
  12. This library is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. Lesser General Public License for more details.
  16. You should have received a copy of the GNU Lesser General Public
  17. License along with this library; if not, write to the Free Software
  18. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #include "debugconsole.h"
  21. #include "ui_debugconsole.h"
  22. DebugConsole::DebugConsole(QWidget *parent) :
  23. QWidget(parent),
  24. ui(new Ui::DebugConsole)
  25. {
  26. ui->setupUi(this);
  27. ui->stepButton->setEnabled(false);
  28. QObject::connect(ui->stepButton, SIGNAL(clicked()),
  29. this, SLOT(step()));
  30. }
  31. DebugConsole::~DebugConsole()
  32. {
  33. delete ui;
  34. }
  35. void DebugConsole::appendDebugLogMessage(QString debugMessage)
  36. {
  37. ui->console->append("INFO : " + debugMessage);
  38. }
  39. void DebugConsole::appendDebugLockMessage(QString lockMessage)
  40. {
  41. ui->stepButton->setEnabled(true);
  42. ui->console->append("LOCK : " + lockMessage);
  43. }
  44. void DebugConsole::clearConsole()
  45. {
  46. ui->console->clear();
  47. }
  48. void DebugConsole::step()
  49. {
  50. ui->stepButton->setEnabled(false);
  51. emit stepped();
  52. }