ctkDoubleRangeSliderPlugin.cpp 2.2 KB

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