ctkDoubleRangeSliderPlugin.cpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 "ctkDoubleRangeSliderPlugin.h"
  12. #include "ctkDoubleRangeSlider.h"
  13. // --------------------------------------------------------------------------
  14. ctkDoubleRangeSliderPlugin::ctkDoubleRangeSliderPlugin(QObject *_parent)
  15. : QObject(_parent)
  16. {
  17. }
  18. // --------------------------------------------------------------------------
  19. QWidget *ctkDoubleRangeSliderPlugin::createWidget(QWidget *_parent)
  20. {
  21. ctkDoubleRangeSlider* _widget = new ctkDoubleRangeSlider(Qt::Horizontal, _parent);
  22. return _widget;
  23. }
  24. // --------------------------------------------------------------------------
  25. QString ctkDoubleRangeSliderPlugin::domXml() const
  26. {
  27. return "<widget class=\"ctkDoubleRangeSlider\" name=\"CTKSlider\">\n"
  28. "<property name=\"orientation\">\n"
  29. " <enum>Qt::Horizontal</enum>\n"
  30. " </property>\n"
  31. "</widget>\n";
  32. }
  33. // --------------------------------------------------------------------------
  34. QIcon ctkDoubleRangeSliderPlugin::icon() const
  35. {
  36. return QIcon(":/Icons/hrangeslider.png");
  37. }
  38. // --------------------------------------------------------------------------
  39. QString ctkDoubleRangeSliderPlugin::includeFile() const
  40. {
  41. return "ctkDoubleRangeSlider.h";
  42. }
  43. // --------------------------------------------------------------------------
  44. bool ctkDoubleRangeSliderPlugin::isContainer() const
  45. {
  46. return false;
  47. }
  48. // --------------------------------------------------------------------------
  49. QString ctkDoubleRangeSliderPlugin::name() const
  50. {
  51. return "ctkDoubleRangeSlider";
  52. }