~ubuntu-branches/ubuntu/vivid/kdepim/vivid

« back to all changes in this revision

Viewing changes to messageviewer/a11y/accessiblemailwebview.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Jonathan Riddell, Rohan Garg, Scott Kitterman
  • Date: 2012-11-21 13:12:36 UTC
  • mfrom: (0.2.33)
  • Revision ID: package-import@ubuntu.com-20121121131236-32ijw9a2txrar80k
Tags: 4:4.9.80-0ubuntu1
[ Jonathan Riddell ]
* New upstream beta release

[ Rohan Garg ]
* Add nepomuk-core-dev to build-deps

[ Scott Kitterman ]
* Add new package, libpimcommon4
  - Add libpimcommon4.install
  - Add to debian/control, including kdepim-dbg and kdepim-dev depends
  - Add to kdepim-dev.install
* Remove usr/bin/backupmail and related files from kmail.install as they are
  not provided by upstream anymore
* Add usr/bin/pimsettingexporter and related files to kmail.install
* Add libnepomukwidgets-dev to build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include <QWebFrame>
22
22
 
23
 
#if QT_VERSION >= 0x40800
24
23
QString Q_GUI_EXPORT qTextAfterOffsetFromString( int offset, QAccessible2::BoundaryType boundaryType,
25
24
                                         int *startOffset, int *endOffset, const QString& text );
26
25
QString Q_GUI_EXPORT qTextBeforeOffsetFromString( int offset, QAccessible2::BoundaryType boundaryType,
27
26
                                         int *startOffset, int *endOffset, const QString& text );
28
27
QString Q_GUI_EXPORT qTextAtOffsetFromString( int offset, QAccessible2::BoundaryType boundaryType,
29
28
                                         int *startOffset, int *endOffset, const QString& text );
30
 
#endif
31
29
 
32
30
AccessibleMailWebView::AccessibleMailWebView( MessageViewer::MailWebView* widget ):
33
31
  QAccessibleWidgetEx( widget, QAccessible::Document )
43
41
 
44
42
int AccessibleMailWebView::selectionCount()
45
43
{
46
 
#if QT_VERSION >= 0x40800
47
44
  return m_widget->hasSelection() ? 1 : 0;
48
 
#else
49
 
  return 0;
50
 
#endif
51
45
}
52
46
 
53
47
void AccessibleMailWebView::addSelection( int startOffset, int endOffset )
56
50
 
57
51
void AccessibleMailWebView::removeSelection( int selectionIndex )
58
52
{
59
 
#if QT_VERSION >= 0x40800
60
53
  if ( selectionIndex == 0 )
61
54
    m_widget->clearSelection();
62
 
#endif
63
55
}
64
56
 
65
57
void AccessibleMailWebView::setSelection( int selectionIndex, int startOffset, int endOffset )
110
102
 
111
103
QString AccessibleMailWebView::textAfterOffset( int offset, QAccessible2::BoundaryType boundaryType, int* startOffset, int* endOffset )
112
104
{
113
 
#if QT_VERSION >= 0x40800
114
105
  return qTextAfterOffsetFromString( offset, boundaryType, startOffset, endOffset, m_widget->page()->mainFrame()->toPlainText() );
115
 
#else
116
 
  return QString();
117
 
#endif
118
106
}
119
107
 
120
108
QString AccessibleMailWebView::textBeforeOffset( int offset, QAccessible2::BoundaryType boundaryType, int* startOffset, int* endOffset )
121
109
{
122
 
#if QT_VERSION >= 0x40800
123
110
  return qTextBeforeOffsetFromString( offset, boundaryType, startOffset, endOffset, m_widget->page()->mainFrame()->toPlainText() );
124
 
#else
125
 
  return QString();
126
 
#endif
127
111
}
128
112
 
129
113
QString AccessibleMailWebView::textAtOffset( int offset, QAccessible2::BoundaryType boundaryType, int* startOffset, int* endOffset )
130
114
{
131
 
#if QT_VERSION >= 0x40800
132
115
  return qTextAtOffsetFromString( offset, boundaryType, startOffset, endOffset, m_widget->page()->mainFrame()->toPlainText() );
133
 
#else
134
 
  return QString();
135
 
#endif
136
116
}