upgraded buttons

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@191 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Javier Serrano Polo
2006-07-02 21:39:43 +00:00
parent dcd6bf6b7a
commit 19924ef442
18 changed files with 110 additions and 82 deletions

View File

@@ -137,7 +137,8 @@ envelopeTabWidget::envelopeTabWidget( instrumentTrack * _instrument_track ) :
}
m_filterGroupBox = new groupBox( tr( "FILTER" ), this, eng() );
m_filterGroupBox = new groupBox( tr( "FILTER" ), this, eng(),
_instrument_track );
m_filterGroupBox->setGeometry( FILTER_GROUPBOX_X, FILTER_GROUPBOX_Y,
FILTER_GROUPBOX_WIDTH,
FILTER_GROUPBOX_HEIGHT );

View File

@@ -192,14 +192,15 @@ exportProjectDialog::exportProjectDialog( const QString & _file_name,
QString::number( 128 ) ) );
m_vbrCb = new ledCheckBox( tr( "variable bitrate" ), this, eng() );
m_vbrCb = new ledCheckBox( tr( "variable bitrate" ), this, NULL, eng(),
NULL );
m_vbrCb->setGeometry( LABEL_X + LABEL_WIDTH + 3 * LABEL_MARGIN +
KBPS_COMBO_WIDTH, KBPS_STUFF_Y + 3, 190, 20 );
m_vbrCb->setChecked( TRUE );
m_hqmCb = new ledCheckBox( tr( "use high-quality-mode (recommened)" ),
this, eng() );
this, NULL, eng(), NULL );
m_hqmCb->setGeometry( LABEL_X, HQ_MODE_CB_Y + 3, HQ_MODE_CB_WIDTH,
HQ_MODE_CB_HEIGHT );
m_hqmCb->setChecked( TRUE );

View File

@@ -96,7 +96,9 @@ midiTabWidget::midiTabWidget( instrumentTrack * _instrument_track,
m_receiveCheckBox = new ledCheckBox( tr( "Receive MIDI-events" ),
m_setupTabWidget, eng() );
m_setupTabWidget,
tr( "Receive MIDI-events" ),
eng(), _instrument_track );
m_receiveCheckBox->move( 10, 34 );
connect( m_receiveCheckBox, SIGNAL( toggled( bool ) ),
this, SLOT( midiPortModeToggled( bool ) ) );
@@ -105,14 +107,18 @@ midiTabWidget::midiTabWidget( instrumentTrack * _instrument_track,
m_defaultVelocityInCheckBox = new ledCheckBox( tr( "Default velocity "
"for all input-events" ),
m_setupTabWidget, eng() );
m_setupTabWidget,
tr( "Default input velocity" ),
eng(), _instrument_track );
m_defaultVelocityInCheckBox->move( 28, 84 );
connect( m_defaultVelocityInCheckBox, SIGNAL( toggled( bool ) ),
this, SLOT( defaultVelInChanged( bool ) ) );
m_sendCheckBox = new ledCheckBox( tr( "Send MIDI-events" ),
m_setupTabWidget, eng() );
m_setupTabWidget,
tr( "Send MIDI-events" ),
eng(), _instrument_track );
m_sendCheckBox->move( 10, 114 );
connect( m_sendCheckBox, SIGNAL( toggled( bool ) ),
this, SLOT( midiPortModeToggled( bool ) ) );
@@ -121,7 +127,9 @@ midiTabWidget::midiTabWidget( instrumentTrack * _instrument_track,
m_defaultVelocityOutCheckBox = new ledCheckBox( tr( "Default velocity "
"for all output-events" ),
m_setupTabWidget, eng() );
m_setupTabWidget,
tr( "Default output velocity" ),
eng(), _instrument_track );
m_defaultVelocityOutCheckBox->move( 28, 164 );
connect( m_defaultVelocityOutCheckBox, SIGNAL( toggled( bool ) ),
this, SLOT( defaultVelOutChanged( bool ) ) );
@@ -211,12 +219,10 @@ void midiTabWidget::saveSettings( QDomDocument & _doc, QDomElement & _this )
{
_this.setAttribute( "inputchannel", m_inputChannelSpinBox->value() );
_this.setAttribute( "outputchannel", m_outputChannelSpinBox->value() );
_this.setAttribute( "receive", m_receiveCheckBox->isChecked() );
_this.setAttribute( "send", m_sendCheckBox->isChecked() );
_this.setAttribute( "defvelin",
m_defaultVelocityInCheckBox->isChecked() );
_this.setAttribute( "defvelout",
m_defaultVelocityOutCheckBox->isChecked() );
m_receiveCheckBox->saveSettings( _doc, _this, "receive" );
m_sendCheckBox->saveSettings( _doc, _this, "send" );
m_defaultVelocityInCheckBox->saveSettings( _doc, _this, "defvelin" );
m_defaultVelocityOutCheckBox->saveSettings( _doc, _this, "defvelout" );
if( m_readablePorts != NULL && m_receiveCheckBox->isChecked() == TRUE )
{
@@ -290,12 +296,10 @@ void midiTabWidget::loadSettings( const QDomElement & _this )
).toInt() );
m_outputChannelSpinBox->setValue( _this.attribute( "outputchannel"
).toInt() );
m_receiveCheckBox->setChecked( _this.attribute( "receive" ).toInt() );
m_sendCheckBox->setChecked( _this.attribute( "send" ).toInt() );
m_defaultVelocityInCheckBox->setChecked(
_this.attribute( "defvelin" ).toInt() );
m_defaultVelocityOutCheckBox->setChecked(
_this.attribute( "defvelout" ).toInt() );
m_receiveCheckBox->loadSettings( _this, "receive" );
m_sendCheckBox->loadSettings( _this, "send" );
m_defaultVelocityInCheckBox->loadSettings( _this, "defvelin" );
m_defaultVelocityOutCheckBox->loadSettings( _this, "defvelout" );
// restore connections

View File

@@ -194,7 +194,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * disable_tooltips = new ledCheckBox(
tr( "Disable tooltips (no spurious "
"interrupts while playing)" ),
misc_tw, eng() );
misc_tw, NULL, eng(), NULL );
disable_tooltips->move( 10, 18 );
disable_tooltips->setChecked( m_disableToolTips );
connect( disable_tooltips, SIGNAL( toggled( bool ) ),
@@ -205,7 +205,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
tr( "Classical knob usability (move "
"cursor around knob to change "
"value)" ),
misc_tw, eng() );
misc_tw, NULL, eng(), NULL );
classical_knob_usability->move( 10, 36 );
classical_knob_usability->setChecked( m_classicalKnobUsability );
connect( classical_knob_usability, SIGNAL( toggled( bool ) ),
@@ -214,7 +214,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * gimp_like_windows = new ledCheckBox(
tr( "GIMP-like windows (no MDI)" ),
misc_tw, eng() );
misc_tw, NULL, eng(), NULL );
gimp_like_windows->move( 10, 54 );
gimp_like_windows->setChecked( m_gimpLikeWindows );
connect( gimp_like_windows, SIGNAL( toggled( bool ) ),
@@ -222,8 +222,8 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * no_wizard = new ledCheckBox(
tr( "Do not show wizard after "
"up-/downgrade" ), misc_tw, eng() );
tr( "Do not show wizard after up-/downgrade" ),
misc_tw, NULL, eng(), NULL );
no_wizard->move( 10, 72 );
no_wizard->setChecked( m_noWizard );
connect( no_wizard, SIGNAL( toggled( bool ) ),
@@ -233,7 +233,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * no_msg = new ledCheckBox(
tr( "Do not show message after "
"closing this dialog" ),
misc_tw, eng() );
misc_tw, NULL, eng(), NULL );
no_msg->move( 10, 90 );
no_msg->setChecked( m_noMsgAfterSetup );
connect( no_msg, SIGNAL( toggled( bool ) ),
@@ -242,7 +242,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * dbv = new ledCheckBox(
tr( "Display volume as dbV " ),
misc_tw, eng() );
misc_tw, NULL, eng(), NULL );
dbv->move( 10, 108 );
dbv->setChecked( m_displaydBV );
connect( dbv, SIGNAL( toggled( bool ) ),
@@ -367,7 +367,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * disable_ch_act_ind = new ledCheckBox(
tr( "Disable channel activity indicators" ),
ui_fx_tw, eng() );
ui_fx_tw, NULL, eng(), NULL );
disable_ch_act_ind->move( 10, 20 );
disable_ch_act_ind->setChecked( m_disableChActInd );
connect( disable_ch_act_ind, SIGNAL( toggled( bool ) ),
@@ -376,7 +376,7 @@ setupDialog::setupDialog( engine * _engine, configTabs _tab_to_open ) :
ledCheckBox * manual_ch_piano = new ledCheckBox(
tr( "Only press keys on channel-piano manually" ),
ui_fx_tw, eng() );
ui_fx_tw, NULL, eng(), NULL );
manual_ch_piano->move( 10, 40 );
manual_ch_piano->setChecked( m_manualChPiano );
connect( manual_ch_piano, SIGNAL( toggled( bool ) ),

View File

@@ -1000,7 +1000,9 @@ trackOperationsWidget::trackOperationsWidget( trackWidget * _parent ) :
toolTip::add( m_trackOps, tr( "Actions for this track" ) );
m_muteBtn = new pixmapButton( this, m_trackWidget->getTrack()->eng() );
m_muteBtn = new pixmapButton( this, tr( "Mute" ),
m_trackWidget->getTrack()->eng(),
m_trackWidget->getTrack() );
m_muteBtn->setActiveGraphic( embed::getIconPixmap( "mute_on" ) );
m_muteBtn->setInactiveGraphic( embed::getIconPixmap( "mute_off" ) );
m_muteBtn->setCheckable( TRUE );

View File

@@ -58,7 +58,7 @@ QPixmap * groupBox::s_ledBg = NULL;
groupBox::groupBox( const QString & _caption, QWidget * _parent,
engine * _engine ) :
engine * _engine, track * _track ) :
QWidget( _parent ),
engineObject( _engine ),
m_caption( _caption ),
@@ -77,7 +77,7 @@ groupBox::groupBox( const QString & _caption, QWidget * _parent,
updatePixmap();
m_led = new pixmapButton( this, eng() );
m_led = new pixmapButton( this, _caption, eng(), _track );
m_led->setCheckable( TRUE );
m_led->move( 2, 3 );
m_led->setActiveGraphic( embed::getIconPixmap( "led_green" ) );

View File

@@ -55,8 +55,10 @@ static const QString names[ledCheckBox::TOTAL_COLORS] =
ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent,
engine * _engine, ledColors _color ) :
automatableButton( _parent, _engine ),
const QString & _name,
engine * _engine, track * _track,
ledColors _color ) :
automatableButton( _parent, _name, _engine, _track ),
m_text( _text )
{
setCheckable( TRUE );

View File

@@ -45,8 +45,9 @@
pixmapButton::pixmapButton( QWidget * _parent, engine * _engine ) :
automatableButton( _parent, _engine ),
pixmapButton::pixmapButton( QWidget * _parent, const QString & _name,
engine * _engine, track * _track ) :
automatableButton( _parent, _name, _engine, _track ),
m_activePixmap(),
m_inactivePixmap(),
m_bgPixmap()