Commit def1b610 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

WelcomeModeTreeWidget: Add to Designer widgets lib.

parent f6121924
......@@ -223,6 +223,27 @@ Wizard_CW::Wizard_CW(QObject *parent) :
{
}
WelcomePageWidget_CW::WelcomePageWidget_CW(QObject *parent) :
QObject(parent),
CustomWidget<Utils::WelcomeModeTreeWidget>
(QLatin1String("<utils/welcomemodetreewidget.h>"),
false,
QLatin1String(groupC),
QIcon(),
QLatin1String("Welcome page widget"))
{
}
QWidget *WelcomePageWidget_CW::createWidget(QWidget *parent)
{
Utils::WelcomeModeTreeWidget *rc = new Utils::WelcomeModeTreeWidget(parent);
rc->slotAddNewsItem(QLatin1String("Breaking news"),
QLatin1String("Bla bla bla"), QLatin1String("qt.nokia.com"));
rc->slotAddNewsItem(QLatin1String("Yesterday's breaking news"),
QLatin1String("Blub blub blub"), QLatin1String("qt.nokia.com"));
return rc;
}
DetailsWidget_CW::DetailsWidget_CW(QObject *parent) :
QObject(parent),
CustomWidget<Utils::DetailsWidget>
......@@ -348,6 +369,7 @@ WidgetCollection::WidgetCollection(QObject *parent) :
m_plugins.push_back(new StyledBar_CW(this));
m_plugins.push_back(new StyledSeparator_CW(this));
m_plugins.push_back(new Wizard_CW(this));
m_plugins.push_back(new WelcomePageWidget_CW(this));
}
QList<QDesignerCustomWidgetInterface*> WidgetCollection::customWidgets() const
......
......@@ -47,6 +47,7 @@
#include <utils/detailswidget.h>
#include <utils/styledbar.h>
#include <utils/wizard.h>
#include <utils/welcomemodetreewidget.h>
#include <QtDesigner/QDesignerCustomWidgetCollectionInterface>
#include <QtDesigner/QDesignerContainerExtension>
......@@ -223,6 +224,16 @@ public:
explicit Wizard_CW(QObject *parent = 0);
};
class WelcomePageWidget_CW :
public QObject,
public CustomWidget<Utils::WelcomeModeTreeWidget>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
explicit WelcomePageWidget_CW(QObject *parent = 0);
virtual QWidget *createWidget(QWidget *parent);
};
// Details Widget: plugin + simple, hacky container extension that
// accepts only one page.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment