Eneboo - Documentación para desarrolladores
src/qt/plugins/src/accessible/widgets/qaccessiblewidget.h
Ir a la documentación de este archivo.
00001 #ifndef QACCESSIBLEWIDGET_H
00002 #define QACCESSIBLEWIDGET_H
00003 
00004 #include <qaccessible.h>
00005 
00006 class QButton;
00007 class QScrollView;
00008 class QHeader;
00009 class QSpinWidget;
00010 class QScrollBar;
00011 class QSlider;
00012 class QListBox;
00013 class QListView;
00014 class QTextEdit;
00015 class QTabBar;
00016 class QComboBox;
00017 class QTitleBar;
00018 class QWidgetStack;
00019 
00020 #ifndef QT_NO_ICONVIEW
00021 class QIconView;
00022 #endif
00023 
00024 
00025 QString buddyString( QWidget * );
00026 QString stripAmp( const QString& );
00027 QString hotKey( const QString& );
00028 
00029 class QAccessibleWidget : public QAccessibleObject
00030 {
00031 public:
00032     QAccessibleWidget( QObject *o, Role r = Client, QString name = QString::null, 
00033         QString description = QString::null, QString value = QString::null, 
00034         QString help = QString::null, QString defAction = QString::null,
00035         QString accelerator = QString::null, State s = Normal );
00036 
00037     ~QAccessibleWidget();
00038 
00039     int         controlAt( int x, int y ) const;
00040     QRect       rect( int control ) const;
00041     int         navigate( NavDirection direction, int startControl ) const;
00042     int         childCount() const;
00043     QRESULT     queryChild( int control, QAccessibleInterface ** ) const;
00044     QRESULT     queryParent( QAccessibleInterface ** ) const;
00045 
00046     QString     text( Text t, int control ) const;
00047     void        setText( Text t, int control, const QString &text );
00048     Role        role( int control ) const;
00049     State       state( int control ) const;
00050 
00051     bool        doDefaultAction( int control );
00052     bool        setFocus( int control );
00053     bool        setSelected( int control, bool on, bool extend );
00054     void        clearSelection();
00055     QMemArray<int> selection() const;
00056 
00057     static ulong objects;
00058 
00059 protected:
00060     QWidget *widget() const;
00061 
00062 private:
00063     Role role_;
00064     State state_;
00065     QString name_;
00066     QString description_;
00067     QString value_;
00068     QString help_;
00069     QString defAction_;
00070     QString accelerator_;
00071 };
00072 
00073 class QAccessibleWidgetStack : public QAccessibleWidget
00074 {
00075 public:
00076     QAccessibleWidgetStack( QObject *o );
00077 
00078     int         controlAt( int x, int y ) const;
00079     QRESULT     queryChild( int control, QAccessibleInterface ** ) const;
00080 
00081 protected:
00082     QWidgetStack *widgetStack() const;
00083 };
00084 
00085 class QAccessibleButton : public QAccessibleWidget
00086 {
00087 public:
00088     QAccessibleButton( QObject *o, Role r, QString description = QString::null,
00089         QString help = QString::null );
00090 
00091     QString     text( Text t, int control ) const;
00092     State       state( int control ) const;
00093 
00094     bool        doDefaultAction( int control );
00095 
00096 protected:
00097     QButton *button() const;
00098 };
00099 
00100 class QAccessibleRangeControl : public QAccessibleWidget
00101 {
00102 public:
00103     QAccessibleRangeControl( QObject *o, Role role, QString name = QString::null, 
00104         QString description = QString::null, QString help = QString::null, 
00105         QString defAction = QString::null, QString accelerator = QString::null );
00106 
00107     QString     text( Text t, int control ) const;
00108 };
00109 
00110 class QAccessibleSpinWidget : public QAccessibleRangeControl
00111 {
00112 public:
00113     QAccessibleSpinWidget( QObject *o );
00114 
00115     int         controlAt( int x, int y ) const;
00116     QRect       rect( int control ) const;
00117     int         navigate( NavDirection direction, int startControl ) const;
00118     int         childCount() const;
00119     QRESULT     queryChild( int control, QAccessibleInterface ** ) const;
00120 
00121     QString     text( Text t, int control ) const;
00122     Role        role( int control ) const;
00123     State       state( int control ) const;
00124 
00125     bool        doDefaultAction( int control );
00126 };
00127 
00128 class QAccessibleScrollBar : public QAccessibleRangeControl
00129 {
00130 public:
00131     QAccessibleScrollBar( QObject *o, QString name = QString::null, 
00132         QString description = QString::null, QString help = QString::null, 
00133         QString defAction = QString::null, QString accelerator = QString::null );
00134 
00135     int         controlAt( int x, int y ) const;
00136     QRect       rect( int control ) const;
00137     int         navigate( NavDirection direction, int startControl ) const;
00138     int         childCount() const;
00139     QRESULT     queryChild( int control, QAccessibleInterface ** ) const;
00140 
00141     QString     text( Text t, int control ) const;
00142     Role        role( int control ) const;
00143 
00144     bool        doDefaultAction( int control );
00145 
00146 protected:
00147     QScrollBar *scrollBar() const;
00148 };
00149 
00150 class QAccessibleSlider : public QAccessibleRangeControl
00151 {
00152 public:
00153     QAccessibleSlider( QObject *o, QString name = QString::null, 
00154         QString description = QString::null, QString help = QString::null, 
00155         QString defAction = QString::null, QString accelerator = QString::null );
00156 
00157     int         controlAt( int x, int y ) const;
00158     QRect       rect( int control ) const;
00159     int         navigate( NavDirection direction, int startControl ) const;
00160     int         childCount() const;
00161     QRESULT     queryChild( int control, QAccessibleInterface ** ) const;
00162 
00163     QString     text( Text t, int control ) const;
00164     Role        role( int control ) const;
00165 
00166     bool        doDefaultAction( int control );
00167 
00168 protected:
00169     QSlider *slider() const;
00170 };
00171 
00172 class QAccessibleText : public QAccessibleWidget
00173 {
00174 public:
00175     QAccessibleText( QObject *o, Role role, QString name = QString::null, 
00176         QString description = QString::null, QString help = QString::null, 
00177         QString defAction = QString::null, QString accelerator = QString::null );
00178 
00179     QString     text( Text t, int control ) const;
00180     State       state( int control ) const;
00181     void        setText(Text t, int control, const QString &text);
00182 };
00183 
00184 class QAccessibleDisplay : public QAccessibleWidget
00185 {
00186 public:
00187     QAccessibleDisplay( QObject *o, Role role, QString description = QString::null, 
00188         QString value = QString::null, QString help = QString::null, 
00189         QString defAction = QString::null, QString accelerator = QString::null );
00190 
00191     QString     text( Text t, int control ) const;
00192     Role        role( int control ) const;
00193 };
00194 
00195 class QAccessibleHeader : public QAccessibleWidget
00196 {
00197 public:
00198     QAccessibleHeader( QObject *o, QString description = QString::null, 
00199         QString value = QString::null, QString help = QString::null, 
00200         QString defAction = QString::null, QString accelerator = QString::null );
00201 
00202     int         controlAt( int x, int y ) const;
00203     QRect       rect( int control ) const;
00204     int         navigate( NavDirection direction, int startControl ) const;
00205     int         childCount() const;
00206     QRESULT     queryChild( int control, QAccessibleInterface ** ) const;
00207 
00208     QString     text( Text t, int control ) const;
00209 
00210     Role role( int control ) const;
00211     State state( int control ) const;
00212 
00213 protected:
00214     QHeader *header() const;
00215 };
00216 
00217 class QAccessibleTabBar : public QAccessibleWidget
00218 {
00219 public:
00220     QAccessibleTabBar( QObject *o, QString description = QString::null, 
00221         QString value = QString::null, QString help = QString::null, 
00222         QString defAction = QString::null, QString accelerator = QString::null );
00223 
00224     int         controlAt( int x, int y ) const;
00225     QRect       rect( int control ) const;
00226     int         navigate( NavDirection direction, int startControl ) const;
00227     int         childCount() const;
00228     QRESULT     queryChild( int control, QAccessibleInterface ** ) const;
00229 
00230     QString     text( Text t, int control ) const;
00231 
00232     Role        role( int control ) const;
00233     State       state( int control ) const;
00234 
00235     bool        doDefaultAction( int control );
00236     bool        setSelected( int control, bool on, bool extend );
00237     void        clearSelection();
00238     QMemArray<int> selection() const;    
00239 
00240 protected:
00241     QTabBar *tabBar() const;
00242 };
00243 
00244 class QAccessibleComboBox : public QAccessibleWidget
00245 {
00246 public:
00247     QAccessibleComboBox( QObject *o );
00248 
00249     int         controlAt( int x, int y ) const;
00250     QRect       rect( int control ) const;
00251     int         navigate( NavDirection direction, int startControl ) const;
00252     int         childCount() const;
00253     QRESULT     queryChild( int control, QAccessibleInterface ** ) const;
00254 
00255     QString     text( Text t, int control ) const;
00256 
00257     Role        role( int control ) const;
00258     State       state( int control ) const;
00259 
00260     bool        doDefaultAction( int control );
00261 
00262 protected:
00263     QComboBox *comboBox() const;
00264 };
00265 
00266 class QAccessibleTitleBar : public QAccessibleWidget
00267 {
00268 public:
00269     QAccessibleTitleBar( QObject *o );
00270 
00271     int         controlAt( int x, int y ) const;
00272     QRect       rect( int control ) const;
00273     int         navigate( NavDirection direction, int startControl ) const;
00274     int         childCount() const;
00275     QRESULT     queryChild( int control, QAccessibleInterface ** ) const;
00276 
00277     QString     text( Text t, int control ) const;
00278     Role        role( int control ) const;
00279     State       state( int control ) const;
00280 
00281     bool        doDefaultAction( int control );
00282 
00283 protected:
00284     QTitleBar *titleBar() const;
00285 };
00286 
00287 class QAccessibleScrollView : public QAccessibleWidget
00288 {
00289 public:
00290     QAccessibleScrollView( QObject *o, Role role, QString name = QString::null,
00291         QString description = QString::null, QString value = QString::null, 
00292         QString help = QString::null, QString defAction = QString::null, 
00293         QString accelerator = QString::null );
00294 
00295     QString     text( Text t, int control ) const;
00296 
00297     virtual int itemAt( int x, int y ) const;
00298     virtual QRect itemRect( int item ) const;
00299     virtual int itemCount() const;
00300 };
00301 
00302 class QAccessibleViewport : public QAccessibleWidget
00303 {
00304 public:
00305     QAccessibleViewport( QObject *o, QObject *sv );
00306 
00307     int         controlAt( int x, int y ) const;
00308     QRect       rect( int control ) const;
00309     int         navigate( NavDirection direction, int startControl ) const;
00310     int         childCount() const;
00311 
00312     QString     text( Text t, int control ) const;
00313     Role        role( int control ) const;
00314     State       state( int control ) const;
00315 
00316     bool        doDefaultAction( int control );
00317     bool        setFocus( int control );
00318     bool        setSelected( int control, bool on, bool extend );
00319     void        clearSelection();
00320     QMemArray<int> selection() const;
00321 
00322 protected:
00323     QAccessibleScrollView *scrollView() const;
00324     QScrollView *scrollview;
00325 };
00326 
00327 class QAccessibleListBox : public QAccessibleScrollView
00328 {
00329 public:
00330     QAccessibleListBox( QObject *o );
00331 
00332     int         itemAt( int x, int y ) const;
00333     QRect       itemRect( int item ) const;
00334     int         itemCount() const;
00335 
00336     QString     text( Text t, int control ) const;
00337     Role        role( int control ) const;
00338     State       state( int control ) const;
00339 
00340     bool        setFocus( int control );
00341     bool        setSelected( int control, bool on, bool extend );
00342     void        clearSelection();
00343     QMemArray<int> selection() const;
00344 
00345 protected:
00346     QListBox *listBox() const;
00347 };
00348 
00349 class QAccessibleListView : public QAccessibleScrollView
00350 {
00351 public:
00352     QAccessibleListView( QObject *o );
00353 
00354     int         itemAt( int x, int y ) const;
00355     QRect       itemRect( int item ) const;
00356     int         itemCount() const;
00357 
00358     QString     text( Text t, int control ) const;
00359     Role        role( int control ) const;
00360     State       state( int control ) const;
00361 
00362     bool        setFocus( int control );
00363     bool        setSelected( int control, bool on, bool extend );
00364     void        clearSelection();
00365     QMemArray<int> selection() const;
00366 
00367 protected:
00368     QListView *listView() const;
00369 };
00370 
00371 #ifndef QT_NO_ICONVIEW
00372 class QAccessibleIconView : public QAccessibleScrollView
00373 {
00374 public:
00375     QAccessibleIconView( QObject *o );
00376 
00377     int         itemAt( int x, int y ) const;
00378     QRect       itemRect( int item ) const;
00379     int         itemCount() const;
00380 
00381     QString     text( Text t, int control ) const;
00382     Role        role( int control ) const;
00383     State       state( int control ) const;
00384 
00385     bool        setFocus( int control );
00386     bool        setSelected( int control, bool on, bool extend );
00387     void        clearSelection();
00388     QMemArray<int> selection() const;
00389 
00390 protected:
00391     QIconView *iconView() const;
00392 };
00393 #endif
00394 
00395 class QAccessibleTextEdit : public QAccessibleScrollView
00396 {
00397 public:
00398     QAccessibleTextEdit( QObject *o );
00399 
00400     int         itemAt( int x, int y ) const;
00401     QRect       itemRect( int item ) const;
00402     int         itemCount() const;
00403 
00404     QString     text( Text t, int control ) const;
00405     void        setText(Text t, int control, const QString &text);
00406     Role        role( int control ) const;
00407 
00408 protected:
00409     QTextEdit *textEdit() const;
00410 };
00411 
00412 #endif // Q_ACESSIBLEWIDGET_H
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'