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 /** @file
0007  * A color button with more features (qt designer plugin).
0008  *
0009  * @author Stephane MANKOWSKI / Guillaume DE BURE
0010  */
0011 #include "skgzoomselectordesignerplugin.h"
0012 
0013 
0014 
0015 #include "skgservices.h"
0016 #include "skgzoomselector.h"
0017 
0018 SKGZoomSelectorDesignerPlugin::SKGZoomSelectorDesignerPlugin(QObject* iParent)
0019     : QObject(iParent)
0020 {
0021     m_initialized = false;
0022 }
0023 
0024 void SKGZoomSelectorDesignerPlugin::initialize(QDesignerFormEditorInterface*  iCore)
0025 {
0026     Q_UNUSED(iCore)
0027     if (m_initialized) {
0028         return;
0029     }
0030 
0031     m_initialized = true;
0032 }
0033 
0034 bool SKGZoomSelectorDesignerPlugin::isInitialized() const
0035 {
0036     return m_initialized;
0037 }
0038 
0039 QWidget* SKGZoomSelectorDesignerPlugin::createWidget(QWidget* iParent)
0040 {
0041     return new SKGZoomSelector(iParent);
0042 }
0043 
0044 QString SKGZoomSelectorDesignerPlugin::name() const
0045 {
0046     return QStringLiteral("SKGZoomSelector");
0047 }
0048 
0049 QString SKGZoomSelectorDesignerPlugin::group() const
0050 {
0051     return QStringLiteral("SKG Widgets");
0052 }
0053 
0054 QIcon SKGZoomSelectorDesignerPlugin::icon() const
0055 {
0056     return SKGServices::fromTheme(QStringLiteral("quickopen"));
0057 }
0058 
0059 QString SKGZoomSelectorDesignerPlugin::toolTip() const
0060 {
0061     return QStringLiteral("A color button with more features");
0062 }
0063 
0064 QString SKGZoomSelectorDesignerPlugin::whatsThis() const
0065 {
0066     return QStringLiteral("A color button with more features");
0067 }
0068 
0069 bool SKGZoomSelectorDesignerPlugin::isContainer() const
0070 {
0071     return false;
0072 }
0073 
0074 QString SKGZoomSelectorDesignerPlugin::domXml() const
0075 {
0076     return QStringLiteral("<widget class=\"SKGZoomSelector\" name=\"SKGZoomSelector\">\n"
0077                           " <property name=\"geometry\">\n"
0078                           "  <rect>\n"
0079                           "   <x>0</x>\n"
0080                           "   <y>0</y>\n"
0081                           "   <width>100</width>\n"
0082                           "   <height>10</height>\n"
0083                           "  </rect>\n"
0084                           " </property>\n"
0085                           "</widget>\n");
0086 }
0087 
0088 QString SKGZoomSelectorDesignerPlugin::includeFile() const
0089 {
0090     return QStringLiteral("skgzoomselector.h");
0091 }
0092