color_preview_plugin.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * \file
  3. *
  4. * \author Mattia Basaglia
  5. *
  6. * \copyright Copyright (C) 2013-2020 Mattia Basaglia
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Lesser General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #ifndef COLOR_PREVIEW_PLUGIN_HPP
  23. #define COLOR_PREVIEW_PLUGIN_HPP
  24. #include <QtUiPlugin/QDesignerCustomWidgetInterface>
  25. class ColorPreview_Plugin : public QObject, public QDesignerCustomWidgetInterface
  26. {
  27. Q_OBJECT
  28. Q_INTERFACES(QDesignerCustomWidgetInterface)
  29. public:
  30. ColorPreview_Plugin(QObject *parent = 0);
  31. void initialize(QDesignerFormEditorInterface *core);
  32. bool isInitialized() const;
  33. QWidget *createWidget(QWidget *parent);
  34. QString name() const;
  35. QString group() const;
  36. QIcon icon() const;
  37. QString toolTip() const;
  38. QString whatsThis() const;
  39. bool isContainer() const;
  40. QString domXml() const;
  41. QString includeFile() const;
  42. private:
  43. bool initialized;
  44. };
  45. #endif // COLOR_PREVIEW_PLUGIN_HPP