ctkCollapsibleGroupBoxPlugin.cpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. All rights reserved.
  5. Distributed under a BSD License. See LICENSE.txt file.
  6. This software is distributed "AS IS" WITHOUT ANY WARRANTY; without even
  7. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the above copyright notice for more information.
  9. =========================================================================*/
  10. // Qt includes
  11. #include <QDebug>
  12. // CTK includes
  13. #include "ctkCollapsibleGroupBoxPlugin.h"
  14. #include "ctkCollapsibleGroupBox.h"
  15. // --------------------------------------------------------------------------
  16. ctkCollapsibleGroupBoxPlugin::ctkCollapsibleGroupBoxPlugin(QObject *_parent) : QObject(_parent)
  17. {
  18. }
  19. // --------------------------------------------------------------------------
  20. QWidget *ctkCollapsibleGroupBoxPlugin::createWidget(QWidget *_parent)
  21. {
  22. ctkCollapsibleGroupBox* _widget = new ctkCollapsibleGroupBox(_parent);
  23. return _widget;
  24. }
  25. // --------------------------------------------------------------------------
  26. QString ctkCollapsibleGroupBoxPlugin::domXml() const
  27. {
  28. return "<widget class=\"ctkCollapsibleGroupBox\" \
  29. name=\"CTKCollapsibleGroupBox\">\n"
  30. " <property name=\"geometry\">\n"
  31. " <rect>\n"
  32. " <x>0</x>\n"
  33. " <y>0</y>\n"
  34. " <width>300</width>\n"
  35. " <height>100</height>\n"
  36. " </rect>\n"
  37. " </property>\n"
  38. " <property name=\"title\">"
  39. " <string>GroupBox</string>"
  40. " </property>"
  41. "</widget>\n";
  42. }
  43. // --------------------------------------------------------------------------
  44. QIcon ctkCollapsibleGroupBoxPlugin::icon() const
  45. {
  46. return QIcon(":/Icons/groupboxcollapsible.png");
  47. }
  48. // --------------------------------------------------------------------------
  49. QString ctkCollapsibleGroupBoxPlugin::includeFile() const
  50. {
  51. return "ctkCollapsibleGroupBox.h";
  52. }
  53. // --------------------------------------------------------------------------
  54. bool ctkCollapsibleGroupBoxPlugin::isContainer() const
  55. {
  56. return true;
  57. }
  58. // --------------------------------------------------------------------------
  59. QString ctkCollapsibleGroupBoxPlugin::name() const
  60. {
  61. return "ctkCollapsibleGroupBox";
  62. }