ctkCollapsibleGroupBoxPlugin.cpp 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 "ctkCollapsibleGroupBoxPlugin.h"
  18. #include "ctkCollapsibleGroupBox.h"
  19. // --------------------------------------------------------------------------
  20. ctkCollapsibleGroupBoxPlugin
  21. ::ctkCollapsibleGroupBoxPlugin(QObject* parentObject)
  22. : QObject(parentObject)
  23. {
  24. }
  25. // --------------------------------------------------------------------------
  26. QWidget *ctkCollapsibleGroupBoxPlugin
  27. ::createWidget(QWidget* futurParentWidget)
  28. {
  29. ctkCollapsibleGroupBox* widget =
  30. new ctkCollapsibleGroupBox(futurParentWidget);
  31. return widget;
  32. }
  33. // --------------------------------------------------------------------------
  34. QString ctkCollapsibleGroupBoxPlugin::domXml() const
  35. {
  36. return "<widget class=\"ctkCollapsibleGroupBox\" \
  37. name=\"CollapsibleGroupBox\">\n"
  38. " <property name=\"geometry\">\n"
  39. " <rect>\n"
  40. " <x>0</x>\n"
  41. " <y>0</y>\n"
  42. " <width>300</width>\n"
  43. " <height>100</height>\n"
  44. " </rect>\n"
  45. " </property>\n"
  46. " <property name=\"title\">"
  47. " <string>GroupBox</string>"
  48. " </property>"
  49. "</widget>\n";
  50. }
  51. // --------------------------------------------------------------------------
  52. QIcon ctkCollapsibleGroupBoxPlugin::icon() const
  53. {
  54. return QIcon(":/Icons/groupboxcollapsible.png");
  55. }
  56. // --------------------------------------------------------------------------
  57. QString ctkCollapsibleGroupBoxPlugin::includeFile() const
  58. {
  59. return "ctkCollapsibleGroupBox.h";
  60. }
  61. // --------------------------------------------------------------------------
  62. bool ctkCollapsibleGroupBoxPlugin::isContainer() const
  63. {
  64. return true;
  65. }
  66. // --------------------------------------------------------------------------
  67. QString ctkCollapsibleGroupBoxPlugin::name() const
  68. {
  69. return "ctkCollapsibleGroupBox";
  70. }