add RaisedButton examples
This commit is contained in:
parent
7dc4fcca89
commit
a970c2e8a7
|
@ -0,0 +1,33 @@
|
||||||
|
#include <QLayout>
|
||||||
|
#include "raisedbuttonexamples.h"
|
||||||
|
#include "components/raisedbutton.h"
|
||||||
|
#include "exampleview.h"
|
||||||
|
#include "frame.h"
|
||||||
|
|
||||||
|
RaisedButtonExamples::RaisedButtonExamples(QWidget *parent)
|
||||||
|
: ExampleList(parent)
|
||||||
|
{
|
||||||
|
QLayout *layout = widget()->layout();
|
||||||
|
|
||||||
|
{
|
||||||
|
RaisedButton *raisedButton = new RaisedButton;
|
||||||
|
raisedButton->setText("Press me!");
|
||||||
|
raisedButton->setMinimumSize(200, 42);
|
||||||
|
|
||||||
|
ExampleView *view = new ExampleView;
|
||||||
|
view->setWidget(raisedButton);
|
||||||
|
|
||||||
|
Frame *frame = new Frame;
|
||||||
|
frame->setCodeSnippet(
|
||||||
|
"RaisedButton *raisedButton = new RaisedButton;\n"
|
||||||
|
"raisedButton->setText(\"Press me!\");"
|
||||||
|
);
|
||||||
|
frame->setWidget(view);
|
||||||
|
|
||||||
|
layout->addWidget(frame);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RaisedButtonExamples::~RaisedButtonExamples()
|
||||||
|
{
|
||||||
|
}
|
|
@ -1,4 +1,15 @@
|
||||||
#ifndef RAISEDBUTTONEXAMPLES_H
|
#ifndef RAISEDBUTTONEXAMPLES_H
|
||||||
#define RAISEDBUTTONEXAMPLES_H
|
#define RAISEDBUTTONEXAMPLES_H
|
||||||
|
|
||||||
|
#include "examplelist.h"
|
||||||
|
|
||||||
|
class RaisedButtonExamples : public ExampleList
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit RaisedButtonExamples(QWidget *parent = 0);
|
||||||
|
~RaisedButtonExamples();
|
||||||
|
};
|
||||||
|
|
||||||
#endif // RAISEDBUTTONEXAMPLES_H
|
#endif // RAISEDBUTTONEXAMPLES_H
|
||||||
|
|
Loading…
Reference in New Issue