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