kde-playground/pykde4/sip/ktexteditor/annotationinterface.sip

71 lines
2.3 KiB
Text

// Copyright 2011 Simon Edwards <simon@simonzone.com>
// Generated by twine2
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License as
// published by the Free Software Foundation; either version 2, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details
// You should have received a copy of the GNU Library General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace KTextEditor
{
class AnnotationModel : QObject
{
%TypeHeaderCode
#include <ktexteditor/annotationinterface.h>
%End
public:
virtual ~AnnotationModel ();
virtual QVariant data (int line, Qt::ItemDataRole role) const=0;
signals:
void reset ();
void lineChanged (int line);
};
class AnnotationInterface
{
%TypeHeaderCode
#include <ktexteditor/annotationinterface.h>
%End
public:
virtual ~AnnotationInterface ();
virtual void setAnnotationModel (KTextEditor::AnnotationModel* model)=0;
virtual KTextEditor::AnnotationModel* annotationModel () const=0;
%ConvertToSubClassCode
// CTSCC for subclasses of 'AnnotationInterface'
sipType = NULL;
if (dynamic_cast<KTextEditor::AnnotationViewInterface*>(sipCpp))
sipType = sipType_KTextEditor_AnnotationViewInterface;
%End
};
class AnnotationViewInterface : KTextEditor::AnnotationInterface
{
%TypeHeaderCode
#include <ktexteditor/annotationinterface.h>
%End
public:
virtual ~AnnotationViewInterface ();
virtual void setAnnotationBorderVisible (bool visible)=0;
virtual bool isAnnotationBorderVisible () const=0;
virtual void annotationContextMenuAboutToShow (KTextEditor::View* view, QMenu* menu, int line)=0;
virtual void annotationActivated (KTextEditor::View* view, int line)=0;
virtual void annotationBorderVisibilityChanged (KTextEditor::View* view, bool visible)=0;
};
};
%ModuleHeaderCode
//ctscc
#include <ktexteditor/annotationinterface.h>
%End