File indexing completed on 2024-04-28 16:30:28

0001 /***************************************************************************
0002  * SPDX-FileCopyrightText: 2022 S. MANKOWSKI stephane@mankowski.fr
0003  * SPDX-FileCopyrightText: 2022 G. DE BURE support@mankowski.fr
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  ***************************************************************************/
0006 #ifndef SKGTREEVIEWDESIGNERPLUGIN_H
0007 #define SKGTREEVIEWDESIGNERPLUGIN_H
0008 /** @file
0009  * A tree view with more features (qt designer plugin).
0010  *
0011  * @author Stephane MANKOWSKI / Guillaume DE BURE
0012  */
0013 #include <QtUiPlugin/customwidget.h>
0014 
0015 /**
0016  * QDesigner plugin for SKGTreeView
0017  */
0018 class SKGTreeViewDesignerPlugin : public QObject, public QDesignerCustomWidgetInterface
0019 {
0020     Q_OBJECT
0021     Q_INTERFACES(QDesignerCustomWidgetInterface)
0022 
0023 public:
0024     /**
0025      * Constructor
0026      * @param iParent parent
0027      */
0028     explicit SKGTreeViewDesignerPlugin(QObject* iParent = nullptr);
0029 
0030     /**
0031      * To know if the component is a container
0032      * @return true or false
0033      */
0034     bool isContainer() const override;
0035 
0036     /**
0037      * To know if the component is initialized
0038      * @return true or false
0039      */
0040     bool isInitialized() const override;
0041 
0042     /**
0043      * To get the icon for this component
0044      * @return the icon
0045      */
0046     QIcon icon() const override;
0047 
0048     /**
0049      * To get the icon for this component
0050      * @return
0051      */
0052     QString domXml() const override;
0053 
0054     /**
0055      * To get the group for this component
0056      * @return group
0057      */
0058     QString group() const override;
0059 
0060     /**
0061      * To get the include file for this component
0062      * @return the include file
0063      */
0064     QString includeFile() const override;
0065 
0066     /**
0067      * To get the name for this component
0068      * @return name
0069      */
0070     QString name() const override;
0071 
0072     /**
0073      * To get the "tool tip" for this component
0074      * @return the "tool tip"
0075      */
0076     QString toolTip() const override;
0077 
0078     /**
0079      * To get the "whats this" for this component
0080      * @return the "whats this"
0081      */
0082     QString whatsThis() const override;
0083 
0084     /**
0085      * To get the widget representing the component
0086      * @param iParent the parent of the widget
0087      * @return the widget
0088      */
0089     QWidget* createWidget(QWidget* iParent) override;
0090 
0091     /**
0092      * Initilialize the component
0093      * @param iCore interface
0094      */
0095     void initialize(QDesignerFormEditorInterface* iCore) override;
0096 
0097 private:
0098     bool m_initialized;
0099 };
0100 
0101 #endif