ctkPluginGeneratorAbstractUiSection.cpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*=============================================================================
  2. Library: CTK
  3. Copyright (c) 2010 German Cancer Research Center,
  4. Division of Medical and Biological Informatics
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. =============================================================================*/
  15. #include "ctkPluginGeneratorAbstractUiSection.h"
  16. ctkPluginGeneratorAbstractUiSection::ctkPluginGeneratorAbstractUiSection()
  17. : sectionWidget(0)
  18. {
  19. }
  20. ctkPluginGeneratorAbstractUiSection::~ctkPluginGeneratorAbstractUiSection()
  21. {
  22. }
  23. QWidget* ctkPluginGeneratorAbstractUiSection::getWidget()
  24. {
  25. return sectionWidget;
  26. }
  27. QString ctkPluginGeneratorAbstractUiSection::getDescription() const
  28. {
  29. return this->description;
  30. }
  31. QString ctkPluginGeneratorAbstractUiSection::getTitle() const
  32. {
  33. return this->title;
  34. }
  35. QString ctkPluginGeneratorAbstractUiSection::getErrorMessage() const
  36. {
  37. return this->errorMessage;
  38. }
  39. QString ctkPluginGeneratorAbstractUiSection::getMessage() const
  40. {
  41. return this->message;
  42. }
  43. QIcon ctkPluginGeneratorAbstractUiSection::getIcon() const
  44. {
  45. return this->icon;
  46. }
  47. void ctkPluginGeneratorAbstractUiSection::setDescription(const QString& description)
  48. {
  49. if (this->description != description)
  50. {
  51. this->description = description;
  52. emit descriptionChanged(description);
  53. }
  54. }
  55. void ctkPluginGeneratorAbstractUiSection::setTitle(const QString& title)
  56. {
  57. if (this->title != title)
  58. {
  59. this->title = title;
  60. emit titleChanged(title);
  61. }
  62. }
  63. void ctkPluginGeneratorAbstractUiSection::setErrorMessage(const QString& errorMsg)
  64. {
  65. if (this->errorMessage != errorMsg)
  66. {
  67. this->errorMessage = errorMsg;
  68. emit errorMessageChanged(errorMsg);
  69. }
  70. }
  71. void ctkPluginGeneratorAbstractUiSection::setMessage(const QString& msg)
  72. {
  73. if (this->message != msg)
  74. {
  75. this->message = msg;
  76. emit messageChanged(msg);
  77. }
  78. }
  79. void ctkPluginGeneratorAbstractUiSection::setIcon(const QIcon& icon)
  80. {
  81. this->icon = icon;
  82. emit iconChanged(icon);
  83. }