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 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
|
// qtextformat.sip generated by MetaSIP on Fri Apr 16 11:32:08 2010
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt.
//
// This file may be used under the terms of the GNU General Public
// License versions 2.0 or 3.0 as published by the Free Software
// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
// included in the packaging of this file. Alternatively you may (at
// your option) use any later version of the GNU General Public
// License if such license has been publicly approved by Riverbank
// Computing Limited (or its successors, if any) and the KDE Free Qt
// Foundation. In addition, as a special exception, Riverbank gives you
// certain additional rights. These rights are described in the Riverbank
// GPL Exception version 1.1, which can be found in the file
// GPL_EXCEPTION.txt in this package.
//
// Please review the following information to ensure GNU General
// Public Licensing requirements will be met:
// http://trolltech.com/products/qt/licenses/licensing/opensource/. If
// you are unsure which license is appropriate for your use, please
// review the following information:
// http://trolltech.com/products/qt/licenses/licensing/licensingoverview
// or contact the sales department at sales@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.
%ModuleCode
#include <qtextformat.h>
%End
class QTextLength
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
enum Type
{
VariableLength,
FixedLength,
PercentageLength,
};
QTextLength();
QTextLength::Type type() const;
QTextLength(QTextLength::Type, qreal);
qreal value(qreal) const;
qreal rawValue() const;
bool operator==(const QTextLength &) const;
bool operator!=(const QTextLength &) const;
QTextLength(const QVariant &variant) /NoDerived/;
%MethodCode
sipCpp = new QTextLength(qVariantValue<QTextLength>(*a0));
%End
};
QDataStream &operator<<(QDataStream &, const QTextLength & /Constrained/);
QDataStream &operator>>(QDataStream &, QTextLength & /Constrained/);
class QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
enum FormatType
{
InvalidFormat,
BlockFormat,
CharFormat,
ListFormat,
TableFormat,
FrameFormat,
UserFormat,
};
enum ObjectTypes
{
NoObject,
ImageObject,
TableObject,
%If (Qt_4_4_0 -)
TableCellObject,
%End
UserObject,
};
%If (Qt_4_2_0 -)
enum PageBreakFlag
{
PageBreak_Auto,
PageBreak_AlwaysBefore,
PageBreak_AlwaysAfter,
};
%End
%If (Qt_4_2_0 -)
typedef QFlags<QTextFormat::PageBreakFlag> PageBreakFlags;
%End
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,
%If (Qt_4_2_0 -)
TextUnderlineStyle,
%End
%If (Qt_4_2_0 -)
TableHeaderRowCount,
%End
%If (Qt_4_2_0 -)
FullWidthSelection,
%End
%If (Qt_4_2_0 -)
PageBreakPolicy,
%End
%If (Qt_4_3_0 -)
TextToolTip,
%End
%If (Qt_4_3_0 -)
FrameTopMargin,
%End
%If (Qt_4_3_0 -)
FrameBottomMargin,
%End
%If (Qt_4_3_0 -)
FrameLeftMargin,
%End
%If (Qt_4_3_0 -)
FrameRightMargin,
%End
%If (Qt_4_3_0 -)
FrameBorderBrush,
%End
%If (Qt_4_3_0 -)
FrameBorderStyle,
%End
%If (Qt_4_4_0 -)
BackgroundImageUrl,
%End
%If (Qt_4_4_0 -)
TabPositions,
%End
%If (Qt_4_4_0 -)
FirstFontProperty,
%End
%If (Qt_4_4_0 -)
FontCapitalization,
%End
%If (Qt_4_4_0 -)
FontLetterSpacing,
%End
%If (Qt_4_4_0 -)
FontWordSpacing,
%End
%If (Qt_4_4_0 -)
LastFontProperty,
%End
%If (Qt_4_4_0 -)
TableCellTopPadding,
%End
%If (Qt_4_4_0 -)
TableCellBottomPadding,
%End
%If (Qt_4_4_0 -)
TableCellLeftPadding,
%End
%If (Qt_4_4_0 -)
TableCellRightPadding,
%End
%If (Qt_4_5_0 -)
FontStyleHint,
%End
%If (Qt_4_5_0 -)
FontStyleStrategy,
%End
%If (Qt_4_5_0 -)
FontKerning,
%End
UserProperty,
};
QTextFormat();
explicit QTextFormat(int);
QTextFormat(const QTextFormat &);
~QTextFormat();
void merge(const QTextFormat &);
bool isValid() const;
int type() const;
int objectIndex() const;
void setObjectIndex(int);
QVariant property(int) const;
void setProperty(int, const QVariant &);
void clearProperty(int);
bool hasProperty(int) const;
bool boolProperty(int) const;
int intProperty(int) const;
qreal doubleProperty(int) const;
QString stringProperty(int) const;
QColor colorProperty(int) const;
QPen penProperty(int) const;
QBrush brushProperty(int) const;
QTextLength lengthProperty(int) const;
QVector<QTextLength> lengthVectorProperty(int) const;
void setProperty(int, const QVector<QTextLength> &);
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 &) const;
bool operator!=(const QTextFormat &) const;
QTextFormat(const QVariant &variant) /NoDerived/;
%MethodCode
sipCpp = new QTextFormat(qVariantValue<QTextFormat>(*a0));
%End
void setLayoutDirection(Qt::LayoutDirection);
Qt::LayoutDirection layoutDirection() const;
void setBackground(const QBrush &);
QBrush background() const;
void clearBackground();
void setForeground(const QBrush &);
QBrush foreground() const;
void clearForeground();
void setObjectType(int);
%If (Qt_4_3_0 -)
int propertyCount() const;
%End
%If (Qt_4_4_0 -)
bool isTableCellFormat() const;
%End
%If (Qt_4_4_0 -)
QTextTableCellFormat toTableCellFormat() const;
%End
};
QDataStream &operator<<(QDataStream &, const QTextFormat & /Constrained/);
QDataStream &operator>>(QDataStream &, QTextFormat & /Constrained/);
class QTextCharFormat : QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
enum VerticalAlignment
{
AlignNormal,
AlignSuperScript,
AlignSubScript,
%If (Qt_4_3_0 -)
AlignMiddle,
%End
%If (Qt_4_3_0 -)
AlignTop,
%End
%If (Qt_4_3_0 -)
AlignBottom,
%End
};
QTextCharFormat();
bool isValid() const;
void setFont(const QFont &);
QFont font() const;
void setFontFamily(const QString &);
QString fontFamily() const;
void setFontPointSize(qreal);
qreal fontPointSize() const;
void setFontWeight(int);
int fontWeight() const;
void setFontItalic(bool);
bool fontItalic() const;
void setFontUnderline(bool);
bool fontUnderline() const;
void setFontOverline(bool);
bool fontOverline() const;
void setFontStrikeOut(bool);
bool fontStrikeOut() const;
void setUnderlineColor(const QColor &);
QColor underlineColor() const;
void setFontFixedPitch(bool);
bool fontFixedPitch() const;
void setVerticalAlignment(QTextCharFormat::VerticalAlignment);
QTextCharFormat::VerticalAlignment verticalAlignment() const;
void setAnchor(bool);
bool isAnchor() const;
void setAnchorHref(const QString &);
QString anchorHref() const;
void setAnchorName(const QString &);
QString anchorName() const;
int tableCellRowSpan() const;
int tableCellColumnSpan() const;
void setTableCellRowSpan(int);
void setTableCellColumnSpan(int);
void setTextOutline(const QPen &);
QPen textOutline() const;
%If (Qt_4_2_0 -)
enum UnderlineStyle
{
NoUnderline,
SingleUnderline,
DashUnderline,
DotLine,
DashDotLine,
DashDotDotLine,
WaveUnderline,
SpellCheckUnderline,
};
%End
%If (Qt_4_2_0 -)
void setUnderlineStyle(QTextCharFormat::UnderlineStyle);
%End
%If (Qt_4_2_0 -)
QTextCharFormat::UnderlineStyle underlineStyle() const;
%End
%If (Qt_4_3_0 -)
void setToolTip(const QString &);
%End
%If (Qt_4_3_0 -)
QString toolTip() const;
%End
%If (Qt_4_3_0 -)
void setAnchorNames(const QStringList &);
%End
%If (Qt_4_3_0 -)
QStringList anchorNames() const;
%End
%If (Qt_4_4_0 -)
void setFontCapitalization(QFont::Capitalization);
%End
%If (Qt_4_4_0 -)
QFont::Capitalization fontCapitalization() const;
%End
%If (Qt_4_4_0 -)
void setFontLetterSpacing(qreal);
%End
%If (Qt_4_4_0 -)
qreal fontLetterSpacing() const;
%End
%If (Qt_4_4_0 -)
void setFontWordSpacing(qreal);
%End
%If (Qt_4_4_0 -)
qreal fontWordSpacing() const;
%End
%If (Qt_4_5_0 -)
void setFontStyleHint(QFont::StyleHint, QFont::StyleStrategy strategy = QFont::PreferDefault);
%End
%If (Qt_4_5_0 -)
void setFontStyleStrategy(QFont::StyleStrategy);
%End
%If (Qt_4_5_0 -)
QFont::StyleHint fontStyleHint() const;
%End
%If (Qt_4_5_0 -)
QFont::StyleStrategy fontStyleStrategy() const;
%End
%If (Qt_4_5_0 -)
void setFontKerning(bool);
%End
%If (Qt_4_5_0 -)
bool fontKerning() const;
%End
};
class QTextBlockFormat : QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextBlockFormat();
bool isValid() const;
Qt::Alignment alignment() const;
void setTopMargin(qreal);
qreal topMargin() const;
void setBottomMargin(qreal);
qreal bottomMargin() const;
void setLeftMargin(qreal);
qreal leftMargin() const;
void setRightMargin(qreal);
qreal rightMargin() const;
void setTextIndent(qreal);
qreal textIndent() const;
int indent() const;
void setNonBreakableLines(bool);
bool nonBreakableLines() const;
void setAlignment(Qt::Alignment);
void setIndent(int);
%If (Qt_4_2_0 -)
void setPageBreakPolicy(QFlags<QTextFormat::PageBreakFlag>);
%End
%If (Qt_4_2_0 -)
QFlags<QTextFormat::PageBreakFlag> pageBreakPolicy() const;
%End
%If (Qt_4_4_0 -)
void setTabPositions(const QList<QTextOption::Tab> &);
%End
%If (Qt_4_4_0 -)
QList<QTextOption::Tab> tabPositions() const;
%End
};
class QTextListFormat : QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextListFormat();
bool isValid() const;
enum Style
{
ListDisc,
ListCircle,
ListSquare,
ListDecimal,
ListLowerAlpha,
ListUpperAlpha,
%If (Qt_4_6_0 -)
ListLowerRoman,
%End
%If (Qt_4_6_0 -)
ListUpperRoman,
%End
};
QTextListFormat::Style style() const;
int indent() const;
void setStyle(QTextListFormat::Style);
void setIndent(int);
};
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 &);
void setWidth(qreal);
void setHeight(qreal);
};
class QTextFrameFormat : QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextFrameFormat();
bool isValid() const;
enum Position
{
InFlow,
FloatLeft,
FloatRight,
};
void setPosition(QTextFrameFormat::Position);
QTextFrameFormat::Position position() const;
qreal border() const;
qreal margin() const;
qreal padding() const;
void setWidth(const QTextLength &);
QTextLength width() const;
QTextLength height() const;
void setBorder(qreal);
void setMargin(qreal);
void setPadding(qreal);
void setWidth(qreal);
void setHeight(qreal);
void setHeight(const QTextLength &);
%If (Qt_4_2_0 -)
void setPageBreakPolicy(QFlags<QTextFormat::PageBreakFlag>);
%End
%If (Qt_4_2_0 -)
QFlags<QTextFormat::PageBreakFlag> pageBreakPolicy() const;
%End
%If (Qt_4_3_0 -)
enum BorderStyle
{
BorderStyle_None,
BorderStyle_Dotted,
BorderStyle_Dashed,
BorderStyle_Solid,
BorderStyle_Double,
BorderStyle_DotDash,
BorderStyle_DotDotDash,
BorderStyle_Groove,
BorderStyle_Ridge,
BorderStyle_Inset,
BorderStyle_Outset,
};
%End
%If (Qt_4_3_0 -)
void setBorderBrush(const QBrush &);
%End
%If (Qt_4_3_0 -)
QBrush borderBrush() const;
%End
%If (Qt_4_3_0 -)
void setBorderStyle(QTextFrameFormat::BorderStyle);
%End
%If (Qt_4_3_0 -)
QTextFrameFormat::BorderStyle borderStyle() const;
%End
%If (Qt_4_3_0 -)
qreal topMargin() const;
%End
%If (Qt_4_3_0 -)
qreal bottomMargin() const;
%End
%If (Qt_4_3_0 -)
qreal leftMargin() const;
%End
%If (Qt_4_3_0 -)
qreal rightMargin() const;
%End
%If (Qt_4_3_0 -)
void setTopMargin(qreal);
%End
%If (Qt_4_3_0 -)
void setBottomMargin(qreal);
%End
%If (Qt_4_3_0 -)
void setLeftMargin(qreal);
%End
%If (Qt_4_3_0 -)
void setRightMargin(qreal);
%End
};
class QTextTableFormat : QTextFrameFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextTableFormat();
bool isValid() const;
int columns() const;
void setColumnWidthConstraints(const QVector<QTextLength> &);
QVector<QTextLength> columnWidthConstraints() const;
void clearColumnWidthConstraints();
qreal cellSpacing() const;
void setCellSpacing(qreal);
qreal cellPadding() const;
Qt::Alignment alignment() const;
void setColumns(int);
void setCellPadding(qreal);
void setAlignment(Qt::Alignment);
%If (Qt_4_2_0 -)
void setHeaderRowCount(int);
%End
%If (Qt_4_2_0 -)
int headerRowCount() const;
%End
};
%If (Qt_4_2_0 -)
QFlags<QTextFormat::PageBreakFlag> operator|(QTextFormat::PageBreakFlag, QFlags<QTextFormat::PageBreakFlag>);
%End
%If (Qt_4_4_0 -)
class QTextTableCellFormat : QTextCharFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextTableCellFormat();
bool isValid() const;
void setTopPadding(qreal);
qreal topPadding() const;
void setBottomPadding(qreal);
qreal bottomPadding() const;
void setLeftPadding(qreal);
qreal leftPadding() const;
void setRightPadding(qreal);
qreal rightPadding() const;
void setPadding(qreal);
};
%End
|