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