[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: [pykde4] sip/ktexteditor: Added a bunch of methods for accessing dynamic_casted objects.
From: Dominik Haumann <dhaumann () kde ! org>
Date: 2013-05-30 18:53:02
Message-ID: 684977173.8elliTsDLr () eriador
[Download RAW message or body]
On Thursday, 30. May 2013 20:41:30 Simon Edwards wrote:
> Git commit f0c43beb08d1f003661bd842a268545e4f30e700 by Simon Edwards.
> Committed on 29/05/2013 at 21:51.
> Pushed by sedwards into branch 'master'.
>
> Added a bunch of methods for accessing dynamic_casted objects.
>
> M +66 -14 sip/ktexteditor/document.sip
> M +17 -1 sip/ktexteditor/editor.sip
> M +41 -0 sip/ktexteditor/view.sip
>
> http://commits.kde.org/pykde4/f0c43beb08d1f003661bd842a268545e4f30e700
@Kate python guys: The casting functions should be back, and even more
complete than it ever was before. Can you test?
Thanks,
Dominik
> diff --git a/sip/ktexteditor/document.sip b/sip/ktexteditor/document.sip
> index b03bf4f..b914646 100644
> --- a/sip/ktexteditor/document.sip
> +++ b/sip/ktexteditor/document.sip
> @@ -36,6 +36,13 @@ class Document : KParts::ReadWritePart
> #include <ktexteditor/smartinterface.h>
> #include <ktexteditor/templateinterface.h>
> #include <ktexteditor/variableinterface.h>
> +#include <ktexteditor/movinginterface.h>
> +#include <ktexteditor/annotationinterface.h>
> +#include <ktexteditor/highlightinterface.h>
> +#include <ktexteditor/configinterface.h>
> +#include <ktexteditor/modeinterface.h>
> +#include <ktexteditor/sessionconfiginterface.h>
> +#include <ktexteditor/recoveryinterface.h>
> %End
>
>
> @@ -132,14 +139,16 @@ protected:
> // to convert the Document to the required interface. They return
> // None on failure.
> // Why no annotationinterface.sip?
> -// KTextEditor::AnnotationInterface *annotationInterface();
> -// %MethodCode
> -// Py_BEGIN_ALLOW_THREADS
> -// sipRes = dynamic_cast<KTextEditor::AnnotationInterface*>(sipCpp);
> -// Py_END_ALLOW_THREADS
> -// %End
> public:
> +
> //force
> + KTextEditor::AnnotationInterface *annotationInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::AnnotationInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> KTextEditor::MarkInterface *markInterface();
> %MethodCode
> Py_BEGIN_ALLOW_THREADS
> @@ -161,13 +170,6 @@ public:
> Py_END_ALLOW_THREADS
> %End
>
> - KTextEditor::SmartInterface *smartInterface();
> -%MethodCode
> - Py_BEGIN_ALLOW_THREADS
> - sipRes = dynamic_cast<KTextEditor::SmartInterface*>(sipCpp);
> - Py_END_ALLOW_THREADS
> -%End
> -
> KTextEditor::TemplateInterface *templateInterface();
> %MethodCode
> Py_BEGIN_ALLOW_THREADS
> @@ -188,7 +190,57 @@ public:
> sipRes = dynamic_cast<KTextEditor::VariableInterface*>(sipCpp);
> Py_END_ALLOW_THREADS
> %End
> -//end
> +
> + KTextEditor::MovingInterface *movingInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::MovingInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::HighlightInterface *highlightInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::HighlightInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::ConfigInterface *configInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::ConfigInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::ModeInterface *modeInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::ModeInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::ParameterizedSessionConfigInterface
> *parameterizedSessionConfigInterface(); +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes =
> dynamic_cast<KTextEditor::ParameterizedSessionConfigInterface*>(sipCpp); +
> Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::SessionConfigInterface *sessionConfigInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::SessionConfigInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::RecoveryInterface *recoveryInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::RecoveryInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> +//end
>
> virtual ~Document ();
> signals:
> diff --git a/sip/ktexteditor/editor.sip b/sip/ktexteditor/editor.sip
> index 6e58089..6806591 100644
> --- a/sip/ktexteditor/editor.sip
> +++ b/sip/ktexteditor/editor.sip
> @@ -32,9 +32,10 @@ class Editor : QObject
> {
> %TypeHeaderCode
> #include <ktexteditor/editor.h>
> +#include <ktexteditor/commandinterface.h>
> +#include <ktexteditor/containerinterface.h>
> %End
>
> -
> public:
> Editor (QObject* parent /TransferThis/);
>
> @@ -61,6 +62,21 @@ public:
> void setSimpleMode (bool on);
> bool simpleMode () const;
> const QString& defaultEncoding () const;
> +
> + KTextEditor::CommandInterface *commandInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::CommandInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::ContainerInterface *containerInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::ContainerInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> protected:
> void setDefaultEncoding (const QString&
> defaultEncoding); };
> diff --git a/sip/ktexteditor/view.sip b/sip/ktexteditor/view.sip
> index 3656e6e..dde5865 100644
> --- a/sip/ktexteditor/view.sip
> +++ b/sip/ktexteditor/view.sip
> @@ -32,6 +32,10 @@ class View : QWidget, KXMLGUIClient /Abstract/
> #include <ktexteditor/codecompletioninterface.h>
> #include <ktexteditor/sessionconfiginterface.h>
> #include <ktexteditor/texthintinterface.h>
> +#include <ktexteditor/annotationinterface.h>
> +#include <ktexteditor/configinterface.h>
> +#include <ktexteditor/templateinterface.h>
> +#include <ktexteditor/templateinterface2.h>
> %End
>
>
> @@ -125,6 +129,43 @@ public:
> sipRes = dynamic_cast<KTextEditor::TextHintInterface*>(sipCpp);
> Py_END_ALLOW_THREADS
> %End
> +
> + KTextEditor::AnnotationInterface *annotationInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::AnnotationInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::ConfigInterface *configInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::ConfigInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::CoordinatesToCursorInterface
> *coordinatesToCursorInterface(); +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes =
> dynamic_cast<KTextEditor::CoordinatesToCursorInterface*>(sipCpp); +
> Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::TemplateInterface *templateInterface();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::TemplateInterface*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> + KTextEditor::TemplateInterface2 *templateInterface2();
> +%MethodCode
> + Py_BEGIN_ALLOW_THREADS
> + sipRes = dynamic_cast<KTextEditor::TemplateInterface2*>(sipCpp);
> + Py_END_ALLOW_THREADS
> +%End
> +
> +
> //end
> };
> // class View
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic