Qt 4.8
Public Functions | Properties | List of all members
QScriptToolTipJob Class Reference
Inheritance diagram for QScriptToolTipJob:
QScriptDebuggerCommandSchedulerJob QScriptDebuggerJob QScriptDebuggerResponseHandlerInterface

Public Functions

void handleResponse (const QScriptDebuggerResponse &response, int)
 
 QScriptToolTipJob (const QPoint &pos, int frameIndex, int lineNumber, const QStringList &path, QScriptDebuggerCommandSchedulerInterface *scheduler)
 
void start ()
 
- Public Functions inherited from QScriptDebuggerCommandSchedulerJob
QScriptDebuggerCommandSchedulerInterfacecommandScheduler () const
 
 QScriptDebuggerCommandSchedulerJob (QScriptDebuggerCommandSchedulerInterface *commandScheduler)
 
 ~QScriptDebuggerCommandSchedulerJob ()
 
- Public Functions inherited from QScriptDebuggerJob
virtual void evaluateFinished (const QScriptDebuggerValue &result)
 
void finish ()
 
void hibernateUntilEvaluateFinished ()
 
 QScriptDebuggerJob ()
 
virtual ~QScriptDebuggerJob ()
 
- Public Functions inherited from QScriptDebuggerResponseHandlerInterface
virtual ~QScriptDebuggerResponseHandlerInterface ()
 

Properties

int m_frameIndex
 
int m_lineNumber
 
QStringList m_path
 
QPoint m_pos
 

Additional Inherited Members

- Protected Functions inherited from QScriptDebuggerCommandSchedulerJob
 QScriptDebuggerCommandSchedulerJob (QScriptDebuggerCommandSchedulerJobPrivate &dd, QScriptDebuggerCommandSchedulerInterface *commandScheduler)
 
- Protected Functions inherited from QScriptDebuggerJob
 QScriptDebuggerJob (QScriptDebuggerJobPrivate &dd)
 
- Protected Variables inherited from QScriptDebuggerJob
QScopedPointer< QScriptDebuggerJobPrivated_ptr
 

Detailed Description

Definition at line 641 of file qscriptdebugger.cpp.

Constructors and Destructors

◆ QScriptToolTipJob()

QScriptToolTipJob::QScriptToolTipJob ( const QPoint pos,
int  frameIndex,
int  lineNumber,
const QStringList path,
QScriptDebuggerCommandSchedulerInterface scheduler 
)
inline

Definition at line 644 of file qscriptdebugger.cpp.

647  : QScriptDebuggerCommandSchedulerJob(scheduler), m_pos(pos),
648  m_frameIndex(frameIndex), m_lineNumber(lineNumber), m_path(path)
649  {}
QScriptDebuggerCommandSchedulerJob(QScriptDebuggerCommandSchedulerInterface *commandScheduler)

Functions

◆ handleResponse()

void QScriptToolTipJob::handleResponse ( const QScriptDebuggerResponse response,
int   
)
inlinevirtual

Implements QScriptDebuggerResponseHandlerInterface.

Definition at line 656 of file qscriptdebugger.cpp.

657  {
658  QString tip = response.result().toString();
659  if (tip.indexOf(QLatin1Char('\n')) != -1) {
660  QStringList lines = tip.split(QLatin1Char('\n'));
661  int lineCount = lines.size();
662  if (lineCount > 5) {
663  lines = lines.mid(0, 5);
664  lines.append(QString::fromLatin1("(... %0 more lines ...)").arg(lineCount - 5));
665  }
666  tip = lines.join(QLatin1String("\n"));
667  }
669  finish();
670  }
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
Definition: qvariant.cpp:2270
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83
QList< T > mid(int pos, int length=-1) const
Returns a list whose elements are copied from this list, starting at position pos.
Definition: qlist.h:637
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:2838
QString join(const QString &sep) const
Joins all the string list&#39;s strings into a single string with each element separated by the given sep...
Definition: qstringlist.h:162
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
Definition: qstring.cpp:6526
QVariant result() const
Returns the result of this response.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
static void showText(const QPoint &pos, const QString &text, QWidget *w=0)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qtooltip.cpp:497

◆ start()

void QScriptToolTipJob::start ( )
inlinevirtual

Implements QScriptDebuggerJob.

Definition at line 651 of file qscriptdebugger.cpp.

652  {
654  frontend.scheduleGetPropertyExpressionValue(m_frameIndex, m_lineNumber, m_path);
655  }
QScriptDebuggerCommandSchedulerInterface * commandScheduler() const

Properties

◆ m_frameIndex

int QScriptToolTipJob::m_frameIndex
private

Definition at line 674 of file qscriptdebugger.cpp.

◆ m_lineNumber

int QScriptToolTipJob::m_lineNumber
private

Definition at line 675 of file qscriptdebugger.cpp.

◆ m_path

QStringList QScriptToolTipJob::m_path
private

Definition at line 676 of file qscriptdebugger.cpp.

◆ m_pos

QPoint QScriptToolTipJob::m_pos
private

Definition at line 673 of file qscriptdebugger.cpp.


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