~ubuntu-branches/ubuntu/saucy/kopete/saucy-proposed

« back to all changes in this revision

Viewing changes to kopete/chatwindow/a11y/accessiblechatmessagepart.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-06-21 02:22:39 UTC
  • Revision ID: package-import@ubuntu.com-20130621022239-63l3zc8p0nf26pt6
Tags: upstream-4.10.80
Import upstream version 4.10.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
        Copyright 2011    José Millán Soto <fid@gpul.org>
 
3
 
 
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.
 
8
 
 
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.
 
13
 
 
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/>.
 
16
 */
 
17
 
 
18
#ifndef ACCESSIBLECHATMESSAGEPART_H
 
19
#define ACCESSIBLECHATMESSAGEPART_H
 
20
 
 
21
#include <QtGui/QAccessibleTextInterface>
 
22
#include <QtGui/QAccessibleWidget>
 
23
 
 
24
class KHTMLPart;
 
25
class KHTMLView;
 
26
 
 
27
namespace MessageViewer {
 
28
    class MailWebView;
 
29
}
 
30
 
 
31
class AccessibleChatMessagePart: public QAccessibleWidgetEx,
 
32
                                 public QAccessibleTextInterface
 
33
{
 
34
    Q_ACCESSIBLE_OBJECT
 
35
public:
 
36
    AccessibleChatMessagePart( KHTMLView* widget );
 
37
 
 
38
    virtual int characterCount();
 
39
 
 
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 );
 
45
 
 
46
    virtual QString text( int startOffset, int endOffset );
 
47
 
 
48
    virtual QString attributes( int offset, int* startOffset, int* endOffset );
 
49
 
 
50
    virtual int childCount() const;;
 
51
    virtual int navigate(RelationFlag rel, int entry, QAccessibleInterface** target) const;
 
52
 
 
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 );
 
61
private:
 
62
    QString plainText() const;
 
63
    KHTMLPart *m_part;
 
64
};
 
65
 
 
66
#endif