File indexing completed on 2024-05-12 13:15:18
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 * This file is a query creator for skrooge (qt designer plugin). 0008 * 0009 * @author Stephane MANKOWSKI / Guillaume DE BURE 0010 */ 0011 #include "skgquerycreatordesignerplugin.h" 0012 0013 0014 0015 #include "skgquerycreator.h" 0016 #include "skgservices.h" 0017 0018 SKGQueryCreatorDesignerPlugin::SKGQueryCreatorDesignerPlugin(QObject* iParent) 0019 : QObject(iParent) 0020 { 0021 m_initialized = false; 0022 } 0023 0024 void SKGQueryCreatorDesignerPlugin::initialize(QDesignerFormEditorInterface* iCore) 0025 { 0026 Q_UNUSED(iCore) 0027 if (m_initialized) { 0028 return; 0029 } 0030 0031 m_initialized = true; 0032 } 0033 0034 bool SKGQueryCreatorDesignerPlugin::isInitialized() const 0035 { 0036 return m_initialized; 0037 } 0038 0039 QWidget* SKGQueryCreatorDesignerPlugin::createWidget(QWidget* iParent) 0040 { 0041 return new SKGQueryCreator(iParent); 0042 } 0043 0044 QString SKGQueryCreatorDesignerPlugin::name() const 0045 { 0046 return QStringLiteral("SKGQueryCreator"); 0047 } 0048 0049 QString SKGQueryCreatorDesignerPlugin::group() const 0050 { 0051 return QStringLiteral("SKG Widgets"); 0052 } 0053 0054 QIcon SKGQueryCreatorDesignerPlugin::icon() const 0055 { 0056 return SKGServices::fromTheme(QStringLiteral("skrooge.png")); 0057 } 0058 0059 QString SKGQueryCreatorDesignerPlugin::toolTip() const 0060 { 0061 return QStringLiteral("A query creator"); 0062 } 0063 0064 QString SKGQueryCreatorDesignerPlugin::whatsThis() const 0065 { 0066 return QStringLiteral("A query creator"); 0067 } 0068 0069 bool SKGQueryCreatorDesignerPlugin::isContainer() const 0070 { 0071 return false; 0072 } 0073 0074 QString SKGQueryCreatorDesignerPlugin::domXml() const 0075 { 0076 return QStringLiteral("<widget class=\"SKGQueryCreator\" name=\"SKGQueryCreator\">\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>100</height>\n" 0083 " </rect>\n" 0084 " </property>\n" 0085 "</widget>\n"); 0086 } 0087 0088 QString SKGQueryCreatorDesignerPlugin::includeFile() const 0089 { 0090 return QStringLiteral("skgquerycreator.h"); 0091 } 0092