本文整理汇总了C++中setLineWidth函数的典型用法代码示例。如果您正苦于以下问题:C++ setLineWidth函数的具体用法?C++ setLineWidth怎么用?C++ setLineWidth使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setLineWidth函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:Adoni,项目名称:WiEngine,代码行数:17,代码来源:wyBitmapFontLabel.cpp
示例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;
}
开发者ID:szmurlor,项目名称:fiver,代码行数:45,代码来源:moc_qwt_dial.cpp
示例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 );
}
开发者ID:Narsil,项目名称:QWave,代码行数:18,代码来源:inboxbuttonview.cpp
示例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;
}
开发者ID:mulfycrowh,项目名称:MuseScore,代码行数:18,代码来源:volta.cpp
示例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);
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:18,代码来源:QvisAbstractOpacityBar.C
示例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);
}
开发者ID:Artanomell,项目名称:schat,代码行数:18,代码来源:ImageView.cpp
示例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;
}
开发者ID:venkatarajasekhar,项目名称:ECE497,代码行数:44,代码来源:moc_qframe.cpp
示例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 ();
}
开发者ID:ainehanta,项目名称:J1program,代码行数:44,代码来源:kitty.c
示例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);
}
开发者ID:jeez,项目名称:iqr,代码行数:19,代码来源:wGraphFrame.cpp
示例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);
}
}
开发者ID:andymasteroffish,项目名称:sequencer_visuals,代码行数:19,代码来源:DotPolygonHit.cpp
示例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 );
}
开发者ID:exic,项目名称:last.fm-dbus,代码行数:19,代码来源:progressframe.cpp
示例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);
}
开发者ID:osamu-k,项目名称:QtStudy,代码行数:19,代码来源:drawingpad.cpp
示例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));
}
开发者ID:ktuan89,项目名称:kate-4.8.0,代码行数:19,代码来源:kateargumenthinttree.cpp
示例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();
}
}
开发者ID:shredpub,项目名称:MuseScore,代码行数:42,代码来源:hairpin.cpp
示例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;
}
开发者ID:IsaacWeiss,项目名称:MuseScore,代码行数:42,代码来源:ambitus.cpp
示例16: switch
bool TremoloBar::setProperty(Pid propertyId, const QVariant& v)
{
switch (propertyId) {
case Pid::LINE_WIDTH:
lineWidthStyle = PropertyFlags::UNSTYLED;
setLineWidth(v.value<Spatium>());
break;
case Pid::MAG:
setUserMag(v.toDouble());
break;
case Pid::PLAY:
setPlay(v.toBool());
score()->setPlaylistDirty();
break;
default:
return Element::setProperty(propertyId, v);
}
score()->setLayoutAll();
return true;
}
开发者ID:CammyVee,项目名称:MuseScore,代码行数:20,代码来源:tremolobar.cpp
示例17: QTextEdit
LineNumberDisplay::LineNumberDisplay(QTextEdit *te, QWidget *parent)
: QTextEdit(parent), d_text_edit(te)
{
setReadOnly(true);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setFrameStyle(QFrame::Panel | QFrame::Raised);
setMaximumWidth(0);
setLineWidth(0);
setFocusPolicy(Qt::NoFocus);
setCurrentFont(te->currentFont());
if (te) {
connect(te->document(), SIGNAL(contentsChanged()), this, SLOT(updateLineNumbers()));
connect((QObject *)te->verticalScrollBar(), SIGNAL(valueChanged(int)),
(QObject *)verticalScrollBar(), SLOT(setValue(int)));
connect(te, SIGNAL(currentCharFormatChanged (const QTextCharFormat &)),
this, SLOT(changeCharFormat (const QTextCharFormat &)));
}
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:20,代码来源:LineNumberDisplay.cpp
示例18: QGraphicsView
ImageView::ImageView(QWidget* parent):
QGraphicsView(parent),
scene_(new QGraphicsScene(this)),
imageItem_(new QGraphicsRectItem()),
gifMovie_(nullptr),
cacheTimer_(nullptr),
cursorTimer_(nullptr),
scaleFactor_(1.0),
autoZoomFit_(false),
isSVG(false) {
setViewportMargins(0, 0, 0, 0);
setContentsMargins(0, 0, 0, 0);
setLineWidth(0);
setScene(scene_);
imageItem_->hide();
imageItem_->setPen(QPen(Qt::NoPen)); // remove the border
scene_->addItem(imageItem_);
}
开发者ID:Pr0Wolf29,项目名称:lximage-qt,代码行数:20,代码来源:imageview.cpp
示例19: QFrame
StatusLabel::StatusLabel(QWidget * parent)
: QFrame(parent)
{
setFrameStyle(QFrame::Panel | QFrame::Sunken);
setLineWidth(1);
// setStyleSheet("* { background-color: rgb(245, 245, 5); }");
label = new QLabel();
QFont font = label->font();
font.setPixelSize(11);
label->setFont(font);
label->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
QHBoxLayout * layout = new QHBoxLayout();
layout->addWidget(label);
layout->setMargin(0);
layout->setContentsMargins(2, 0, 0, 0);
setLayout(layout);
setStyleSheet("* { color: rgb(80, 80, 80); }");
}
开发者ID:marbl,项目名称:gingr,代码行数:20,代码来源:StatusLabel.cpp
示例20: QwtPlot
BasicPlot::BasicPlot(QWidget *parent) :
QwtPlot(parent)
{
setFrameStyle(QFrame::NoFrame);
setLineWidth(0);
setCanvasLineWidth(2);
plotLayout()->setAlignCanvasToScales(true);
QwtPlotGrid *grid = new QwtPlotGrid;
grid->setMajPen(QPen(Qt::gray, 0, Qt::DotLine));
grid->attach(this);
setCanvasBackground(QColor(29, 100, 141)); // nice blue
// enable zooming
Zoomer *zoomer = new Zoomer(canvas());
zoomer->setRubberBandPen(QPen(Qt::white, 2, Qt::DotLine));
zoomer->setTrackerPen(QPen(Qt::white));
QObject::connect(this, SIGNAL(setNewBase(QwtScaleDiv*,QwtScaleDiv*)), zoomer,
SLOT(setNewBase(QwtScaleDiv*,QwtScaleDiv*)));
}
开发者ID:RTXI,项目名称:plot-lib,代码行数:20,代码来源:basicplot.cpp
注:本文中的setLineWidth函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论