本文整理汇总了C++中setLineWidth函数的典型用法代码示例。如果您正苦于以下问题:C++ setLineWidth函数的具体用法?C++ setLineWidth怎么用?C++ setLineWidth使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setLineWidth函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wyFree
void wyBitmapFontLabel::setText(const char* text) {
// null checking
if(text == NULL)
return;
// release old
if(m_text) {
wyFree((void*)m_text);
m_text = NULL;
}
// save text
m_text = wyUtils::copy(text);
// measure
setLineWidth(m_lineWidth);
}
示例2: switch
int QwtDial::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QwtAbstractSlider::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
#ifndef QT_NO_PROPERTIES
if (_c == QMetaObject::ReadProperty) {
void *_v = _a[0];
switch (_id) {
case 0: *reinterpret_cast< bool*>(_v) = hasVisibleBackground(); break;
case 1: *reinterpret_cast< int*>(_v) = lineWidth(); break;
case 2: *reinterpret_cast< Shadow*>(_v) = frameShadow(); break;
case 3: *reinterpret_cast< Mode*>(_v) = mode(); break;
case 4: *reinterpret_cast< double*>(_v) = origin(); break;
case 5: *reinterpret_cast< bool*>(_v) = wrapping(); break;
}
_id -= 6;
} else if (_c == QMetaObject::WriteProperty) {
void *_v = _a[0];
switch (_id) {
case 0: showBackground(*reinterpret_cast< bool*>(_v)); break;
case 1: setLineWidth(*reinterpret_cast< int*>(_v)); break;
case 2: setFrameShadow(*reinterpret_cast< Shadow*>(_v)); break;
case 3: setMode(*reinterpret_cast< Mode*>(_v)); break;
case 4: setOrigin(*reinterpret_cast< double*>(_v)); break;
case 5: setWrapping(*reinterpret_cast< bool*>(_v)); break;
}
_id -= 6;
} else if (_c == QMetaObject::ResetProperty) {
_id -= 6;
} else if (_c == QMetaObject::QueryPropertyDesignable) {
_id -= 6;
} else if (_c == QMetaObject::QueryPropertyScriptable) {
_id -= 6;
} else if (_c == QMetaObject::QueryPropertyStored) {
_id -= 6;
} else if (_c == QMetaObject::QueryPropertyEditable) {
_id -= 6;
} else if (_c == QMetaObject::QueryPropertyUser) {
_id -= 6;
}
#endif // QT_NO_PROPERTIES
return _id;
}
示例3: QGraphicsView
InboxButtonView::InboxButtonView(QWidget* parent)
: QGraphicsView(parent), m_usedWidth(0)
{
setMinimumHeight( 24 );
setMaximumHeight( minimumHeight() );
setFrameShape(QFrame::NoFrame);
setFrameShadow(QFrame::Plain);
setLineWidth(0);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setInteractive(true);
setAttribute(Qt::WA_Hover, true);
setAlignment(Qt::AlignLeft | Qt::AlignTop);
m_scene = new QGraphicsScene(this);
setScene( m_scene );
}
示例4: TextLine
Volta::Volta(Score* s)
: TextLine(s)
{
_voltaType = VoltaType::OPEN;
setBeginText("1.", TEXT_STYLE_VOLTA);
setBeginTextPlace(PlaceText::BELOW);
setContinueTextPlace(PlaceText::BELOW);
setBeginHook(true);
Spatium hook(s->styleS(StyleIdx::voltaHook));
setBeginHookHeight(hook);
setEndHookHeight(hook);
setAnchor(Anchor::MEASURE);
setLineWidth(score()->styleS(StyleIdx::voltaLineWidth));
lineWidthStyle = PropertyStyle::STYLED;
}
示例5: QFrame
QvisAbstractOpacityBar::QvisAbstractOpacityBar(QWidget *parent)
: QFrame(parent)
{
setFrameStyle( QFrame::Panel | QFrame::Sunken );
setLineWidth( 2 );
setMinimumHeight(50);
setMinimumWidth(128);
setContentsMargins(0,0,0,0);
QSizePolicy sp(QSizePolicy::MinimumExpanding,QSizePolicy::MinimumExpanding);
setSizePolicy(sp);
image = 0;
backgroundColorControlPoints = 0;
histTexture = 0;
histTextureMask = 0;
histTextureSize = 0;
histogramColor = QColor(30,30,30);
}
示例6: QGraphicsView
ImageView::ImageView(QWidget* parent)
: QGraphicsView(parent)
, m_autoZoomFit(false)
, m_scaleFactor(1.0)
, m_proxy(0)
, m_item(0)
, m_cacheTimer(0)
{
m_scene = new QGraphicsScene(this);
setViewportMargins(0, 0, 0, 0);
setContentsMargins(0, 0, 0, 0);
setLineWidth(0);
setDragMode(ScrollHandDrag);
setFrameStyle(Plain | NoFrame);
setScene(m_scene);
}
示例7: switch
int QFrame::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
#ifndef QT_NO_PROPERTIES
if (_c == QMetaObject::ReadProperty) {
void *_v = _a[0];
switch (_id) {
case 0: *reinterpret_cast< Shape*>(_v) = frameShape(); break;
case 1: *reinterpret_cast< Shadow*>(_v) = frameShadow(); break;
case 2: *reinterpret_cast< int*>(_v) = lineWidth(); break;
case 3: *reinterpret_cast< int*>(_v) = midLineWidth(); break;
case 4: *reinterpret_cast< int*>(_v) = frameWidth(); break;
case 5: *reinterpret_cast< QRect*>(_v) = frameRect(); break;
}
_id -= 6;
} else if (_c == QMetaObject::WriteProperty) {
void *_v = _a[0];
switch (_id) {
case 0: setFrameShape(*reinterpret_cast< Shape*>(_v)); break;
case 1: setFrameShadow(*reinterpret_cast< Shadow*>(_v)); break;
case 2: setLineWidth(*reinterpret_cast< int*>(_v)); break;
case 3: setMidLineWidth(*reinterpret_cast< int*>(_v)); break;
case 5: setFrameRect(*reinterpret_cast< QRect*>(_v)); break;
}
_id -= 6;
} else if (_c == QMetaObject::ResetProperty) {
_id -= 6;
} else if (_c == QMetaObject::QueryPropertyDesignable) {
_id -= 6;
} else if (_c == QMetaObject::QueryPropertyScriptable) {
_id -= 6;
} else if (_c == QMetaObject::QueryPropertyStored) {
_id -= 6;
} else if (_c == QMetaObject::QueryPropertyEditable) {
_id -= 6;
} else if (_c == QMetaObject::QueryPropertyUser) {
_id -= 6;
}
#endif // QT_NO_PROPERTIES
return _id;
}
示例8: main
main (void)
{
initGraph ();
/* 背景 */
floodFill (320, 240, BLACK, LIGHTBLUE);
waitButtonPress ();
/* 頭 */
fillEllipse (320, 240, 240, 180, WHITE);
/* 耳 */
fillEllipse (480, 140, 60, 80, WHITE);
fillEllipse (160, 140, 60, 80, WHITE);
waitButtonPress ();
/* 目 */
fillEllipse (200, 300, 15, 20, BLACK);
fillEllipse (440, 300, 15, 20, BLACK);
waitButtonPress ();
/* 鼻 */
fillEllipse (320, 340, 10, 14, YELLOW);
setLineWidth (2);
waitButtonPress ();
/* ひげ */
drawLine (125, 300, 40, 305, BLACK);
drawLine (130, 320, 50, 330, BLACK);
drawLine (140, 340, 40, 355, BLACK);
drawLine (515, 300, 600, 305, BLACK);
drawLine (510, 320, 590, 330, BLACK);
drawLine (500, 340, 600, 355, BLACK);
waitButtonPress ();
/* リボン */
fillTriangle (480, 160, 430, 70, 380, 160, RED);
fillTriangle (480, 160, 530, 250, 580, 160, RED);
fillCircle (480, 160, 20, RED);
waitButtonPress ();
closeGraph ();
}
示例9: QFrame
WGraphFrame::WGraphFrame(WGraphWidget *p)
: QFrame(p,"",WRepaintNoErase|WResizeNoErase),
zoomEnabled(false), autoDisableZoom(false),
panEnabled(false),
xGridVisible(true), yGridVisible(true),
parent(p),
zoomRectPen(QColor(255,255,255),0,DotLine),
gridPen(QColor(128,128,128),0,DotLine) {
setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
QSizePolicy::Expanding));
paintPixmap.setOptimization(QPixmap::BestOptim);
setZoomCursor(crossCursor);
setPanCursor(sizeAllCursor);
setFrameStyle(QFrame::Sunken|QFrame::Panel);
setLineWidth(2);
}
示例10: ofSetColor
void DotPolygonHit::draw(){
ofSetColor(0);
setLineWidth(1);
ofSetCircleResolution(20);
for (int i=0; i<numPoints; i++){
lines[i].draw();
}
ofFill();
for (int i=0; i<numPoints; i++){
ofSetColor(0);
ofDrawCircle(points[i].x, points[i].y, pointSize[i]);
ofSetColor(whiteVal);
ofDrawCircle(points[i].x, points[i].y, pointSize[i]*0.75);
}
}
示例11: QFrame
ProgressFrame::ProgressFrame( QWidget *parent ) :
QFrame( parent ),
m_itemType( 0 ),
m_progressEnabled( false ),
m_clockEnabled( false ),
m_reverse( false ),
m_watch( NULL ),
m_value( 0 )
{
m_textPushTimer.setSingleShot( true );
connect( &m_textPushTimer, SIGNAL( timeout() ), this, SLOT( popText() ) );
m_clockPushTimer.setSingleShot( true );
connect( &m_clockPushTimer, SIGNAL( timeout() ), this, SLOT( popClockText() ) );
setMinimumHeight( 22 );
setMinimumWidth( 22 );
setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
setLineWidth( 1 );
}
示例12: QWidget
DrawingPad::DrawingPad(QWidget *parent)
: QWidget(parent)
, m_shapeType(Shape::TYPE_FREEHAND)
{
setAutoFillBackground(true);
setPalette(Qt::white);
FreeHandMaker *freeHandMaker = new FreeHandMaker();
RectangleMaker *rectangleMaker = new RectangleMaker();
m_shapeMakerMap[Shape::TYPE_FREEHAND] = freeHandMaker;
m_shapeMakerMap[Shape::TYPE_RECTANGLE] = rectangleMaker;
connect(freeHandMaker,SIGNAL(newShapeAvailable()),this,SLOT(newShapeAvailable()));
connect(rectangleMaker,SIGNAL(newShapeAvailable()),this,SLOT(newShapeAvailable()));
setLineColor(Qt::black);
setLineWidth(0);
}
示例13: ExpandingTree
KateArgumentHintTree::KateArgumentHintTree( KateCompletionWidget* parent ) : ExpandingTree(0), m_parent(parent) { //Do not use the completion-widget as widget-parent, because the argument-hint-tree will be rendered separately
setFrameStyle( QFrame::Box | QFrame::Plain );
setLineWidth( 1 );
connect( parent, SIGNAL(destroyed(QObject*)), this, SLOT(deleteLater()) );
setFrameStyle(QFrame::NoFrame);
setFrameStyle( QFrame::Box | QFrame::Plain );
setFocusPolicy(Qt::NoFocus);
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint);
setUniformRowHeights(false);
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
header()->hide();
setRootIsDecorated(false);
setIndentation(0);
setAllColumnsShowFocus(true);
setAlternatingRowColors(true);
setItemDelegate(new KateCompletionDelegate(parent->argumentHintModel(), parent));
}
示例14: foreach
void Hairpin::read(XmlReader& e)
{
foreach(SpannerSegment* seg, spannerSegments())
delete seg;
spannerSegments().clear();
int id = e.intAttribute("id", -1);
e.addSpanner(id, this);
while (e.readNextStartElement()) {
const QStringRef& tag(e.name());
if (tag == "subtype")
setHairpinType(Type(e.readInt()));
else if (tag == "lineWidth") {
setLineWidth(Spatium(e.readDouble()));
lineWidthStyle = PropertyStyle::UNSTYLED;
}
else if (tag == "hairpinHeight") {
setHairpinHeight(Spatium(e.readDouble()));
hairpinHeightStyle = PropertyStyle::UNSTYLED;
}
else if (tag == "hairpinContHeight") {
setHairpinContHeight(Spatium(e.readDouble()));
hairpinContHeightStyle = PropertyStyle::UNSTYLED;
}
else if (tag == "hairpinCircledTip")
_hairpinCircledTip = e.readInt();
else if (tag == "veloChange")
_veloChange = e.readInt();
else if (tag == "dynType")
_dynRange = Dynamic::Range(e.readInt());
else if (tag == "useTextLine") { // obsolete
e.readInt();
if (hairpinType() == Type::CRESC_HAIRPIN)
setHairpinType(Type::CRESC_LINE);
else if (hairpinType() == Type::DECRESC_HAIRPIN)
setHairpinType(Type::DECRESC_LINE);
}
else if (!TextLine::readProperties(e))
e.unknown();
}
}
示例15: switch
bool Ambitus::setProperty(Pid propertyId, const QVariant& v)
{
switch (propertyId) {
case Pid::HEAD_GROUP:
setNoteHeadGroup( NoteHead::Group(v.toInt()) );
break;
case Pid::HEAD_TYPE:
setNoteHeadType( NoteHead::Type(v.toInt()) );
break;
case Pid::MIRROR_HEAD:
setDirection(MScore::DirectionH(v.toInt()) );
break;
case Pid::GHOST: // recycled property = _hasLine
setHasLine(v.toBool());
break;
case Pid::LINE_WIDTH:
setLineWidth(v.value<Spatium>());
break;
case Pid::TPC1:
setTopTpc(v.toInt());
break;
case Pid::FBPARENTHESIS1: // recycled property = _bottomTpc
setBottomTpc(v.toInt());
break;
case Pid::PITCH:
setTopPitch(v.toInt());
break;
case Pid::FBPARENTHESIS2: // recycled property = _bottomPitch
setBottomPitch(v.toInt());
break;
case Pid::FBPARENTHESIS3: // recycled property = octave of _topPitch
setTopPitch(topPitch() % 12 + v.toInt() * 12);
break;
case Pid::FBPARENTHESIS4: // recycled property = octave of _bottomPitch
setBottomPitch(bottomPitch() % 12 + v.toInt() * 12);
break;
default:
return Element::setProperty(propertyId, v);
}
triggerLayout();
return true;
}