49 #include <QtCore/qdebug.h> 50 #include <QtGui/qboxlayout.h> 51 #include <QtGui/qstackedwidget.h> 133 for (
int i = first; i <= last; ++i) {
136 if (scriptId == -1) {
151 for (
int i = first; i <= last; ++i) {
154 if (scriptId == -1) {
169 for (
int i = tl.
row(); i <= br.
row(); ++i) {
172 if (scriptId == -1) {
219 return d->scriptsModel;
225 d->scriptsModel = model;
227 this,
SLOT(_q_onScriptsChanged()));
239 if (scriptId == -1) {
254 this,
SLOT(_q_onBreakpointToggleRequest(
int,
bool)));
256 this,
SLOT(_q_onBreakpointEnableRequest(
int,
bool)));
259 d->viewStack->addWidget(view);
260 d->viewHash.insert(scriptId, view);
262 d->viewStack->setCurrentWidget(view);
269 for (it =
d->viewHash.constBegin(); it !=
d->viewHash.constEnd(); ++
it)
270 it.
value()->setExecutionLineNumber(-1,
false);
276 return d->breakpointsModel;
282 d->breakpointsModel = model;
294 d->toolTipProvider = toolTipProvider;
305 #include "moc_qscriptdebuggercodewidget_p.cpp" T qobject_cast(QObject *object)
The QHash::const_iterator class provides an STL-style const iterator for QHash and QMultiHash...
#define QT_END_NAMESPACE
This macro expands to.
int baseLineNumber() const
QScriptBreakpointData breakpointDataAt(int row) const
Returns the data for the breakpoint at the given row.
void deleteBreakpoint(int id)
Deletes the breakpoint with the given id.
#define it(className, varName)
void setFileName(const QString &fileName)
virtual void setExecutableLineNumbers(const QSet< int > &lineNumbers)=0
T * qobject_cast(QObject *object)
The QHash class is a template class that provides a hash-table-based dictionary.
QScriptScriptData scriptData(qint64 id) const
virtual void setBaseLineNumber(int lineNumber)=0
void addWidget(QWidget *, int stretch=0, Qt::Alignment alignment=0)
Adds widget to the end of this box layout, with a stretch factor of stretch and alignment alignment...
virtual void deleteBreakpoint(int lineNumber)=0
const T value(const Key &key) const
Returns the value associated with the key.
virtual void setBreakpointEnabled(int lineNumber, bool enable)=0
The QScriptScriptData class holds data associated with a script.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
int row() const
Returns the row this model index refers to.
The QStringList class provides a list of strings.
const T & value() const
Returns the current item's value.
qint64 resolveScript(const QString &fileName) const
void setEnabled(bool enabled)
Sets the enabled state of the breakpoint.
virtual void setBreakpoint(int lineNumber)=0
const Key & key() const
Returns the current item's key as a const reference.
The QScriptBreakpointData class contains data associated with a breakpoint.
QScriptBreakpointData breakpointData(int id) const
void setBreakpointData(int id, const QScriptBreakpointData &data)
Sets the data associated with the breakpoint identified by id.
void setBreakpoint(const QScriptBreakpointData &data)
Sets a breakpoint defined by the given data.
#define Q_DECLARE_PUBLIC(Class)
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the hash...
bool isEnabled() const
Returns true if the breakpoint is enabled, false otherwise.
const Key key(const T &value) const
Returns the first key mapped to value.
The QPoint class defines a point in the plane using integer precision.
The QHash::iterator class provides an STL-style non-const iterator for QHash and QMultiHash.
The QModelIndex class is used to locate data in a data model.
iterator begin()
Returns an STL-style iterator pointing to the first item in the hash.
The QVBoxLayout class lines up widgets vertically.
int resolveBreakpoint(qint64 scriptId, int lineNumber) const
Tries to find a breakpoint with the given scriptId and lineNumber.
virtual void setText(const QString &text)=0
int lineNumber() const
Returns the breakpoint line number.
iterator erase(iterator it)
Removes the (key, value) pair associated with the iterator pos from the hash, and returns an iterator...