2010-08-02 17:25:29 +02:00
|
|
|
#include "qmljscontextcrumblepath.h"
|
|
|
|
|
|
|
|
|
|
#include <QMouseEvent>
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
|
|
namespace QmlJSInspector {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
ContextCrumblePath::ContextCrumblePath(QWidget *parent)
|
2010-08-02 18:03:27 +02:00
|
|
|
: CrumblePath(parent), m_isEmpty(true)
|
2010-08-02 17:25:29 +02:00
|
|
|
{
|
|
|
|
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
2010-08-02 18:03:27 +02:00
|
|
|
updateContextPath(QStringList());
|
2010-08-02 17:25:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ContextCrumblePath::~ContextCrumblePath()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ContextCrumblePath::updateContextPath(const QStringList &path)
|
|
|
|
|
{
|
|
|
|
|
clear();
|
|
|
|
|
foreach(const QString &pathPart, path) {
|
|
|
|
|
pushElement(pathPart);
|
|
|
|
|
}
|
2010-08-02 18:03:27 +02:00
|
|
|
|
|
|
|
|
m_isEmpty = path.isEmpty();
|
|
|
|
|
if (m_isEmpty) {
|
|
|
|
|
pushElement(tr("[no context]"));
|
|
|
|
|
}
|
2010-08-02 17:25:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace QmlJSInspector
|