Warning, file /office/skrooge/skgbankguidesigner/skgunitcomboboxdesignerplugin.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 predicat creator for skrooge (qt designer plugin). 0008 * 0009 * @author Stephane MANKOWSKI / Guillaume DE BURE 0010 */ 0011 #include "skgunitcomboboxdesignerplugin.h" 0012 0013 #include <qicon.h> 0014 0015 0016 0017 #include "skgunitcombobox.h" 0018 0019 SKGUnitComboBoxDesignerPlugin::SKGUnitComboBoxDesignerPlugin(QObject* iParent) 0020 : QObject(iParent) 0021 { 0022 m_initialized = false; 0023 } 0024 0025 void SKGUnitComboBoxDesignerPlugin::initialize(QDesignerFormEditorInterface* iCore) 0026 { 0027 Q_UNUSED(iCore) 0028 if (m_initialized) { 0029 return; 0030 } 0031 0032 m_initialized = true; 0033 } 0034 0035 bool SKGUnitComboBoxDesignerPlugin::isInitialized() const 0036 { 0037 return m_initialized; 0038 } 0039 0040 QWidget* SKGUnitComboBoxDesignerPlugin::createWidget(QWidget* iParent) 0041 { 0042 return new SKGUnitComboBox(iParent); 0043 } 0044 0045 QString SKGUnitComboBoxDesignerPlugin::name() const 0046 { 0047 return QStringLiteral("SKGUnitComboBox"); 0048 } 0049 0050 QString SKGUnitComboBoxDesignerPlugin::group() const 0051 { 0052 return QStringLiteral("SKG Widgets"); 0053 } 0054 0055 QIcon SKGUnitComboBoxDesignerPlugin::icon() const 0056 { 0057 return SKGServices::fromTheme(QStringLiteral("skrooge.png")); 0058 } 0059 0060 QString SKGUnitComboBoxDesignerPlugin::toolTip() const 0061 { 0062 return QStringLiteral("A unit combo box"); 0063 } 0064 0065 QString SKGUnitComboBoxDesignerPlugin::whatsThis() const 0066 { 0067 return QStringLiteral("A unit combo box"); 0068 } 0069 0070 bool SKGUnitComboBoxDesignerPlugin::isContainer() const 0071 { 0072 return false; 0073 } 0074 0075 QString SKGUnitComboBoxDesignerPlugin::domXml() const 0076 { 0077 return QStringLiteral("<widget class=\"SKGUnitComboBox\" name=\"SKGUnitComboBox\">\n" 0078 " <property name=\"geometry\">\n" 0079 " <rect>\n" 0080 " <x>0</x>\n" 0081 " <y>0</y>\n" 0082 " <width>100</width>\n" 0083 " <height>100</height>\n" 0084 " </rect>\n" 0085 " </property>\n" 0086 "</widget>\n"); 0087 } 0088 0089 QString SKGUnitComboBoxDesignerPlugin::includeFile() const 0090 { 0091 return QStringLiteral("skgunitcombobox.h"); 0092 } 0093