Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

<qdrawutil.h> - Drawing Utility Functions

    Functions

    voidqDrawBorderPixmap(QPainter * painter, const QRect & target, const QMargins & margins, const QPixmap & pixmap)
    voidqDrawPlainRect(QPainter * painter, int x, int y, int width, int height, const QColor & lineColor, int lineWidth = 1, const QBrush * fill = 0)
    voidqDrawPlainRect(QPainter * painter, const QRect & rect, const QColor & lineColor, int lineWidth = 1, const QBrush * fill = 0)
    voidqDrawShadeLine(QPainter * painter, int x1, int y1, int x2, int y2, const QPalette & palette, bool sunken = true, int lineWidth = 1, int midLineWidth = 0)
    voidqDrawShadeLine(QPainter * painter, const QPoint & p1, const QPoint & p2, const QPalette & palette, bool sunken = true, int lineWidth = 1, int midLineWidth = 0)
    voidqDrawShadePanel(QPainter * painter, int x, int y, int width, int height, const QPalette & palette, bool sunken = false, int lineWidth = 1, const QBrush * fill = 0)
    voidqDrawShadePanel(QPainter * painter, const QRect & rect, const QPalette & palette, bool sunken = false, int lineWidth = 1, const QBrush * fill = 0)
    voidqDrawShadeRect(QPainter * painter, int x, int y, int width, int height, const QPalette & palette, bool sunken = false, int lineWidth = 1, int midLineWidth = 0, const QBrush * fill = 0)
    voidqDrawShadeRect(QPainter * painter, const QRect & rect, const QPalette & palette, bool sunken = false, int lineWidth = 1, int midLineWidth = 0, const QBrush * fill = 0)
    voidqDrawWinButton(QPainter * painter, int x, int y, int width, int height, const QPalette & palette, bool sunken = false, const QBrush * fill = 0)
    voidqDrawWinButton(QPainter * painter, const QRect & rect, const QPalette & palette, bool sunken = false, const QBrush * fill = 0)
    voidqDrawWinPanel(QPainter * painter, int x, int y, int width, int height, const QPalette & palette, bool sunken = false, const QBrush * fill = 0)

    See alsoQPainter.

    Function Documentation

    voidqDrawBorderPixmap(QPainter * painter, constQRect & target, constQMargins & margins, constQPixmap & pixmap)

    This is an overloaded function.

    The qDrawBorderPixmap function is for drawing a pixmap into the margins of a rectangle.

    Draws the givenpixmap into the giventarget rectangle, using the givenpainter. The pixmap will be split into nine segments and drawn according to themargins structure.

    This function was introduced in Qt 4.6.

    voidqDrawPlainRect(QPainter * painter,int x,int y,int width,int height, constQColor & lineColor,int lineWidth = 1, constQBrush * fill = 0)

    Draws the plain rectangle beginning at (x,y) with the givenwidth andheight, using the specifiedpainter,lineColor andlineWidth. The rectangle's interior is filled with thefill brush unlessfill is 0.

    Warning: This function does not look atQWidget::style() orQApplication::style(). Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    Alternatively you can use aQFrame widget and apply theQFrame::setFrameStyle() function to display a plain rectangle:

    QFrame frame:frame.setFrameStyle(QFrame::Box|QFrame::Plain);

    See alsoqDrawShadeRect() andQStyle.

    voidqDrawPlainRect(QPainter * painter, constQRect & rect, constQColor & lineColor,int lineWidth = 1, constQBrush * fill = 0)

    This is an overloaded function.

    Draws the plain rectangle specified byrect using the givenpainter,lineColor andlineWidth. The rectangle's interior is filled with thefill brush unlessfill is 0.

    Warning: This function does not look atQWidget::style() orQApplication::style(). Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    Alternatively you can use aQFrame widget and apply theQFrame::setFrameStyle() function to display a plain rectangle:

    QFrame frame:frame.setFrameStyle(QFrame::Box|QFrame::Plain);

    See alsoqDrawShadeRect() andQStyle.

    voidqDrawShadeLine(QPainter * painter,int x1,int y1,int x2,int y2, constQPalette & palette,bool sunken = true,int lineWidth = 1,int midLineWidth = 0)

    Draws a horizontal (y1 ==y2) or vertical (x1 ==x2) shaded line using the givenpainter. Note that nothing is drawn ify1 !=y2 andx1 !=x2 (i.e. the line is neither horizontal nor vertical).

    The providedpalette specifies the shading colors (light,dark andmiddle colors). The givenlineWidth specifies the line width for each of the lines; it is not the total line width. The givenmidLineWidth specifies the width of a middle line drawn in theQPalette::mid() color.

    The line appears sunken ifsunken is true, otherwise raised.

    Warning: This function does not look atQWidget::style() orQApplication::style(). Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    Alternatively you can use aQFrame widget and apply theQFrame::setFrameStyle() function to display a shaded line:

    QFrame frame:frame.setFrameStyle(QFrame::HLine|QFrame::Sunken);

    See alsoqDrawShadeRect(),qDrawShadePanel(), andQStyle.

    voidqDrawShadeLine(QPainter * painter, constQPoint & p1, constQPoint & p2, constQPalette & palette,bool sunken = true,int lineWidth = 1,int midLineWidth = 0)

    This is an overloaded function.

    Draws a horizontal or vertical shaded line betweenp1 andp2 using the givenpainter. Note that nothing is drawn if the line between the points would be neither horizontal nor vertical.

    The providedpalette specifies the shading colors (light,dark andmiddle colors). The givenlineWidth specifies the line width for each of the lines; it is not the total line width. The givenmidLineWidth specifies the width of a middle line drawn in theQPalette::mid() color.

    The line appears sunken ifsunken is true, otherwise raised.

    Warning: This function does not look atQWidget::style() orQApplication::style(). Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    Alternatively you can use aQFrame widget and apply theQFrame::setFrameStyle() function to display a shaded line:

    QFrame frame:frame.setFrameStyle(QFrame::HLine|QFrame::Sunken);

    See alsoqDrawShadeRect(),qDrawShadePanel(), andQStyle.

    voidqDrawShadePanel(QPainter * painter,int x,int y,int width,int height, constQPalette & palette,bool sunken = false,int lineWidth = 1, constQBrush * fill = 0)

    Draws the shaded panel beginning at (x,y) with the givenwidth andheight using the providedpainter and the givenlineWidth.

    The givenpalette specifies the shading colors (light,dark andmiddle colors). The panel's interior is filled with thefill brush unlessfill is 0.

    The panel appears sunken ifsunken is true, otherwise raised.

    Warning: This function does not look atQWidget::style() orQApplication::style(). Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    Alternatively you can use aQFrame widget and apply theQFrame::setFrameStyle() function to display a shaded panel:

    QFrame frame:frame.setFrameStyle(QFrame::Panel|QFrame::Sunken);

    See alsoqDrawWinPanel(),qDrawShadeLine(),qDrawShadeRect(), andQStyle.

    voidqDrawShadePanel(QPainter * painter, constQRect & rect, constQPalette & palette,bool sunken = false,int lineWidth = 1, constQBrush * fill = 0)

    This is an overloaded function.

    Draws the shaded panel at the rectangle specified byrect using the givenpainter and the givenlineWidth.

    The givenpalette specifies the shading colors (light,dark andmiddle colors). The panel's interior is filled with thefill brush unlessfill is 0.

    The panel appears sunken ifsunken is true, otherwise raised.

    Warning: This function does not look atQWidget::style() orQApplication::style(). Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    Alternatively you can use aQFrame widget and apply theQFrame::setFrameStyle() function to display a shaded panel:

    QFrame frame:frame.setFrameStyle(QFrame::Panel|QFrame::Sunken);

    See alsoqDrawWinPanel(),qDrawShadeLine(),qDrawShadeRect(), andQStyle.

    voidqDrawShadeRect(QPainter * painter,int x,int y,int width,int height, constQPalette & palette,bool sunken = false,int lineWidth = 1,int midLineWidth = 0, constQBrush * fill = 0)

    Draws the shaded rectangle beginning at (x,y) with the givenwidth andheight using the providedpainter.

    The providepalette specifies the shading colors (light,dark andmiddle colors. The givenlineWidth specifies the line width for each of the lines; it is not the total line width. ThemidLineWidth specifies the width of a middle line drawn in theQPalette::mid() color. The rectangle's interior is filled with thefill brush unlessfill is 0.

    The rectangle appears sunken ifsunken is true, otherwise raised.

    Warning: This function does not look atQWidget::style() orQApplication::style(). Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    Alternatively you can use aQFrame widget and apply theQFrame::setFrameStyle() function to display a shaded rectangle:

    QFrame frame:frame.setFrameStyle(QFrame::Box|QFrame::Raised);

    See alsoqDrawShadeLine(),qDrawShadePanel(),qDrawPlainRect(), andQStyle.

    voidqDrawShadeRect(QPainter * painter, constQRect & rect, constQPalette & palette,bool sunken = false,int lineWidth = 1,int midLineWidth = 0, constQBrush * fill = 0)

    This is an overloaded function.

    Draws the shaded rectangle specified byrect using the givenpainter.

    The providepalette specifies the shading colors (light,dark andmiddle colors. The givenlineWidth specifies the line width for each of the lines; it is not the total line width. ThemidLineWidth specifies the width of a middle line drawn in theQPalette::mid() color. The rectangle's interior is filled with thefill brush unlessfill is 0.

    The rectangle appears sunken ifsunken is true, otherwise raised.

    Warning: This function does not look atQWidget::style() orQApplication::style(). Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    Alternatively you can use aQFrame widget and apply theQFrame::setFrameStyle() function to display a shaded rectangle:

    QFrame frame:frame.setFrameStyle(QFrame::Box|QFrame::Raised);

    See alsoqDrawShadeLine(),qDrawShadePanel(),qDrawPlainRect(), andQStyle.

    voidqDrawWinButton(QPainter * painter,int x,int y,int width,int height, constQPalette & palette,bool sunken = false, constQBrush * fill = 0)

    Draws the Windows-style button specified by the given point (x,y},width andheight using the providedpainter with a line width of 2 pixels. The button's interior is filled with thefill brush unlessfill is 0.

    The givenpalette specifies the shading colors (light,dark andmiddle colors).

    The button appears sunken ifsunken is true, otherwise raised.

    Warning: This function does not look atQWidget::style() orQApplication::style()-> Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    See alsoqDrawWinPanel() andQStyle.

    voidqDrawWinButton(QPainter * painter, constQRect & rect, constQPalette & palette,bool sunken = false, constQBrush * fill = 0)

    This is an overloaded function.

    Draws the Windows-style button at the rectangle specified byrect using the givenpainter with a line width of 2 pixels. The button's interior is filled with thefill brush unlessfill is 0.

    The givenpalette specifies the shading colors (light,dark andmiddle colors).

    The button appears sunken ifsunken is true, otherwise raised.

    Warning: This function does not look atQWidget::style() orQApplication::style()-> Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    See alsoqDrawWinPanel() andQStyle.

    voidqDrawWinPanel(QPainter * painter,int x,int y,int width,int height, constQPalette & palette,bool sunken = false, constQBrush * fill = 0)

    Draws the Windows-style panel specified by the given point(x,y),width andheight using the providedpainter with a line width of 2 pixels. The button's interior is filled with thefill brush unlessfill is 0.

    The givenpalette specifies the shading colors. The panel appears sunken ifsunken is true, otherwise raised.

    Warning: This function does not look atQWidget::style() orQApplication::style(). Use the drawing functions inQStyle to make widgets that follow the current GUI style.

    Alternatively you can use aQFrame widget and apply theQFrame::setFrameStyle() function to display a shaded panel:

    QFrame frame:frame.setFrameStyle(QFrame::WinPanel|QFrame::Raised);

    See alsoqDrawShadePanel(),qDrawWinButton(), andQStyle.

    © 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


    [8]ページ先頭

    ©2009-2025 Movatter.jp