Changeset View
Changeset View
Standalone View
Standalone View
utils/okteta/oktetadocument.h
Show All 17 Lines | 1 | /* | |||
---|---|---|---|---|---|
18 | 18 | | |||
19 | You should have received a copy of the GNU Lesser General Public | 19 | You should have received a copy of the GNU Lesser General Public | ||
20 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 20 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | #ifndef OKTETADOCUMENT_H | 23 | #ifndef OKTETADOCUMENT_H | ||
24 | #define OKTETADOCUMENT_H | 24 | #define OKTETADOCUMENT_H | ||
25 | 25 | | |||
26 | // Plugin | | |||
27 | #include "oktetaglobal.h" | | |||
28 | // Kasten core | 26 | // Kasten core | ||
29 | #include <kastencore.h> | 27 | #include <kasten/kastencore.h> | ||
30 | // KDevPlatform | 28 | // KDevPlatform | ||
31 | #include <sublime/urldocument.h> | 29 | #include <sublime/urldocument.h> | ||
32 | #include <interfaces/idocument.h> | 30 | #include <interfaces/idocument.h> | ||
33 | //Qt | 31 | //Qt | ||
34 | #include <QtCore/QList> | 32 | #include <QtCore/QList> | ||
35 | 33 | | |||
36 | namespace KASTEN_NAMESPACE { | 34 | namespace Kasten { | ||
37 | class ByteArrayDocument; | 35 | class ByteArrayDocument; | ||
38 | class AbstractDocument; | 36 | class AbstractDocument; | ||
39 | } | 37 | } | ||
40 | 38 | | |||
41 | namespace KDevelop | 39 | namespace KDevelop | ||
42 | { | 40 | { | ||
43 | class ICore; | 41 | class ICore; | ||
44 | class OktetaPlugin; | 42 | class OktetaPlugin; | ||
Show All 35 Lines | 77 | public: | |||
80 | void setPlugin( OktetaPlugin* plugin ); | 78 | void setPlugin( OktetaPlugin* plugin ); | ||
81 | 79 | | |||
82 | protected Q_SLOTS: // Sublime::Document API | 80 | protected Q_SLOTS: // Sublime::Document API | ||
83 | virtual Sublime::View* newView( Sublime::Document* document ); | 81 | virtual Sublime::View* newView( Sublime::Document* document ); | ||
84 | 82 | | |||
85 | protected Q_SLOTS: | 83 | protected Q_SLOTS: | ||
86 | void onByteArrayDocumentChanged(); | 84 | void onByteArrayDocumentChanged(); | ||
87 | // Moc is too primitive to know about namespace aliase | 85 | // Moc is too primitive to know about namespace aliase | ||
88 | #if KASTEN_VERSION == 2 | | |||
89 | void onByteArrayDocumentLoaded( Kasten2::AbstractDocument* document ); | | |||
90 | #elif KASTEN_VERSION == 1 | | |||
91 | void onByteArrayDocumentLoaded( Kasten1::AbstractDocument* document ); | | |||
92 | #else | | |||
93 | void onByteArrayDocumentLoaded( Kasten::AbstractDocument* document ); | 86 | void onByteArrayDocumentLoaded( Kasten::AbstractDocument* document ); | ||
94 | #endif | | |||
95 | 87 | | |||
96 | private: | 88 | private: | ||
97 | OktetaPlugin* mPlugin; | 89 | OktetaPlugin* mPlugin; | ||
98 | 90 | | |||
99 | Kasten::ByteArrayDocument* mByteArrayDocument; | 91 | Kasten::ByteArrayDocument* mByteArrayDocument; | ||
100 | }; | 92 | }; | ||
101 | 93 | | |||
102 | 94 | | |||
103 | inline OktetaPlugin* OktetaDocument::plugin() const { return mPlugin; } | 95 | inline OktetaPlugin* OktetaDocument::plugin() const { return mPlugin; } | ||
104 | inline Kasten::ByteArrayDocument* OktetaDocument::byteArrayDocument() const { return mByteArrayDocument; } | 96 | inline Kasten::ByteArrayDocument* OktetaDocument::byteArrayDocument() const { return mByteArrayDocument; } | ||
105 | 97 | | |||
106 | } | 98 | } | ||
107 | 99 | | |||
108 | #endif | 100 | #endif |