Ejemplo n.º 1
0
int
main(int argc, char * argv[])
{
    QApplication app(argc,argv);
    ShapeWidget shape;
    shape.show();
    return app.exec();
}
Ejemplo n.º 2
0
void ShapePropertyWidget::addShape(int &index, qreal &x, const QString &shape, const QString &currentShape
                                   , bool &foundCurrentShape)
{
    ShapeWidget *shapeWidget = new ShapeWidget(index, this);
    shapeWidget->setGeometry(x, 0, 0, 0);
    mShapes << shapeWidget;
    shapeWidget->setShape(shape);

    if (!foundCurrentShape && shape == currentShape) {
        shapeWidget->addSelection();
        mSelectedShapeIndex = index;
        foundCurrentShape = true;
    }

    shapeWidget->show();
    connect(shapeWidget, &ShapeWidget::clicked, this, &ShapePropertyWidget::shapeClicked);
    ++index;
    x += 75.0;
}
Ejemplo n.º 3
0
bool ribi::operator==(const ShapeWidget& lhs,const ShapeWidget& rhs) noexcept
{
  return  lhs.GetGeometry() ==  rhs.GetGeometry()
    &&   *lhs.GetShape()    == *rhs.GetShape();
}