Qt 4.8
Namespaces | Classes | Functions
QmlJSDebugger Namespace Reference

Namespaces

 Constants
 

Classes

class  AbstractLiveEditTool
 
class  AbstractTool
 
class  AbstractViewInspector
 
class  BoundingBox
 
class  BoundingBoxPolygonItem
 
class  BoundingRectHighlighter
 
class  ColorPickerTool
 
class  InspectorProtocol
 
class  LiveLayerItem
 
class  LiveRubberBandSelectionManipulator
 
class  LiveSelectionIndicator
 
class  LiveSelectionRectangle
 
class  LiveSelectionTool
 
class  LiveSingleSelectionManipulator
 
class  QDeclarativeInspectorPlugin
 
class  QDeclarativeViewInspector
 
class  QDeclarativeViewInspectorPrivate
 
class  QmlToolBar
 
class  SelectionRectShape
 
class  SubcomponentMaskLayerItem
 
class  ToolBarColorBox
 
class  ZoomTool
 

Functions

static bool isEditorItem (QGraphicsItem *item)
 
QDataStreamoperator<< (QDataStream &stream, InspectorProtocol::Message message)
 
QDebug operator<< (QDebug dbg, InspectorProtocol::Message message)
 
QDataStreamoperator<< (QDataStream &stream, InspectorProtocol::Tool tool)
 
QDebug operator<< (QDebug dbg, InspectorProtocol::Tool tool)
 
QDataStreamoperator>> (QDataStream &stream, InspectorProtocol::Message &message)
 
QDataStreamoperator>> (QDataStream &stream, InspectorProtocol::Tool &tool)
 
static QPolygonF regionToPolygon (const QRegion &region)
 
static QRectF resizeRect (const QRectF &newRect, const QRectF &oldRect)
 

Function Documentation

◆ isEditorItem()

static bool QmlJSDebugger::isEditorItem ( QGraphicsItem item)
static

Definition at line 390 of file qdeclarativeviewinspector.cpp.

Referenced by QmlJSDebugger::QDeclarativeViewInspectorPrivate::filterForSelection().

391 {
392  return (item->type() == Constants::EditorItemType
395 }
bool toBool() const
Returns the variant as a bool if the variant has type() Bool.
Definition: qvariant.cpp:2691
QVariant data(int key) const
Returns this item&#39;s custom data for the key key as a QVariant.
virtual int type() const
Returns the type of an item as an int.
static const int EditorItemDataKey

◆ operator<<() [1/4]

QDataStream& QmlJSDebugger::operator<< ( QDataStream stream,
InspectorProtocol::Message  message 
)
inline

Definition at line 97 of file qdeclarativeinspectorprotocol.h.

98 {
99  return stream << static_cast<quint32>(message);
100 }

◆ operator<<() [2/4]

QDebug QmlJSDebugger::operator<< ( QDebug  dbg,
InspectorProtocol::Message  message 
)
inline

Definition at line 110 of file qdeclarativeinspectorprotocol.h.

111 {
112  dbg << InspectorProtocol::toString(message);
113  return dbg;
114 }
static QString toString(Register *reg, int type, bool *ok=0)

◆ operator<<() [3/4]

QDataStream& QmlJSDebugger::operator<< ( QDataStream stream,
InspectorProtocol::Tool  tool 
)
inline

Definition at line 116 of file qdeclarativeinspectorprotocol.h.

117 {
118  return stream << static_cast<quint32>(tool);
119 }

◆ operator<<() [4/4]

QDebug QmlJSDebugger::operator<< ( QDebug  dbg,
InspectorProtocol::Tool  tool 
)
inline

Definition at line 129 of file qdeclarativeinspectorprotocol.h.

130 {
131  dbg << InspectorProtocol::toString(tool);
132  return dbg;
133 }
static QString toString(Register *reg, int type, bool *ok=0)

◆ operator>>() [1/2]

QDataStream& QmlJSDebugger::operator>> ( QDataStream stream,
InspectorProtocol::Message message 
)
inline

Definition at line 102 of file qdeclarativeinspectorprotocol.h.

103 {
104  quint32 i;
105  stream >> i;
106  message = static_cast<InspectorProtocol::Message>(i);
107  return stream;
108 }
static FILE * stream
unsigned int quint32
Definition: qglobal.h:938

◆ operator>>() [2/2]

QDataStream& QmlJSDebugger::operator>> ( QDataStream stream,
InspectorProtocol::Tool tool 
)
inline

Definition at line 121 of file qdeclarativeinspectorprotocol.h.

122 {
123  quint32 i;
124  stream >> i;
125  tool = static_cast<InspectorProtocol::Tool>(i);
126  return stream;
127 }
static FILE * stream
unsigned int quint32
Definition: qglobal.h:938

◆ regionToPolygon()

static QPolygonF QmlJSDebugger::regionToPolygon ( const QRegion region)
static

Definition at line 89 of file subcomponentmasklayeritem.cpp.

Referenced by QmlJSDebugger::SubcomponentMaskLayerItem::setCurrentItem().

90 {
91  QPainterPath path;
92  foreach (const QRect &rect, region.rects())
93  path.addRect(rect);
94  return path.toFillPolygon();
95 }
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
Definition: qpainterpath.h:67
QPolygonF toFillPolygon(const QMatrix &matrix=QMatrix()) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void addRect(const QRectF &rect)
Adds the given rectangle to this path as a closed subpath.
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
Definition: qregion.cpp:4412
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58

◆ resizeRect()

static QRectF QmlJSDebugger::resizeRect ( const QRectF newRect,
const QRectF oldRect 
)
static

Definition at line 71 of file subcomponentmasklayeritem.cpp.

Referenced by QmlJSDebugger::SubcomponentMaskLayerItem::setCurrentItem().

72 {
73  QRectF result = newRect;
74  if (oldRect.left() < newRect.left())
75  result.setLeft(oldRect.left());
76 
77  if (oldRect.top() < newRect.top())
78  result.setTop(oldRect.top());
79 
80  if (oldRect.right() > newRect.right())
81  result.setRight(oldRect.right());
82 
83  if (oldRect.bottom() > newRect.bottom())
84  result.setBottom(oldRect.bottom());
85 
86  return result;
87 }
qreal right() const
Returns the x-coordinate of the rectangle&#39;s right edge.
Definition: qrect.h:527
void setLeft(qreal pos)
Sets the left edge of the rectangle to the given x coordinate.
Definition: qrect.h:670
qreal left() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:525
void setTop(qreal pos)
Sets the top edge of the rectangle to the given y coordinate.
Definition: qrect.h:674
void setBottom(qreal pos)
Sets the bottom edge of the rectangle to the given y coordinate.
Definition: qrect.h:676
void setRight(qreal pos)
Sets the right edge of the rectangle to the given x coordinate.
Definition: qrect.h:672
The QRectF class defines a rectangle in the plane using floating point precision. ...
Definition: qrect.h:511
qreal top() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:526
qreal bottom() const
Returns the y-coordinate of the rectangle&#39;s bottom edge.
Definition: qrect.h:528