2016-03-19 13:40:19 +00:00
|
|
|
#include <QLayout>
|
2016-03-19 20:34:05 +00:00
|
|
|
#include <QEvent>
|
2016-03-19 13:40:19 +00:00
|
|
|
#include "iconbuttonexamples.h"
|
2016-03-19 13:42:24 +00:00
|
|
|
#include "components/iconbutton.h"
|
2016-03-19 13:40:19 +00:00
|
|
|
#include "exampleview.h"
|
|
|
|
#include "frame.h"
|
|
|
|
|
|
|
|
IconButtonExamples::IconButtonExamples(QWidget *parent)
|
|
|
|
: ExampleList(parent)
|
|
|
|
{
|
|
|
|
QLayout *layout = widget()->layout();
|
|
|
|
|
|
|
|
{
|
2016-06-21 12:09:16 +00:00
|
|
|
IconButton *iconButton = new IconButton(QIcon("../qt-material-widgets/face.svg"), this);
|
2016-03-19 13:40:19 +00:00
|
|
|
|
|
|
|
ExampleView *view = new ExampleView;
|
2016-03-22 08:21:25 +00:00
|
|
|
view->setWidget(iconButton);
|
2016-03-19 13:40:19 +00:00
|
|
|
|
|
|
|
Frame *frame = new Frame;
|
|
|
|
frame->setCodeSnippet(
|
2016-03-19 13:42:24 +00:00
|
|
|
"IconButton *iconButton = new IconButton(QIcon(\"face.svg\"));\n"
|
2016-03-19 13:40:19 +00:00
|
|
|
);
|
|
|
|
frame->setWidget(view);
|
|
|
|
|
2016-03-22 12:32:51 +00:00
|
|
|
layout->addWidget(frame);
|
|
|
|
}
|
|
|
|
{
|
|
|
|
IconButton *iconButton = new IconButton(QIcon("../qt-material-widgets/face.svg"));
|
|
|
|
iconButton->setIconSize(QSize(64, 64));
|
|
|
|
|
|
|
|
ExampleView *view = new ExampleView;
|
|
|
|
view->setWidget(iconButton);
|
|
|
|
|
|
|
|
Frame *frame = new Frame;
|
|
|
|
frame->setCodeSnippet(
|
|
|
|
"IconButton *iconButton = new IconButton(QIcon(\"face.svg\"));\n"
|
|
|
|
"iconButton->setIconSize(QSize(64, 64));\n"
|
|
|
|
);
|
|
|
|
frame->setWidget(view);
|
|
|
|
|
2016-04-18 10:15:57 +00:00
|
|
|
layout->addWidget(frame);
|
|
|
|
}
|
|
|
|
{
|
|
|
|
IconButton *iconButton = new IconButton(QIcon("../qt-material-widgets/face.svg"));
|
|
|
|
iconButton->setIconSize(QSize(128, 128));
|
|
|
|
|
2016-05-29 21:26:42 +00:00
|
|
|
iconButton->setDisabled(true);
|
|
|
|
|
2016-04-18 10:15:57 +00:00
|
|
|
ExampleView *view = new ExampleView;
|
|
|
|
view->setWidget(iconButton);
|
|
|
|
|
|
|
|
Frame *frame = new Frame;
|
|
|
|
frame->setCodeSnippet(
|
|
|
|
"IconButton *iconButton = new IconButton(QIcon(\"face.svg\"));\n"
|
|
|
|
"iconButton->setIconSize(QSize(128, 128));\n"
|
|
|
|
);
|
|
|
|
frame->setWidget(view);
|
2016-03-22 12:32:51 +00:00
|
|
|
|
2016-03-19 13:40:19 +00:00
|
|
|
layout->addWidget(frame);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
IconButtonExamples::~IconButtonExamples()
|
|
|
|
{
|
|
|
|
}
|