2
Copyright 2011 José Millán Soto <fid@gpul.org>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Lesser General Public
6
License as published by the Free Software Foundation; either
7
version 2.1 of the License, or (at your option) any later version.
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Lesser General Public License for more details.
14
You should have received a copy of the GNU Lesser General Public
15
License along with this library. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef ACCESSIBLECHATMESSAGEPART_H
19
#define ACCESSIBLECHATMESSAGEPART_H
21
#include <QtGui/QAccessibleTextInterface>
22
#include <QtGui/QAccessibleWidget>
27
namespace MessageViewer {
31
class AccessibleChatMessagePart: public QAccessibleWidgetEx,
32
public QAccessibleTextInterface
36
AccessibleChatMessagePart( KHTMLView* widget );
38
virtual int characterCount();
40
virtual int selectionCount();
41
virtual void addSelection( int startOffset, int endOffset );
42
virtual void removeSelection( int selectionIndex );
43
virtual void setSelection( int selectionIndex, int startOffset, int endOffset );
44
virtual void setCursorPosition( int );
46
virtual QString text( int startOffset, int endOffset );
48
virtual QString attributes( int offset, int* startOffset, int* endOffset );
50
virtual int childCount() const;;
51
virtual int navigate(RelationFlag rel, int entry, QAccessibleInterface** target) const;
53
virtual void selection( int selectionIndex, int* startOffset, int* endOffset );
54
virtual QRect characterRect( int offset, QAccessible2::CoordinateType coordType );
55
virtual int offsetAtPoint( const QPoint& point, QAccessible2::CoordinateType coordType );
56
virtual int cursorPosition();
57
virtual void scrollToSubstring( int startIndex, int endIndex );
58
virtual QString textAfterOffset( int offset, QAccessible2::BoundaryType boundaryType, int* startOffset, int* endOffset );
59
virtual QString textBeforeOffset( int offset, QAccessible2::BoundaryType boundaryType, int* startOffset, int* endOffset );
60
virtual QString textAtOffset( int offset, QAccessible2::BoundaryType boundaryType, int* startOffset, int* endOffset );
62
QString plainText() const;