ctkColorPickerButtonPlugin.cpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. // CTK includes
  11. #include "ctkColorPickerButtonPlugin.h"
  12. #include "ctkColorPickerButton.h"
  13. //-----------------------------------------------------------------------------
  14. ctkColorPickerButtonPlugin::ctkColorPickerButtonPlugin(QObject *_parent) : QObject(_parent)
  15. {
  16. }
  17. //-----------------------------------------------------------------------------
  18. QWidget *ctkColorPickerButtonPlugin::createWidget(QWidget *_parent)
  19. {
  20. ctkColorPickerButton* _widget = new ctkColorPickerButton(_parent);
  21. return _widget;
  22. }
  23. //-----------------------------------------------------------------------------
  24. QString ctkColorPickerButtonPlugin::domXml() const
  25. {
  26. return "<widget class=\"ctkColorPickerButton\" \
  27. name=\"CTKColorPickerButton\">\n"
  28. "</widget>\n";
  29. }
  30. //-----------------------------------------------------------------------------
  31. QIcon ctkColorPickerButtonPlugin::icon() const
  32. {
  33. return QIcon(":/Icons/pushbutton.png");
  34. }
  35. //-----------------------------------------------------------------------------
  36. QString ctkColorPickerButtonPlugin::includeFile() const
  37. {
  38. return "ctkColorPickerButton.h";
  39. }
  40. //-----------------------------------------------------------------------------
  41. bool ctkColorPickerButtonPlugin::isContainer() const
  42. {
  43. return false;
  44. }
  45. //-----------------------------------------------------------------------------
  46. QString ctkColorPickerButtonPlugin::name() const
  47. {
  48. return "ctkColorPickerButton";
  49. }