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
|
// qtextformat.sip generated by MetaSIP on Sat Jul 15 18:43:36 2006
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2006
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyQt.
//
// This copy of PyQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%ModuleHeaderCode
#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 atype, qreal avalue);
qreal value(qreal maximumLength) const;
qreal rawValue() const;
bool operator==(const QTextLength &other) const;
bool operator!=(const QTextLength &other) const;
operator QVariant() const;
QTextLength(const QVariant &) /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 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,
UserProperty,
};
enum ObjectTypes
{
NoObject,
ImageObject,
TableObject,
UserObject,
};
QTextFormat();
explicit QTextFormat(int type);
QTextFormat(const QTextFormat &rhs);
~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;
operator QVariant() const;
QTextFormat(const QVariant &) /NoDerived/;
%MethodCode
sipCpp = new QTextFormat(qVariantValue<QTextFormat>(*a0));
%End
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);
};
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,
};
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;
void setAnchorName(const QString &name);
QString anchorName() const;
int tableCellRowSpan() const;
int tableCellColumnSpan() const;
void setTableCellRowSpan(int atableCellRowSpan);
void setTableCellColumnSpan(int atableCellColumnSpan);
void setTextOutline(const QPen &pen);
QPen textOutline() const;
};
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);
};
class QTextListFormat : QTextFormat
{
%TypeHeaderCode
#include <qtextformat.h>
%End
public:
QTextListFormat();
bool isValid() const;
enum Style
{
ListDisc,
ListCircle,
ListSquare,
ListDecimal,
ListLowerAlpha,
ListUpperAlpha,
ListStyleUndefined,
};
QTextListFormat::Style style() const;
int indent() const;
void setStyle(QTextListFormat::Style astyle);
void setIndent(int aindent);
};
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);
};
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);
};
|