コード例 #1
0
ファイル: main.cpp プロジェクト: guolilong2012/exercise_aka
int
main(int argc, char * argv[])
{
    QApplication app(argc,argv);
    ShapeWidget shape;
    shape.show();
    return app.exec();
}
コード例 #2
0
ファイル: shapePropertyWidget.cpp プロジェクト: qreal/qreal
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;
}
コード例 #3
0
bool ribi::operator==(const ShapeWidget& lhs,const ShapeWidget& rhs) noexcept
{
  return  lhs.GetGeometry() ==  rhs.GetGeometry()
    &&   *lhs.GetShape()    == *rhs.GetShape();
}