Widgets classes: use "WindowTitle" property instead of "AccessibleName"

As the interface for the "AccessibleName" property might not be available
when Qt was built without accessibility support, use the "WindowTitle"
property instead where appropriate.

Closes #3300101.
This commit is contained in:
Tobias Doerffel
2011-06-27 20:43:09 +02:00
parent 1cc77b72e3
commit e338b34faf
9 changed files with 23 additions and 26 deletions

View File

@@ -1,8 +1,8 @@
/*
* automatable_model_view.cpp - implementation of AutomatableModelView
* AutomatableModelView.cpp - implementation of AutomatableModelView
*
* Copyright (c) 2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -22,7 +22,6 @@
*
*/
#include <QtGui/QMenu>
#include <QtGui/QMouseEvent>
@@ -136,7 +135,6 @@ void AutomatableModelView::addDefaultActions( QMenu * _menu )
void AutomatableModelView::setModel( Model * _model, bool _old_model_valid )
{
ModelView::setModel( _model, _old_model_valid );
//setAccessibleName( _model->displayName();
}

View File

@@ -2,8 +2,8 @@
* automatable_button.cpp - implementation of class automatableButton and
* automatableButtonGroup
*
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2006-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -23,7 +23,6 @@
*
*/
#include "automatable_button.h"
#include <QtGui/QCursor>
@@ -43,7 +42,7 @@ automatableButton::automatableButton( QWidget * _parent,
BoolModelView( new BoolModel( false, NULL, _name, true ), this ),
m_group( NULL )
{
setAccessibleName( _name );
setWindowTitle( _name );
doConnections();
setFocusPolicy( Qt::NoFocus );
}
@@ -171,7 +170,7 @@ automatableButtonGroup::automatableButtonGroup( QWidget * _parent,
IntModelView( new IntModel( 0, 0, 0, NULL, _name, true ), this )
{
hide();
setAccessibleName( _name );
setWindowTitle( _name );
}

View File

@@ -42,7 +42,7 @@ automatableSlider::automatableSlider( QWidget * _parent,
IntModelView( new IntModel( 0, 0, 0, NULL, _name, true ), this ),
m_showStatus( false )
{
setAccessibleName( _name );
setWindowTitle( _name );
connect( this, SIGNAL( valueChanged( int ) ),
this, SLOT( changeValue( int ) ) );

View File

@@ -1,7 +1,7 @@
/*
* combobox.cpp - implementation of LMMS-combobox
*
* Copyright (c) 2006-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2009 Paul Giblock <pgib/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
@@ -75,7 +75,7 @@ comboBox::comboBox( QWidget * _parent, const QString & _name ) :
connect( &m_menu, SIGNAL( triggered( QAction * ) ),
this, SLOT( setItem( QAction * ) ) );
setAccessibleName( _name );
setWindowTitle( _name );
doConnections();
}

View File

@@ -79,7 +79,7 @@ fader::fader( FloatModel * _model, const QString & _name, QWidget * _parent ) :
{
s_textFloat = new textFloat;
}
setAccessibleName( _name );
setWindowTitle( _name );
setAttribute( Qt::WA_OpaquePaintEvent, true );
setMinimumSize( 23, 116 );
setMaximumSize( 23, 116);
@@ -98,7 +98,7 @@ fader::~fader()
void fader::contextMenuEvent( QContextMenuEvent * _ev )
{
captionMenu contextMenu( accessibleName() );
captionMenu contextMenu( windowTitle() );
addDefaultActions( &contextMenu );
contextMenu.exec( QCursor::pos() );
_ev->accept();

View File

@@ -1,7 +1,7 @@
/*
* knob.cpp - powerful knob-widget
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -71,7 +71,7 @@ knob::knob( int _knob_num, QWidget * _parent, const QString & _name ) :
s_textFloat = new textFloat;
}
setAccessibleName( _name );
setWindowTitle( _name );
if( m_knobNum != knobStyled )
{
@@ -572,7 +572,7 @@ void knob::enterValue()
configManager::inst()->value( "app", "displaydbv" ).toInt() )
{
new_val = QInputDialog::getDouble(
this, accessibleName(),
this, windowTitle(),
tr( "Please enter a new value between "
"-96.0 dBV and 6.0 dBV:" ),
20.0 * log10( model()->value() / 100.0 ),
@@ -589,7 +589,7 @@ void knob::enterValue()
else
{
new_val = QInputDialog::getDouble(
this, accessibleName(),
this, windowTitle(),
tr( "Please enter a new value between "
"%1 and %2:" ).
arg( model()->minValue() ).

View File

@@ -1,7 +1,7 @@
/*
* lcd_spinbox.cpp - class lcdSpinBox, an improved QLCDNumber
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008 Paul Giblock <pgllama/at/gmail.com>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
@@ -52,7 +52,7 @@ lcdSpinBox::lcdSpinBox( int _num_digits, QWidget * _parent,
{
setEnabled( true );
setAccessibleName( _name );
setWindowTitle( _name );
m_lcdPixmap = new QPixmap( embed::getIconPixmap( "lcd_19green" ) );
@@ -77,7 +77,7 @@ lcdSpinBox::lcdSpinBox( int _num_digits, const QString & _lcd_style,
{
setEnabled( true );
setAccessibleName( _name );
setWindowTitle( _name );
// We should make a factory for these or something.
m_lcdPixmap = new QPixmap( embed::getIconPixmap( QString( "lcd_" +