class FileTree : public QSimpleXmlNodeModel
{
- public:
+public:
FileTree(const QXmlNamePool &namePool);
QXmlNodeModelIndex nodeFor(const QString &fileName) const;
virtual QXmlNodeModelIndex root(const QXmlNodeModelIndex &node) const;
virtual QVariant typedValue(const QXmlNodeModelIndex &node) const;
//! [0]
- protected:
+protected:
//! [1]
virtual QVector<QXmlNodeModelIndex> attributes(const QXmlNodeModelIndex &element) const;
virtual QXmlNodeModelIndex nextFromSimpleAxis(SimpleAxis, const QXmlNodeModelIndex&) const;
//! [1]
- private:
+private:
//! [4]
enum Type {
File,
//! [4]
class MessageHandler : public QAbstractMessageHandler
{
- public:
- MessageHandler()
- : QAbstractMessageHandler(0)
- {
- }
-
- QString statusMessage() const
- {
- return m_description;
- }
-
- int line() const
- {
- return m_sourceLocation.line();
- }
-
- int column() const
- {
- return m_sourceLocation.column();
- }
-
- protected:
- virtual void handleMessage(QtMsgType type, const QString &description,
- const QUrl &identifier, const QSourceLocation &sourceLocation)
- {
- Q_UNUSED(type);
- Q_UNUSED(identifier);
-
- m_messageType = type;
- m_description = description;
- m_sourceLocation = sourceLocation;
- }
-
- private:
- QtMsgType m_messageType;
- QString m_description;
- QSourceLocation m_sourceLocation;
+public:
+ MessageHandler()
+ : QAbstractMessageHandler(0)
+ {
+ }
+
+ QString statusMessage() const
+ {
+ return m_description;
+ }
+
+ int line() const
+ {
+ return m_sourceLocation.line();
+ }
+
+ int column() const
+ {
+ return m_sourceLocation.column();
+ }
+
+protected:
+ virtual void handleMessage(QtMsgType type, const QString &description,
+ const QUrl &identifier, const QSourceLocation &sourceLocation)
+ {
+ Q_UNUSED(type);
+ Q_UNUSED(identifier);
+
+ m_messageType = type;
+ m_description = description;
+ m_sourceLocation = sourceLocation;
+ }
+
+private:
+ QtMsgType m_messageType;
+ QString m_description;
+ QSourceLocation m_sourceLocation;
};
//! [4]