ctkTemplateWidget.cpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0.txt
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =========================================================================*/
  14. // Qt includes
  15. #include <QDebug>
  16. // CTK includes
  17. #include "ctkTemplateWidget.h"
  18. #include "ui_ctkTemplateWidget.h"
  19. #include "ctkLogger.h"
  20. static ctkLogger logger("org.commontk.libs.widgets.ctkTemplateWidget");
  21. //-----------------------------------------------------------------------------
  22. class ctkTemplateWidgetPrivate: public Ui_ctkTemplateWidget
  23. {
  24. Q_DECLARE_PUBLIC(ctkTemplateWidget);
  25. protected:
  26. ctkTemplateWidget* const q_ptr;
  27. public:
  28. ctkTemplateWidgetPrivate(ctkTemplateWidget& object);
  29. void init();
  30. };
  31. // --------------------------------------------------------------------------
  32. ctkTemplateWidgetPrivate::ctkTemplateWidgetPrivate(ctkTemplateWidget& object)
  33. :q_ptr(&object)
  34. {
  35. }
  36. // --------------------------------------------------------------------------
  37. void ctkTemplateWidgetPrivate::init()
  38. {
  39. Q_Q(ctkTemplateWidgetPrivate);
  40. this->setupUi(q);
  41. }
  42. // --------------------------------------------------------------------------
  43. ctkTemplateWidget::ctkTemplateWidget(QWidget* parentWidget)
  44. : Superclass(parentWidget)
  45. , d_ptr(new ctkTemplateWidgetPrivate(*this))
  46. {
  47. Q_D(ctkTemplateWidget);
  48. d->init();
  49. }
  50. // --------------------------------------------------------------------------
  51. ctkTemplateWidget::~ctkTemplateWidget()
  52. {
  53. }