LcdSpinBox: adopt naming style convention

This commit is contained in:
Tobias Doerffel
2014-02-20 22:17:28 +01:00
parent 0e8d47cfe0
commit 2591378818
29 changed files with 99 additions and 99 deletions

View File

@@ -32,7 +32,7 @@
#include "endian_handling.h"
#include "config_mgr.h"
#include "engine.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
#include "gui_templates.h"
#include "templates.h"
@@ -502,13 +502,13 @@ AudioAlsa::setupWidget::setupWidget( QWidget * _parent ) :
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );
LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ );
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
m->setStep( 2 );
m->setValue( configManager::inst()->value( "audioalsa",
"channels" ).toInt() );
m_channels = new lcdSpinBox( 1, this );
m_channels = new LcdSpinBox( 1, this );
m_channels->setModel( m );
m_channels->setLabel( tr( "CHANNELS" ) );
m_channels->move( 180, 20 );

View File

@@ -37,7 +37,7 @@
#include "templates.h"
#include "gui_templates.h"
#include "config_mgr.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
#include "AudioPort.h"
#include "MainWindow.h"
@@ -446,13 +446,13 @@ AudioJack::setupWidget::setupWidget( QWidget * _parent ) :
cn_lbl->setFont( pointSize<7>( cn_lbl->font() ) );
cn_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );
LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ );
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
m->setStep( 2 );
m->setValue( configManager::inst()->value( "audiojack",
"channels" ).toInt() );
m_channels = new lcdSpinBox( 1, this );
m_channels = new LcdSpinBox( 1, this );
m_channels->setModel( m );
m_channels->setLabel( tr( "CHANNELS" ) );
m_channels->move( 180, 20 );

View File

@@ -31,7 +31,7 @@
#include <QtGui/QLineEdit>
#include "endian_handling.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
#include "engine.h"
#include "gui_templates.h"
#include "templates.h"
@@ -338,13 +338,13 @@ AudioOss::setupWidget::setupWidget( QWidget * _parent ) :
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );
LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ );
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
m->setStep( 2 );
m->setValue( configManager::inst()->value( "audiooss",
"channels" ).toInt() );
m_channels = new lcdSpinBox( 1, this );
m_channels = new LcdSpinBox( 1, this );
m_channels->setModel( m );
m_channels->setLabel( tr( "CHANNELS" ) );
m_channels->move( 180, 20 );

View File

@@ -47,7 +47,7 @@ void AudioPortAudioSetupUtil::updateChannels()
#include "gui_templates.h"
#include "templates.h"
#include "combobox.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
AudioPortAudio::AudioPortAudio( bool & _success_ful, Mixer * _mixer ) :
@@ -405,13 +405,13 @@ AudioPortAudio::setupWidget::setupWidget( QWidget * _parent ) :
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->move( 8, 38 );
/* lcdSpinBoxModel * m = new lcdSpinBoxModel( );
/* LcdSpinBoxModel * m = new LcdSpinBoxModel( );
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
m->setStep( 2 );
m->setValue( configManager::inst()->value( "audioportaudio",
"channels" ).toInt() );
m_channels = new lcdSpinBox( 1, this );
m_channels = new LcdSpinBox( 1, this );
m_channels->setModel( m );
m_channels->setLabel( tr( "CHANNELS" ) );
m_channels->move( 308, 20 );*/

View File

@@ -31,7 +31,7 @@
#include "endian_handling.h"
#include "config_mgr.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
#include "gui_templates.h"
#include "templates.h"
#include "engine.h"
@@ -289,13 +289,13 @@ AudioPulseAudio::setupWidget::setupWidget( QWidget * _parent ) :
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );
LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ );
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
m->setStep( 2 );
m->setValue( configManager::inst()->value( "audiopa",
"channels" ).toInt() );
m_channels = new lcdSpinBox( 1, this );
m_channels = new LcdSpinBox( 1, this );
m_channels->setModel( m );
m_channels->setLabel( tr( "CHANNELS" ) );
m_channels->move( 180, 20 );

View File

@@ -34,7 +34,7 @@
#include "MidiController.h"
#include "MidiClient.h"
#include "MidiPortMenu.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
#include "led_checkbox.h"
#include "combobox.h"
#include "tab_widget.h"
@@ -142,13 +142,13 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent,
connect( m_midiGroupBox->model(), SIGNAL( dataChanged() ),
this, SLOT( midiToggled() ) );
m_midiChannelSpinBox = new lcdSpinBox( 2, m_midiGroupBox,
m_midiChannelSpinBox = new LcdSpinBox( 2, m_midiGroupBox,
tr( "Input channel" ) );
m_midiChannelSpinBox->addTextForValue( 0, "--" );
m_midiChannelSpinBox->setLabel( tr( "CHANNEL" ) );
m_midiChannelSpinBox->move( 8, 24 );
m_midiControllerSpinBox = new lcdSpinBox( 3, m_midiGroupBox,
m_midiControllerSpinBox = new LcdSpinBox( 3, m_midiGroupBox,
tr( "Input controller" ) );
m_midiControllerSpinBox->addTextForValue( 0, "---" );
m_midiControllerSpinBox->setLabel( tr( "CONTROLLER" ) );

View File

@@ -44,7 +44,7 @@
#include "debug.h"
#include "tooltip.h"
#include "led_checkbox.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
#include "FileDialog.h"

View File

@@ -41,7 +41,7 @@
#include "config_mgr.h"
#include "cpuload_widget.h"
#include "embed.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
#include "MainWindow.h"
#include "MeterDialog.h"
#include "text_float.h"
@@ -115,7 +115,7 @@ songEditor::songEditor( song * _song ) :
engine::mainWindow()->addSpacingToToolBar( 10 );
m_tempoSpinBox = new lcdSpinBox( 3, tb, tr( "Tempo" ) );
m_tempoSpinBox = new LcdSpinBox( 3, tb, tr( "Tempo" ) );
m_tempoSpinBox->setModel( &m_s->m_tempoModel );
m_tempoSpinBox->setLabel( tr( "TEMPO/BPM" ) );
toolTip::add( m_tempoSpinBox, tr( "tempo of song" ) );

View File

@@ -32,7 +32,7 @@
#include "embed.h"
#include "group_box.h"
#include "gui_templates.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
#include "MidiClient.h"
#include "Mixer.h"
#include "tooltip.h"
@@ -54,13 +54,13 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) :
midiInputLayout->setContentsMargins( 8, 18, 8, 8 );
midiInputLayout->setSpacing( 6 );
m_inputChannelSpinBox = new lcdSpinBox( 2, m_midiInputGroupBox );
m_inputChannelSpinBox = new LcdSpinBox( 2, m_midiInputGroupBox );
m_inputChannelSpinBox->addTextForValue( 0, "--" );
m_inputChannelSpinBox->setLabel( tr( "CHANNEL" ) );
m_inputChannelSpinBox->setEnabled( false );
midiInputLayout->addWidget( m_inputChannelSpinBox );
m_fixedInputVelocitySpinBox = new lcdSpinBox( 3, m_midiInputGroupBox );
m_fixedInputVelocitySpinBox = new LcdSpinBox( 3, m_midiInputGroupBox );
m_fixedInputVelocitySpinBox->setDisplayOffset( 1 );
m_fixedInputVelocitySpinBox->addTextForValue( 0, "---" );
m_fixedInputVelocitySpinBox->setLabel( tr( "VELOCITY" ) );
@@ -82,24 +82,24 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) :
midiOutputLayout->setContentsMargins( 8, 18, 8, 8 );
midiOutputLayout->setSpacing( 6 );
m_outputChannelSpinBox = new lcdSpinBox( 2, m_midiOutputGroupBox );
m_outputChannelSpinBox = new LcdSpinBox( 2, m_midiOutputGroupBox );
m_outputChannelSpinBox->setLabel( tr( "CHANNEL" ) );
m_outputChannelSpinBox->setEnabled( false );
midiOutputLayout->addWidget( m_outputChannelSpinBox );
m_fixedOutputVelocitySpinBox = new lcdSpinBox( 3, m_midiOutputGroupBox );
m_fixedOutputVelocitySpinBox = new LcdSpinBox( 3, m_midiOutputGroupBox );
m_fixedOutputVelocitySpinBox->setDisplayOffset( 1 );
m_fixedOutputVelocitySpinBox->addTextForValue( 0, "---" );
m_fixedOutputVelocitySpinBox->setLabel( tr( "VELOCITY" ) );
m_fixedOutputVelocitySpinBox->setEnabled( false );
midiOutputLayout->addWidget( m_fixedOutputVelocitySpinBox );
m_outputProgramSpinBox = new lcdSpinBox( 3, m_midiOutputGroupBox );
m_outputProgramSpinBox = new LcdSpinBox( 3, m_midiOutputGroupBox );
m_outputProgramSpinBox->setLabel( tr( "PROGRAM" ) );
m_outputProgramSpinBox->setEnabled( false );
midiOutputLayout->addWidget( m_outputProgramSpinBox );
m_fixedOutputNoteSpinBox = new lcdSpinBox( 3, m_midiOutputGroupBox );
m_fixedOutputNoteSpinBox = new LcdSpinBox( 3, m_midiOutputGroupBox );
m_fixedOutputNoteSpinBox->setDisplayOffset( 1 );
m_fixedOutputNoteSpinBox->addTextForValue( 0, "---" );
m_fixedOutputNoteSpinBox->setLabel( tr( "NOTE" ) );

View File

@@ -1,5 +1,5 @@
/*
* lcd_spinbox.cpp - class lcdSpinBox, an improved QLCDNumber
* lcd_spinbox.cpp - class LcdSpinBox, an improved QLCDNumber
*
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008 Paul Giblock <pgllama/at/gmail.com>
@@ -30,7 +30,7 @@
#include <QtGui/QFontMetrics>
#include <QtGui/QStyleOptionFrameV2>
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
#include "caption_menu.h"
#include "engine.h"
#include "embed.h"
@@ -40,7 +40,7 @@
lcdSpinBox::lcdSpinBox( int numDigits, QWidget* parent, const QString& name ) :
LcdSpinBox::LcdSpinBox( int numDigits, QWidget* parent, const QString& name ) :
LcdWidget( numDigits, parent, name ),
IntModelView( new IntModel( 0, 0, 0, NULL, name, true ), this ),
m_mouseMoving( false ),
@@ -52,7 +52,7 @@ lcdSpinBox::lcdSpinBox( int numDigits, QWidget* parent, const QString& name ) :
lcdSpinBox::lcdSpinBox( int numDigits, const QString& style, QWidget* parent, const QString& name ) :
LcdSpinBox::LcdSpinBox( int numDigits, const QString& style, QWidget* parent, const QString& name ) :
LcdWidget( numDigits, parent, name ),
IntModelView( new IntModel( 0, 0, 0, NULL, name, true ), this ),
m_mouseMoving( false ),
@@ -63,13 +63,13 @@ lcdSpinBox::lcdSpinBox( int numDigits, const QString& style, QWidget* parent, co
lcdSpinBox::~lcdSpinBox()
LcdSpinBox::~LcdSpinBox()
{
}
void lcdSpinBox::update()
void LcdSpinBox::update()
{
setValue( model()->value() + m_displayOffset );
@@ -78,7 +78,7 @@ void lcdSpinBox::update()
void lcdSpinBox::contextMenuEvent( QContextMenuEvent* event )
void LcdSpinBox::contextMenuEvent( QContextMenuEvent* event )
{
// for the case, the user clicked right while pressing left mouse-
// button, the context-menu appears while mouse-cursor is still hidden
@@ -94,7 +94,7 @@ void lcdSpinBox::contextMenuEvent( QContextMenuEvent* event )
void lcdSpinBox::mousePressEvent( QMouseEvent* event )
void LcdSpinBox::mousePressEvent( QMouseEvent* event )
{
if( event->button() == Qt::LeftButton &&
! ( event->modifiers() & Qt::ControlModifier ) &&
@@ -114,7 +114,7 @@ void lcdSpinBox::mousePressEvent( QMouseEvent* event )
void lcdSpinBox::mouseMoveEvent( QMouseEvent* event )
void LcdSpinBox::mouseMoveEvent( QMouseEvent* event )
{
if( m_mouseMoving )
{
@@ -132,7 +132,7 @@ void lcdSpinBox::mouseMoveEvent( QMouseEvent* event )
void lcdSpinBox::mouseReleaseEvent( QMouseEvent* )
void LcdSpinBox::mouseReleaseEvent( QMouseEvent* )
{
if( m_mouseMoving )
{
@@ -148,7 +148,7 @@ void lcdSpinBox::mouseReleaseEvent( QMouseEvent* )
void lcdSpinBox::wheelEvent( QWheelEvent * _we )
void LcdSpinBox::wheelEvent( QWheelEvent * _we )
{
_we->accept();
model()->setInitValue( model()->value() +
@@ -158,5 +158,5 @@ void lcdSpinBox::wheelEvent( QWheelEvent * _we )
#include "moc_lcd_spinbox.cxx"
#include "moc_LcdSpinBox.cxx"

View File

@@ -32,7 +32,7 @@
#include "MeterModel.h"
#include "embed.h"
#include "gui_templates.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
MeterDialog::MeterDialog( QWidget * _parent, bool _simple ) :
@@ -49,7 +49,7 @@ MeterDialog::MeterDialog( QWidget * _parent, bool _simple ) :
num_layout->setMargin( 0 );
m_numerator = new lcdSpinBox( 2, num, tr( "Meter Numerator" ) );
m_numerator = new LcdSpinBox( 2, num, tr( "Meter Numerator" ) );
num_layout->addWidget( m_numerator );
@@ -69,7 +69,7 @@ MeterDialog::MeterDialog( QWidget * _parent, bool _simple ) :
den_layout->setSpacing( 0 );
den_layout->setMargin( 0 );
m_denominator = new lcdSpinBox( 2, den, tr( "Meter Denominator" ) );
m_denominator = new LcdSpinBox( 2, den, tr( "Meter Denominator" ) );
if( _simple )
{
m_denominator->setLabel( tr( "TIME SIG" ) );

View File

@@ -60,7 +60,7 @@
#include "InstrumentFunctionViews.h"
#include "InstrumentMidiIOView.h"
#include "knob.h"
#include "lcd_spinbox.h"
#include "LcdSpinBox.h"
#include "led_checkbox.h"
#include "MainWindow.h"
#include "MidiClient.h"
@@ -1103,12 +1103,12 @@ void InstrumentTrackView::midiConfigChanged()
class fxLineLcdSpinBox : public lcdSpinBox
class fxLineLcdSpinBox : public LcdSpinBox
{
public:
fxLineLcdSpinBox( int _num_digits, QWidget * _parent,
const QString & _name ) :
lcdSpinBox( _num_digits, _parent, _name ) {}
LcdSpinBox( _num_digits, _parent, _name ) {}
protected:
virtual void mouseDoubleClickEvent ( QMouseEvent * _me )
@@ -1183,7 +1183,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
basicControlsLayout->addWidget( m_pitchKnob );
// set up pitch range knob
m_pitchRangeSpinBox= new lcdSpinBox( 2, NULL, tr( "Pitch range (semitones)" ) );
m_pitchRangeSpinBox= new LcdSpinBox( 2, NULL, tr( "Pitch range (semitones)" ) );
m_pitchRangeSpinBox->setLabel( tr( "RANGE" ) );
basicControlsLayout->addWidget( m_pitchRangeSpinBox );