2 * This file was autogenerated by makekdewidgets. Any changes will be lost!
3 * The generated code in this file is licensed under the same license that the
6 #include <qwidgetplugin.h>
10 #include <kcomponentdata.h>
11 #include <addressbooklinkwidget.h>
12 #include <kopetelistview.h>
13 #include <kopetelistviewsearchline.h>
15 #include <kstandarddirs.h>
18 class KopeteWidgets
: public QWidgetPlugin
23 virtual ~KopeteWidgets();
25 virtual QStringList
keys() const
28 for (WidgetInfos::ConstIterator it
= m_widgets
.begin(); it
!= m_widgets
.end(); ++it
)
33 virtual QWidget
*create(const QString
&key
, QWidget
*parent
= 0, const char *name
= 0);
35 virtual QIcon
iconSet(const QString
&key
) const
38 QPixmap
pix(m_widgets
[key
].iconSet
);
40 QPixmap
pix(KStandardDirs::locate( "data",
41 QLatin1String("kopetewidgets/pics/") + m_widgets
[key
].iconSet
));
46 virtual bool isContainer(const QString
&key
) const { return m_widgets
[key
].isContainer
; }
48 virtual QString
group(const QString
&key
) const { return m_widgets
[key
].group
; }
50 virtual QString
includeFile(const QString
&key
) const { return m_widgets
[key
].includeFile
; }
52 virtual QString
toolTip(const QString
&key
) const { return m_widgets
[key
].toolTip
; }
54 virtual QString
whatsThis(const QString
&key
) const { return m_widgets
[key
].whatsThis
; }
69 typedef QMap
<QString
, WidgetInfo
> WidgetInfos
;
70 WidgetInfos m_widgets
;
72 KopeteWidgets::KopeteWidgets()
76 widget
.group
= QLatin1String("Input (Kopete)");
78 widget
.iconSet
= QPixmap(kopete__ui__addressbooklinkwidget_xpm
);
80 widget
.iconSet
= QLatin1String("kopete__ui__addressbooklinkwidget.png");
82 widget
.includeFile
= QLatin1String("addressbooklinkwidget.h");
83 widget
.toolTip
= QLatin1String("Address Book Link Widget (Kopete)");
84 widget
.whatsThis
= QLatin1String("KABC::Addressee display/selector");
85 widget
.isContainer
= false;
86 m_widgets
.insert(QLatin1String("Kopete::UI::AddressBookLinkWidget"), widget
);
88 widget
.group
= QLatin1String("Views (Kopete)");
90 widget
.iconSet
= QPixmap(kopete__ui__listview__listview_xpm
);
92 widget
.iconSet
= QLatin1String("kopete__ui__listview__listview.png");
94 widget
.includeFile
= QLatin1String("kopetelistview.h");
95 widget
.toolTip
= QLatin1String("List View (Kopete)");
96 widget
.whatsThis
= QLatin1String("A component capable list view widget.");
97 widget
.isContainer
= false;
98 m_widgets
.insert(QLatin1String("Kopete::UI::ListView::ListView"), widget
);
100 widget
.group
= QLatin1String("Input (Kopete)");
102 widget
.iconSet
= QPixmap(kopete__ui__listview__searchline_xpm
);
104 widget
.iconSet
= QLatin1String("kopete__ui__listview__searchline.png");
106 widget
.includeFile
= QLatin1String("kopetelistviewsearchline.h");
107 widget
.toolTip
= QLatin1String("List View Search Line (Kopete)");
108 widget
.whatsThis
= QLatin1String("Search line able to use Kopete custom list View.");
109 widget
.isContainer
= false;
110 m_widgets
.insert(QLatin1String("Kopete::UI::ListView::SearchLine"), widget
);
112 KComponentData("kopetewidgets"); // if it's the only KComponentData object then it stays as
113 // KGlobal::mainComponent()
115 KopeteWidgets::~KopeteWidgets()
119 QWidget
*KopeteWidgets::create(const QString
&key
, QWidget
*parent
, const char *name
)
122 if (key
== QLatin1String("Kopete::UI::AddressBookLinkWidget"))
123 return new Kopete::UI::AddressBookLinkWidget(parent
, name
);
125 if (key
== QLatin1String("Kopete::UI::ListView::ListView"))
126 return new Kopete::UI::ListView::ListView(parent
, name
);
128 if (key
== QLatin1String("Kopete::UI::ListView::SearchLine"))
129 return new Kopete::UI::ListView::SearchLine(parent
, 0, name
);
133 KDE_Q_EXPORT_PLUGIN(KopeteWidgets
)