PreviewWidget::heightForWidth(int w) const
{
return w;
}
PreviewWidget::heightForWidth(int w) const
{
return w;
}
To copy to clipboard, switch view to plain text mode
PreviewWidget
::PreviewWidget(int paintingType,
QWidget *parent
) : m_lightPixmap(10, 10),
m_darkPixmap(10, 10),
m_headStyle(1),
m_headWidth(20),
m_headHeight(40),
m_startAngle(0),
m_spanAngle(180),
m_drawBackground(true),
m_paintingType(paintingType)
{
m_lightPixmap.fill(Qt::white);
m_darkPixmap.fill(Qt::lightGray);
setMinimumSize
(QSize(140,
140));
resize(140, 140);
if(m_paintingType == Painting::ArrowType) {
calcHeadPoints();
}
policy.setHeightForWidth(true);
setSizePolicy(policy);
}
PreviewWidget::PreviewWidget(int paintingType, QWidget *parent) :
QWidget(parent),
m_lightPixmap(10, 10),
m_darkPixmap(10, 10),
m_headStyle(1),
m_headWidth(20),
m_headHeight(40),
m_startAngle(0),
m_spanAngle(180),
m_drawBackground(true),
m_paintingType(paintingType)
{
m_lightPixmap.fill(Qt::white);
m_darkPixmap.fill(Qt::lightGray);
setMinimumSize(QSize(140, 140));
resize(140, 140);
if(m_paintingType == Painting::ArrowType) {
calcHeadPoints();
}
QSizePolicy policy(QSizePolicy::Preferred, QSizePolicy::Preferred);
policy.setHeightForWidth(true);
setSizePolicy(policy);
}
To copy to clipboard, switch view to plain text mode
Bookmarks