summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--interfaces/ktexteditor/document.h11
-rw-r--r--interfaces/ktexteditor/ktexteditor.cpp11
-rw-r--r--kate/part/katedocument.cpp9
-rw-r--r--kate/part/katedocument.h2
4 files changed, 33 insertions, 0 deletions
diff --git a/interfaces/ktexteditor/document.h b/interfaces/ktexteditor/document.h
index 90095b64b..12823e600 100644
--- a/interfaces/ktexteditor/document.h
+++ b/interfaces/ktexteditor/document.h
@@ -61,10 +61,21 @@ class KTEXTEDITOR_EXPORT Document : public KTextEditor::Editor
*/
virtual TQPtrList<class View> views () const = 0;
+ /**
+ * Returns the list position of this document in your app, if applicable.
+ */
+ long documentListPosition () const;
+
+ /**
+ * Sets the list position of this document in your app, if applicable.
+ */
+ void setDocumentListPosition (long pos);
+
private:
class PrivateDocument *d;
static unsigned int globalDocumentNumber;
unsigned int myDocumentNumber;
+ long myDocumentListPosition;
};
KTEXTEDITOR_EXPORT Document *createDocument ( const char* libname, TQObject *parent = 0, const char *name = 0 );
diff --git a/interfaces/ktexteditor/ktexteditor.cpp b/interfaces/ktexteditor/ktexteditor.cpp
index 80071447c..c822dc93c 100644
--- a/interfaces/ktexteditor/ktexteditor.cpp
+++ b/interfaces/ktexteditor/ktexteditor.cpp
@@ -110,6 +110,7 @@ Document::Document( TQObject *parent, const char *name ) : KTextEditor::Editor (
{
globalDocumentNumber++;
myDocumentNumber = globalDocumentNumber;
+ myDocumentListPosition = -1; // Don't care
}
Document::~Document()
@@ -121,6 +122,16 @@ unsigned int Document::documentNumber () const
return myDocumentNumber;
}
+long Document::documentListPosition () const
+{
+ return myDocumentListPosition;
+}
+
+void Document::setDocumentListPosition (long pos)
+{
+ myDocumentListPosition = pos;
+}
+
TQCString Document::documentDCOPSuffix () const
{
TQCString num;
diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp
index 0bb3d4ddf..603388479 100644
--- a/kate/part/katedocument.cpp
+++ b/kate/part/katedocument.cpp
@@ -5052,6 +5052,15 @@ uint KateDocument::documentNumber () const
return KTextEditor::Document::documentNumber ();
}
+long KateDocument::documentListPosition () const
+{
+ return KTextEditor::Document::documentListPosition ();
+}
+
+void KateDocument::setDocumentListPosition (long pos)
+{
+ KTextEditor::Document::setDocumentListPosition (pos);
+}
diff --git a/kate/part/katedocument.h b/kate/part/katedocument.h
index 46e9e87f8..d967a25ab 100644
--- a/kate/part/katedocument.h
+++ b/kate/part/katedocument.h
@@ -1065,6 +1065,8 @@ class KateDocument : public Kate::Document,
k_dcop:
uint documentNumber () const;
+ long documentListPosition () const;
+ void setDocumentListPosition (long pos);
};
#endif