80 QGraphicsGridLayout *tL =
new QGraphicsGridLayout;
91 f->setBrush (Qt::black);
94 fn->setBrush (Qt::black);
96 goBack->setBrush (Qt::black);
102 QFont font = f->font ();
108 tL->addItem (f, 0, 0, Qt::AlignVCenter | Qt::AlignLeft);
109 tL->addItem (fn, 0, 1, Qt::AlignVCenter | Qt::AlignLeft);
110 tL->addItem (goBack, 0, 2, Qt::AlignVCenter | Qt::AlignLeft);
115 Text *f =
new Text (tr(
"Main"),
this);
117 f->setBrush (Qt::black);
120 tL->addItem (f, 0, 0);
122 QFont font = f->font ();
127 tL->setHorizontalSpacing (1);
128 tL->setContentsMargins (3, 3, 3, 3);
131 setMinimumWidth (tL->preferredWidth());
146 int w = geometry().width();
147 int h = geometry().height();
149 _painter->setRenderHint(QPainter::Antialiasing,
true);
151 _painter->setBrush(QBrush(QColor(BACKGROUND_RED,
156 _painter->setPen(QColor(BACKGROUND_RED,
164 path.lineTo (w - 10, h);
165 path.arcTo (w - 20, h - 20, 20, 20, -90, 90);
168 _painter->drawPath (path);
174 _painter->setPen (Qt::NoPen);
176 lG.setStart (w - 5, 0);
177 lG.setFinalStop(w, 0);
178 lG.setColorAt(0, Qt::transparent);
179 lG.setColorAt(1, QColor (255, 255, 255, 128));
180 _painter->setBrush (lG);
181 _painter->drawRect (w - 5, 0, 5, h - 10);
183 lG.setStart (0, h - 5);
184 lG.setFinalStop (0, h);
185 _painter->setBrush (lG);
186 _painter->drawRect (0, h - 5, w - 10, 5);
188 path = QPainterPath ();
189 path.moveTo (w - 10, h);
190 path.arcTo (w - 20, h - 20, 20, 20, -90, 90);
191 path.lineTo (w - 10, h - 10);
192 path.lineTo (w - 10, h);
193 rG.setCenter (w - 10, h - 10);
194 rG.setFocalPoint(w -10, h - 10);
196 rG.setColorAt (0, Qt::transparent);
197 rG.setColorAt (0.5, Qt::transparent);
198 rG.setColorAt (1, QColor (255, 255, 255, 128));
199 _painter->setBrush (rG);
200 _painter->drawPath(path);
202 QGraphicsWidget::paint (_painter, _option, _widget);
virtual void setBackgroundBrush(QBrush _brush)
Sets the background brush.
void setBackground(bool _leftOut, bool _rightOut)
Enables background painting.