summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/helpitem.h
diff options
context:
space:
mode:
authorLeandro Melo <leandro.melo@nokia.com>2010-08-27 12:11:55 +0200
committerLeandro Melo <leandro.melo@nokia.com>2010-08-31 19:04:52 +0200
commitba12a3390eb0ec1a54c226ed137764a5efc2b6b0 (patch)
treea598f0245cb23484b796b70d7e6398bab0a57a8d /src/plugins/texteditor/helpitem.h
parentdb7bf9a8068683fac9d28fcd7ab91dba371dea7e (diff)
downloadqt-creator-ba12a3390eb0ec1a54c226ed137764a5efc2b6b0.tar.gz
Refactor how base hover handler manipulates the help items (qt docs interaction).
Diffstat (limited to 'src/plugins/texteditor/helpitem.h')
-rw-r--r--src/plugins/texteditor/helpitem.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/plugins/texteditor/helpitem.h b/src/plugins/texteditor/helpitem.h
new file mode 100644
index 0000000000..89f8aa7be3
--- /dev/null
+++ b/src/plugins/texteditor/helpitem.h
@@ -0,0 +1,79 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef TEXTEDITORHELPITEM_H
+#define TEXTEDITORHELPITEM_H
+
+#include "texteditor_global.h"
+
+#include <QtCore/QString>
+
+namespace TextEditor {
+
+class TEXTEDITOR_EXPORT HelpItem
+{
+public:
+ enum Category {
+ ClassOrNamespace,
+ Enum,
+ Typedef,
+ Macro,
+ Brief,
+ Function,
+ QML,
+ Unknown
+ };
+
+ HelpItem();
+ HelpItem(const QString &helpId, Category category);
+ HelpItem(const QString &helpId, const QString &docMark, Category category);
+ ~HelpItem();
+
+ void setHelpId(const QString &id);
+ const QString &helpId() const;
+
+ void setDocMark(const QString &mark);
+ const QString &docMark() const;
+
+ void setCategory(Category cat);
+ Category category() const;
+
+ bool isValid() const;
+
+ QString extractContent(bool extended) const;
+
+private:
+ QString m_helpId;
+ QString m_docMark;
+ Category m_category;
+};
+
+} // namespace TextEditor
+
+#endif // TEXTEDITORHELPITEM_H