1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550
|
// qtextformat.sip generated by MetaSIP
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2018 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QTextLength
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
enum Type
{
VariableLength,
FixedLength,
PercentageLength,
};
QTextLength();
QTextLength::Type type() const;
QTextLength(QTextLength::Type atype, qreal avalue);
qreal value(qreal maximumLength) const;
qreal rawValue() const;
bool operator==(const QTextLength &other) const;
bool operator!=(const QTextLength &other) const;
QTextLength(const QVariant &variant /GetWrapper/) /NoDerived/;
%MethodCode
if (a0->canConvert<QTextLength>())
sipCpp = new QTextLength(a0->value<QTextLength>());
else
sipError = sipBadCallableArg(0, a0Wrapper);
%End
};
QDataStream &operator<<(QDataStream &, const QTextLength & /Constrained/) /ReleaseGIL/;
QDataStream &operator>>(QDataStream &, QTextLength & /Constrained/) /ReleaseGIL/;
class QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
enum FormatType
{
InvalidFormat,
BlockFormat,
CharFormat,
ListFormat,
TableFormat,
FrameFormat,
UserFormat,
};
enum ObjectTypes
{
NoObject,
ImageObject,
TableObject,
TableCellObject,
UserObject,
};
enum PageBreakFlag
{
PageBreak_Auto,
PageBreak_AlwaysBefore,
PageBreak_AlwaysAfter,
};
typedef QFlags<QTextFormat::PageBreakFlag> PageBreakFlags;
enum Property
{
ObjectIndex,
CssFloat,
LayoutDirection,
OutlinePen,
BackgroundBrush,
ForegroundBrush,
BlockAlignment,
BlockTopMargin,
BlockBottomMargin,
BlockLeftMargin,
BlockRightMargin,
TextIndent,
BlockIndent,
BlockNonBreakableLines,
BlockTrailingHorizontalRulerWidth,
FontFamily,
FontPointSize,
FontSizeAdjustment,
FontSizeIncrement,
FontWeight,
FontItalic,
FontUnderline,
FontOverline,
FontStrikeOut,
FontFixedPitch,
FontPixelSize,
TextUnderlineColor,
TextVerticalAlignment,
TextOutline,
IsAnchor,
AnchorHref,
AnchorName,
ObjectType,
ListStyle,
ListIndent,
FrameBorder,
FrameMargin,
FramePadding,
FrameWidth,
FrameHeight,
TableColumns,
TableColumnWidthConstraints,
TableCellSpacing,
TableCellPadding,
TableCellRowSpan,
TableCellColumnSpan,
ImageName,
ImageWidth,
ImageHeight,
TextUnderlineStyle,
TableHeaderRowCount,
FullWidthSelection,
PageBreakPolicy,
TextToolTip,
FrameTopMargin,
FrameBottomMargin,
FrameLeftMargin,
FrameRightMargin,
FrameBorderBrush,
FrameBorderStyle,
BackgroundImageUrl,
TabPositions,
FirstFontProperty,
FontCapitalization,
FontLetterSpacing,
FontWordSpacing,
LastFontProperty,
TableCellTopPadding,
TableCellBottomPadding,
TableCellLeftPadding,
TableCellRightPadding,
FontStyleHint,
FontStyleStrategy,
FontKerning,
LineHeight,
LineHeightType,
FontHintingPreference,
ListNumberPrefix,
ListNumberSuffix,
FontStretch,
FontLetterSpacingType,
UserProperty,
};
QTextFormat();
explicit QTextFormat(int type);
QTextFormat(const QTextFormat &rhs);
QTextFormat(const QVariant &variant /GetWrapper/) /NoDerived/;
%MethodCode
if (a0->canConvert<QTextFormat>())
sipCpp = new QTextFormat(a0->value<QTextFormat>());
else
sipError = sipBadCallableArg(0, a0Wrapper);
%End
~QTextFormat();
void merge(const QTextFormat &other);
bool isValid() const;
int type() const;
int objectIndex() const;
void setObjectIndex(int object);
QVariant property(int propertyId) const;
void setProperty(int propertyId, const QVariant &value);
void clearProperty(int propertyId);
bool hasProperty(int propertyId) const;
bool boolProperty(int propertyId) const;
int intProperty(int propertyId) const;
qreal doubleProperty(int propertyId) const;
QString stringProperty(int propertyId) const;
QColor colorProperty(int propertyId) const;
QPen penProperty(int propertyId) const;
QBrush brushProperty(int propertyId) const;
QTextLength lengthProperty(int propertyId) const;
QVector<QTextLength> lengthVectorProperty(int propertyId) const;
void setProperty(int propertyId, const QVector<QTextLength> &lengths);
QMap<int, QVariant> properties() const;
int objectType() const;
bool isCharFormat() const;
bool isBlockFormat() const;
bool isListFormat() const;
bool isFrameFormat() const;
bool isImageFormat() const;
bool isTableFormat() const;
QTextBlockFormat toBlockFormat() const;
QTextCharFormat toCharFormat() const;
QTextListFormat toListFormat() const;
QTextTableFormat toTableFormat() const;
QTextFrameFormat toFrameFormat() const;
QTextImageFormat toImageFormat() const;
bool operator==(const QTextFormat &rhs) const;
bool operator!=(const QTextFormat &rhs) const;
void setLayoutDirection(Qt::LayoutDirection direction);
Qt::LayoutDirection layoutDirection() const;
void setBackground(const QBrush &brush);
QBrush background() const;
void clearBackground();
void setForeground(const QBrush &brush);
QBrush foreground() const;
void clearForeground();
void setObjectType(int atype);
int propertyCount() const;
bool isTableCellFormat() const;
QTextTableCellFormat toTableCellFormat() const;
void swap(QTextFormat &other /Constrained/);
%If (Qt_5_3_0 -)
bool isEmpty() const;
%End
};
QDataStream &operator<<(QDataStream &, const QTextFormat & /Constrained/) /ReleaseGIL/;
QDataStream &operator>>(QDataStream &, QTextFormat & /Constrained/) /ReleaseGIL/;
class QTextCharFormat : QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
enum VerticalAlignment
{
AlignNormal,
AlignSuperScript,
AlignSubScript,
AlignMiddle,
AlignTop,
AlignBottom,
AlignBaseline,
};
QTextCharFormat();
bool isValid() const;
void setFont(const QFont &font);
QFont font() const;
void setFontFamily(const QString &family);
QString fontFamily() const;
void setFontPointSize(qreal size);
qreal fontPointSize() const;
void setFontWeight(int weight);
int fontWeight() const;
void setFontItalic(bool italic);
bool fontItalic() const;
void setFontUnderline(bool underline);
bool fontUnderline() const;
void setFontOverline(bool overline);
bool fontOverline() const;
void setFontStrikeOut(bool strikeOut);
bool fontStrikeOut() const;
void setUnderlineColor(const QColor &color);
QColor underlineColor() const;
void setFontFixedPitch(bool fixedPitch);
bool fontFixedPitch() const;
void setVerticalAlignment(QTextCharFormat::VerticalAlignment alignment);
QTextCharFormat::VerticalAlignment verticalAlignment() const;
void setAnchor(bool anchor);
bool isAnchor() const;
void setAnchorHref(const QString &value);
QString anchorHref() const;
int tableCellRowSpan() const;
int tableCellColumnSpan() const;
void setTableCellRowSpan(int atableCellRowSpan);
void setTableCellColumnSpan(int atableCellColumnSpan);
void setTextOutline(const QPen &pen);
QPen textOutline() const;
enum UnderlineStyle
{
NoUnderline,
SingleUnderline,
DashUnderline,
DotLine,
DashDotLine,
DashDotDotLine,
WaveUnderline,
SpellCheckUnderline,
};
void setUnderlineStyle(QTextCharFormat::UnderlineStyle style);
QTextCharFormat::UnderlineStyle underlineStyle() const;
void setToolTip(const QString &tip);
QString toolTip() const;
void setAnchorNames(const QStringList &names);
QStringList anchorNames() const;
void setFontCapitalization(QFont::Capitalization capitalization);
QFont::Capitalization fontCapitalization() const;
void setFontLetterSpacing(qreal spacing);
qreal fontLetterSpacing() const;
void setFontWordSpacing(qreal spacing);
qreal fontWordSpacing() const;
void setFontStyleHint(QFont::StyleHint hint, QFont::StyleStrategy strategy = QFont::PreferDefault);
void setFontStyleStrategy(QFont::StyleStrategy strategy);
QFont::StyleHint fontStyleHint() const;
QFont::StyleStrategy fontStyleStrategy() const;
void setFontKerning(bool enable);
bool fontKerning() const;
void setFontHintingPreference(QFont::HintingPreference hintingPreference);
QFont::HintingPreference fontHintingPreference() const;
int fontStretch() const;
void setFontStretch(int factor);
void setFontLetterSpacingType(QFont::SpacingType letterSpacingType);
QFont::SpacingType fontLetterSpacingType() const;
%If (Qt_5_3_0 -)
enum FontPropertiesInheritanceBehavior
{
FontPropertiesSpecifiedOnly,
FontPropertiesAll,
};
%End
%If (Qt_5_3_0 -)
void setFont(const QFont &font, QTextCharFormat::FontPropertiesInheritanceBehavior behavior);
%End
};
class QTextBlockFormat : QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextBlockFormat();
bool isValid() const;
Qt::Alignment alignment() const;
void setTopMargin(qreal margin);
qreal topMargin() const;
void setBottomMargin(qreal margin);
qreal bottomMargin() const;
void setLeftMargin(qreal margin);
qreal leftMargin() const;
void setRightMargin(qreal margin);
qreal rightMargin() const;
void setTextIndent(qreal margin);
qreal textIndent() const;
int indent() const;
void setNonBreakableLines(bool b);
bool nonBreakableLines() const;
void setAlignment(Qt::Alignment aalignment);
void setIndent(int aindent);
void setPageBreakPolicy(QTextFormat::PageBreakFlags flags);
QTextFormat::PageBreakFlags pageBreakPolicy() const;
void setTabPositions(const QList<QTextOption::Tab> &tabs);
QList<QTextOption::Tab> tabPositions() const;
enum LineHeightTypes
{
SingleHeight,
ProportionalHeight,
FixedHeight,
MinimumHeight,
LineDistanceHeight,
};
void setLineHeight(qreal height, int heightType);
qreal lineHeight(qreal scriptLineHeight, qreal scaling) const [qreal (qreal scriptLineHeight, qreal scaling = 1.0e+0)];
qreal lineHeight() const;
int lineHeightType() const;
};
class QTextListFormat : QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextListFormat();
bool isValid() const;
enum Style
{
ListDisc,
ListCircle,
ListSquare,
ListDecimal,
ListLowerAlpha,
ListUpperAlpha,
ListLowerRoman,
ListUpperRoman,
};
QTextListFormat::Style style() const;
int indent() const;
void setStyle(QTextListFormat::Style astyle);
void setIndent(int aindent);
QString numberPrefix() const;
QString numberSuffix() const;
void setNumberPrefix(const QString &np);
void setNumberSuffix(const QString &ns);
};
class QTextImageFormat : QTextCharFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextImageFormat();
bool isValid() const;
QString name() const;
qreal width() const;
qreal height() const;
void setName(const QString &aname);
void setWidth(qreal awidth);
void setHeight(qreal aheight);
};
class QTextFrameFormat : QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextFrameFormat();
bool isValid() const;
enum Position
{
InFlow,
FloatLeft,
FloatRight,
};
void setPosition(QTextFrameFormat::Position f);
QTextFrameFormat::Position position() const;
qreal border() const;
qreal margin() const;
qreal padding() const;
void setWidth(const QTextLength &length);
QTextLength width() const;
QTextLength height() const;
void setBorder(qreal aborder);
void setMargin(qreal amargin);
void setPadding(qreal apadding);
void setWidth(qreal awidth);
void setHeight(qreal aheight);
void setHeight(const QTextLength &aheight);
void setPageBreakPolicy(QTextFormat::PageBreakFlags flags);
QTextFormat::PageBreakFlags pageBreakPolicy() const;
enum BorderStyle
{
BorderStyle_None,
BorderStyle_Dotted,
BorderStyle_Dashed,
BorderStyle_Solid,
BorderStyle_Double,
BorderStyle_DotDash,
BorderStyle_DotDotDash,
BorderStyle_Groove,
BorderStyle_Ridge,
BorderStyle_Inset,
BorderStyle_Outset,
};
void setBorderBrush(const QBrush &brush);
QBrush borderBrush() const;
void setBorderStyle(QTextFrameFormat::BorderStyle style);
QTextFrameFormat::BorderStyle borderStyle() const;
qreal topMargin() const;
qreal bottomMargin() const;
qreal leftMargin() const;
qreal rightMargin() const;
void setTopMargin(qreal amargin);
void setBottomMargin(qreal amargin);
void setLeftMargin(qreal amargin);
void setRightMargin(qreal amargin);
};
class QTextTableFormat : QTextFrameFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextTableFormat();
bool isValid() const;
int columns() const;
void setColumnWidthConstraints(const QVector<QTextLength> &constraints);
QVector<QTextLength> columnWidthConstraints() const;
void clearColumnWidthConstraints();
qreal cellSpacing() const;
void setCellSpacing(qreal spacing);
qreal cellPadding() const;
Qt::Alignment alignment() const;
void setColumns(int acolumns);
void setCellPadding(qreal apadding);
void setAlignment(Qt::Alignment aalignment);
void setHeaderRowCount(int count);
int headerRowCount() const;
};
QFlags<QTextFormat::PageBreakFlag> operator|(QTextFormat::PageBreakFlag f1, QFlags<QTextFormat::PageBreakFlag> f2);
class QTextTableCellFormat : QTextCharFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextTableCellFormat();
bool isValid() const;
void setTopPadding(qreal padding);
qreal topPadding() const;
void setBottomPadding(qreal padding);
qreal bottomPadding() const;
void setLeftPadding(qreal padding);
qreal leftPadding() const;
void setRightPadding(qreal padding);
qreal rightPadding() const;
void setPadding(qreal padding);
};
|