Qt 4.8
Public Functions | Public Variables | Friends | List of all members
QTextFramePrivate Class Reference

#include <qtextobject_p.h>

Inheritance diagram for QTextFramePrivate:
QTextObjectPrivate QObjectPrivate QObjectData QTextTablePrivate

Public Functions

virtual void fragmentAdded (const QChar &type, uint fragment)
 
virtual void fragmentRemoved (const QChar &type, uint fragment)
 
 QTextFramePrivate (QTextDocument *doc)
 
void remove_me ()
 
- Public Functions inherited from QTextObjectPrivate
 QTextObjectPrivate (QTextDocument *doc)
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Public Variables

QList< QTextFrame * > childFrames
 
uint fragment_end
 
uint fragment_start
 
QTextFrameLayoutDatalayoutData
 
QTextFrameparentFrame
 
- Public Variables inherited from QTextObjectPrivate
int objectIndex
 
QTextDocumentPrivatepieceTable
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Friends

class QTextDocumentPrivate
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 

Detailed Description

Definition at line 91 of file qtextobject_p.h.

Constructors and Destructors

◆ QTextFramePrivate()

QTextFramePrivate::QTextFramePrivate ( QTextDocument doc)
inline

Definition at line 96 of file qtextobject_p.h.

98  {
99  }
QTextObjectPrivate(QTextDocument *doc)
Definition: qtextobject_p.h:68
QTextFrame * parentFrame
QTextFrameLayoutData * layoutData

Functions

◆ fragmentAdded()

void QTextFramePrivate::fragmentAdded ( const QChar type,
uint  fragment 
)
virtual

Reimplemented in QTextTablePrivate.

Definition at line 558 of file qtextobject.cpp.

Referenced by QTextTablePrivate::fragmentAdded().

559 {
560  if (type == QTextBeginningOfFrame) {
562  fragment_start = fragment;
563  } else if (type == QTextEndOfFrame) {
565  fragment_end = fragment;
566  } else if (type == QChar::ObjectReplacementCharacter) {
569  fragment_start = fragment;
570  fragment_end = fragment;
571  } else {
572  Q_ASSERT(false);
573  }
574 }
#define QTextBeginningOfFrame
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
#define QTextEndOfFrame

◆ fragmentRemoved()

void QTextFramePrivate::fragmentRemoved ( const QChar type,
uint  fragment 
)
virtual

Reimplemented in QTextTablePrivate.

Definition at line 576 of file qtextobject.cpp.

Referenced by QTextTablePrivate::fragmentRemoved().

577 {
578  Q_UNUSED(fragment); // --release warning
579  if (type == QTextBeginningOfFrame) {
580  Q_ASSERT(fragment_start == fragment);
581  fragment_start = 0;
582  } else if (type == QTextEndOfFrame) {
583  Q_ASSERT(fragment_end == fragment);
584  fragment_end = 0;
585  } else if (type == QChar::ObjectReplacementCharacter) {
586  Q_ASSERT(fragment_start == fragment);
587  Q_ASSERT(fragment_end == fragment);
588  fragment_start = 0;
589  fragment_end = 0;
590  } else {
591  Q_ASSERT(false);
592  }
593  remove_me();
594 }
#define QTextBeginningOfFrame
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
#define QTextEndOfFrame

◆ remove_me()

void QTextFramePrivate::remove_me ( )

Definition at line 597 of file qtextobject.cpp.

598 {
599  Q_Q(QTextFrame);
600  if (fragment_start == 0 && fragment_end == 0
601  && !parentFrame) {
602  q->document()->docHandle()->deleteObject(q);
603  return;
604  }
605 
606  if (!parentFrame)
607  return;
608 
609  int index = parentFrame->d_func()->childFrames.indexOf(q);
610 
611  // iterator over all children and move them to the parent
612  for (int i = 0; i < childFrames.size(); ++i) {
613  QTextFrame *c = childFrames.at(i);
614  parentFrame->d_func()->childFrames.insert(index, c);
615  c->d_func()->parentFrame = parentFrame;
616  ++index;
617  }
618  Q_ASSERT(parentFrame->d_func()->childFrames.at(index) == q);
619  parentFrame->d_func()->childFrames.removeAt(index);
620 
621  childFrames.clear();
622  parentFrame = 0;
623 }
unsigned char c[8]
Definition: qnumeric_p.h:62
The QTextFrame class represents a frame in a QTextDocument.
Definition: qtextobject.h:122
void insert(int i, const T &t)
Inserts value at index position i in the list.
Definition: qlist.h:575
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
#define Q_Q(Class)
Definition: qglobal.h:2483
QTextFrame * parentFrame() const
Returns the frame&#39;s parent frame.
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QTextFrame * parentFrame
void clear()
Removes all items from the list.
Definition: qlist.h:764
QList< QTextFrame * > childFrames() const
Returns a (possibly empty) list of the frame&#39;s child frames.
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
Definition: qlist.h:847
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
QList< QTextFrame * > childFrames
quint16 index
void removeAt(int i)
Removes the item at index position i.
Definition: qlist.h:480

Friends and Related Functions

◆ QTextDocumentPrivate

friend class QTextDocumentPrivate
friend

Definition at line 93 of file qtextobject_p.h.

Properties

◆ childFrames

QList<QTextFrame *> QTextFramePrivate::childFrames

Definition at line 108 of file qtextobject_p.h.

◆ fragment_end

uint QTextFramePrivate::fragment_end

◆ fragment_start

uint QTextFramePrivate::fragment_start

Definition at line 104 of file qtextobject_p.h.

Referenced by QTextTablePrivate::createTable().

◆ layoutData

QTextFrameLayoutData* QTextFramePrivate::layoutData

Definition at line 109 of file qtextobject_p.h.

◆ parentFrame

QTextFrame* QTextFramePrivate::parentFrame

Definition at line 107 of file qtextobject_p.h.


The documentation for this class was generated from the following files: