You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdenetwork/kopete/libkopete/ui/kopetewidgets.cpp

132 lines
4.2 KiB

/**
* This file was autogenerated by makekdewidgets. Any changes will be lost!
* The generated code in this file is licensed under the same license that the
* input file.
*/
#include <tqwidgetplugin.h>
#include <kinstance.h>
#include <addressbooklinkwidget.h>
#include <kopetelistview.h>
#include <kopetelistviewsearchline.h>
#ifndef EMBED_IMAGES
#include <kstandarddirs.h>
#endif
class KopeteWidgets : public TQWidgetPlugin
{
public:
KopeteWidgets();
virtual ~KopeteWidgets();
virtual TQStringList keys() const
{
TQStringList result;
for (WidgetInfos::ConstIterator it = m_widgets.begin(); it != m_widgets.end(); ++it)
result << it.key();
return result;
}
virtual TQWidget *create(const TQString &key, TQWidget *tqparent = 0, const char *name = 0);
virtual TQIconSet iconSet(const TQString &key) const
{
#ifdef EMBED_IMAGES
TQPixmap pix(m_widgets[key].iconSet);
#else
TQPixmap pix(locate( "data",
TQString::tqfromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet));
#endif
return TQIconSet(pix);
}
virtual bool isContainer(const TQString &key) const { return m_widgets[key].isContainer; }
virtual TQString group(const TQString &key) const { return m_widgets[key].group; }
virtual TQString includeFile(const TQString &key) const { return m_widgets[key].includeFile; }
virtual TQString toolTip(const TQString &key) const { return m_widgets[key].toolTip; }
virtual TQString whatsThis(const TQString &key) const { return m_widgets[key].whatsThis; }
private:
struct WidgetInfo
{
TQString group;
#ifdef EMBED_IMAGES
TQPixmap iconSet;
#else
TQString iconSet;
#endif
TQString includeFile;
TQString toolTip;
TQString whatsThis;
bool isContainer;
};
typedef TQMap<TQString, WidgetInfo> WidgetInfos;
WidgetInfos m_widgets;
};
KopeteWidgets::KopeteWidgets()
{
WidgetInfo widget;
widget.group = TQString::tqfromLatin1("Input (Kopete)");
#ifdef EMBED_IMAGES
widget.iconSet = TQPixmap(kopete__ui__addressbooklinkwidget_xpm);
#else
widget.iconSet = TQString::tqfromLatin1("kopete__ui__addressbooklinkwidget.png");
#endif
widget.includeFile = TQString::tqfromLatin1("addressbooklinkwidget.h");
widget.toolTip = TQString::tqfromLatin1("Address Book Link Widget (Kopete)");
widget.whatsThis = TQString::tqfromLatin1("KABC::Addressee display/selector");
widget.isContainer = false;
m_widgets.insert(TQString::tqfromLatin1("Kopete::UI::AddressBookLinkWidget"), widget);
widget.group = TQString::tqfromLatin1("Views (Kopete)");
#ifdef EMBED_IMAGES
widget.iconSet = TQPixmap(kopete__ui__listview__listview_xpm);
#else
widget.iconSet = TQString::tqfromLatin1("kopete__ui__listview__listview.png");
#endif
widget.includeFile = TQString::tqfromLatin1("kopetelistview.h");
widget.toolTip = TQString::tqfromLatin1("List View (Kopete)");
widget.whatsThis = TQString::tqfromLatin1("A component capable list view widget.");
widget.isContainer = false;
m_widgets.insert(TQString::tqfromLatin1("Kopete::UI::ListView::ListView"), widget);
widget.group = TQString::tqfromLatin1("Input (Kopete)");
#ifdef EMBED_IMAGES
widget.iconSet = TQPixmap(kopete__ui__listview__searchline_xpm);
#else
widget.iconSet = TQString::tqfromLatin1("kopete__ui__listview__searchline.png");
#endif
widget.includeFile = TQString::tqfromLatin1("kopetelistviewsearchline.h");
widget.toolTip = TQString::tqfromLatin1("List View Search Line (Kopete)");
widget.whatsThis = TQString::tqfromLatin1("Search line able to use Kopete custom list View.");
widget.isContainer = false;
m_widgets.insert(TQString::tqfromLatin1("Kopete::UI::ListView::SearchLine"), widget);
new KInstance("kopetewidgets");
}
KopeteWidgets::~KopeteWidgets()
{
}
TQWidget *KopeteWidgets::create(const TQString &key, TQWidget *tqparent, const char *name)
{
if (key == TQString::tqfromLatin1("Kopete::UI::AddressBookLinkWidget"))
return new Kopete::UI::AddressBookLinkWidget(tqparent, name);
if (key == TQString::tqfromLatin1("Kopete::UI::ListView::ListView"))
return new Kopete::UI::ListView::ListView(tqparent, name);
if (key == TQString::tqfromLatin1("Kopete::UI::ListView::SearchLine"))
return new Kopete::UI::ListView::SearchLine(tqparent, 0, name);
return 0;
}
KDE_TQ_EXPORT_PLUGIN(KopeteWidgets)