upgraded combo boxes

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@220 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Javier Serrano Polo
2006-07-10 00:41:44 +00:00
parent f1a93f3ab6
commit 509c699e27
5 changed files with 24 additions and 20 deletions

View File

@@ -204,7 +204,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( instrumentTrack * _instrument_trac
CHORDS_GROUPBOX_WIDTH,
CHORDS_GROUPBOX_HEIGHT );
m_chordsComboBox = new comboBox( m_chordsGroupBox, eng() );
m_chordsComboBox = new comboBox( m_chordsGroupBox, tr( "Chord type" ),
eng(), _instrument_track );
m_chordsComboBox->setFont( pointSize<8>( m_chordsComboBox->font() ) );
m_chordsComboBox->setGeometry( 10, 25, 140, 22 );
@@ -257,7 +258,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( instrumentTrack * _instrument_trac
"not played at the same time. Typical arpeggios are "
"major or minor triads. But there're a lot of other "
"possible chords, you can select." ) );
m_arpComboBox = new comboBox( m_arpGroupBox, eng() );
m_arpComboBox = new comboBox( m_arpGroupBox, tr( "Arpeggio type" ),
eng(), _instrument_track );
m_arpComboBox->setFont( pointSize<8>( m_arpComboBox->font() ) );
m_arpComboBox->setGeometry( 10, 25, 140, 22 );
@@ -395,7 +397,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( instrumentTrack * _instrument_trac
mode_lbl->setGeometry( 10, 104, 64, 10 );
mode_lbl->setFont( pointSize<7>( mode_lbl->font() ) );
m_arpModeComboBox = new comboBox( m_arpGroupBox, eng() );
m_arpModeComboBox = new comboBox( m_arpGroupBox, tr( "Arpeggio mode" ),
eng(), _instrument_track );
m_arpModeComboBox->setFont( pointSize<8>( m_arpModeComboBox->font() ) );
m_arpModeComboBox->setGeometry( 10, 118, 128, 22 );
@@ -658,11 +661,11 @@ void arpAndChordsTabWidget::saveSettings( QDomDocument & _doc,
QDomElement & _this )
{
_this.setAttribute( "chorddisabled", !m_chordsGroupBox->isActive() );
_this.setAttribute( "chord", m_chordsComboBox->value() );
m_chordsComboBox->saveSettings( _doc, _this, "chord" );
m_chordRangeKnob->saveSettings( _doc, _this, "chordrange" );
_this.setAttribute( "arpdisabled", !m_arpGroupBox->isActive() );
_this.setAttribute( "arp", m_arpComboBox->value() );
m_arpComboBox->saveSettings( _doc, _this, "arp" );
m_arpRangeKnob->saveSettings( _doc, _this, "arprange" );
m_arpTimeKnob->saveSettings( _doc, _this, "arptime" );
m_arpGateKnob->saveSettings( _doc, _this, "arpgate" );
@@ -670,7 +673,7 @@ void arpAndChordsTabWidget::saveSettings( QDomDocument & _doc,
_this.setAttribute( "arpsyncmode",
( int ) m_arpTimeKnob->getSyncMode() );
_this.setAttribute( "arpmode", m_arpModeComboBox->value() );
m_arpModeComboBox->saveSettings( _doc, _this, "arpmode" );
}
@@ -680,9 +683,9 @@ void arpAndChordsTabWidget::loadSettings( const QDomElement & _this )
{
m_chordsGroupBox->setState( !_this.attribute
( "chorddisabled" ).toInt() );
m_chordsComboBox->setValue( _this.attribute( "chord" ).toInt() );
m_chordsComboBox->loadSettings( _this, "chord" );
m_chordRangeKnob->loadSettings( _this, "chordrange" );
m_arpComboBox->setValue( _this.attribute( "arp" ).toInt() );
m_arpComboBox->loadSettings( _this, "arp" );
m_arpRangeKnob->loadSettings( _this, "arprange" );
m_arpTimeKnob->loadSettings( _this, "arptime" );
m_arpGateKnob->loadSettings( _this, "arpgate" );
@@ -699,7 +702,7 @@ void arpAndChordsTabWidget::loadSettings( const QDomElement & _this )
( tempoSyncKnob::tempoSyncMode ) _this.attribute(
"arpsyncmode" ).toInt() );
m_arpModeComboBox->setValue( _this.attribute( "arpmode" ).toInt() );
m_arpModeComboBox->loadSettings( _this, "arpmode" );
m_arpGroupBox->setState( _this.attribute( "arpdir" ).toInt() != OFF &&
!_this.attribute( "arpdisabled" ).toInt() );

View File

@@ -319,7 +319,7 @@ automationEditor::automationEditor( engine * _engine ) :
QLabel * zoom_x_lbl = new QLabel( m_toolBar );
zoom_x_lbl->setPixmap( embed::getIconPixmap( "zoom_x" ) );
m_zoomingXComboBox = new comboBox( m_toolBar, eng() );
m_zoomingXComboBox = new comboBox( m_toolBar, NULL, eng(), NULL );
m_zoomingXComboBox->setFixedSize( 80, 22 );
for( int i = 0; i < 6; ++i )
{
@@ -333,7 +333,7 @@ automationEditor::automationEditor( engine * _engine ) :
QLabel * zoom_y_lbl = new QLabel( m_toolBar );
zoom_y_lbl->setPixmap( embed::getIconPixmap( "zoom_y" ) );
m_zoomingYComboBox = new comboBox( m_toolBar, eng() );
m_zoomingYComboBox = new comboBox( m_toolBar, NULL, eng(), NULL );
m_zoomingYComboBox->setFixedSize( 80, 22 );
for( int i = 0; i < 6; ++i )
{
@@ -348,7 +348,7 @@ automationEditor::automationEditor( engine * _engine ) :
QLabel * quantize_lbl = new QLabel( m_toolBar );
quantize_lbl->setPixmap( embed::getIconPixmap( "quantize" ) );
m_quantizeComboBox = new comboBox( m_toolBar, eng() );
m_quantizeComboBox = new comboBox( m_toolBar, NULL, eng(), NULL );
m_quantizeComboBox->setFixedSize( 60, 22 );
for( int i = 0; i < 7; ++i )
{

View File

@@ -143,7 +143,8 @@ envelopeTabWidget::envelopeTabWidget( instrumentTrack * _instrument_track ) :
FILTER_GROUPBOX_WIDTH,
FILTER_GROUPBOX_HEIGHT );
m_filterComboBox = new comboBox( m_filterGroupBox, eng() );
m_filterComboBox = new comboBox( m_filterGroupBox, tr( "Filter type" ),
eng(), _instrument_track );
m_filterComboBox->setGeometry( 14, 22, 120, 22 );
m_filterComboBox->setFont( pointSize<8>( m_filterComboBox->font() ) );
@@ -505,7 +506,7 @@ f_cnt_t envelopeTabWidget::releaseFrames( const bool _only_vol )
void envelopeTabWidget::saveSettings( QDomDocument & _doc, QDomElement & _this )
{
_this.setAttribute( "ftype", m_filterComboBox->value() );
m_filterComboBox->saveSettings( _doc, _this, "ftype" );
m_filterCutKnob->saveSettings( _doc, _this, "fcut" );
m_filterResKnob->saveSettings( _doc, _this, "fres" );
_this.setAttribute( "fwet", m_filterGroupBox->isActive() );
@@ -523,7 +524,7 @@ void envelopeTabWidget::saveSettings( QDomDocument & _doc, QDomElement & _this )
void envelopeTabWidget::loadSettings( const QDomElement & _this )
{
m_filterComboBox->setValue( _this.attribute( "ftype" ).toInt() );
m_filterComboBox->loadSettings( _this, "ftype" );
m_filterCutKnob->loadSettings( _this, "fcut" );
m_filterResKnob->loadSettings( _this, "fres" );
/* m_filterState->setChecked( _this.attribute( "fwet" ).toInt() );*/

View File

@@ -153,7 +153,7 @@ exportProjectDialog::exportProjectDialog( const QString & _file_name,
m_typeLbl->setGeometry( LABEL_X, TYPE_STUFF_Y, LABEL_WIDTH,
TYPE_HEIGHT );
m_typeCombo = new comboBox( this, eng() );
m_typeCombo = new comboBox( this, NULL, eng(), NULL );
m_typeCombo->setGeometry( LABEL_X + LABEL_WIDTH+LABEL_MARGIN,
TYPE_STUFF_Y, TYPE_COMBO_WIDTH,
TYPE_HEIGHT );
@@ -176,7 +176,7 @@ exportProjectDialog::exportProjectDialog( const QString & _file_name,
m_kbpsLbl->setGeometry( LABEL_X, KBPS_STUFF_Y, LABEL_WIDTH,
KBPS_HEIGHT );
m_kbpsCombo = new comboBox( this, eng() );
m_kbpsCombo = new comboBox( this, NULL, eng(), NULL );
m_kbpsCombo->setGeometry( LABEL_X + LABEL_WIDTH + LABEL_MARGIN,
KBPS_STUFF_Y, KBPS_COMBO_WIDTH,
KBPS_HEIGHT );

View File

@@ -397,7 +397,7 @@ pianoRoll::pianoRoll( engine * _engine ) :
zoom_lbl->setPixmap( embed::getIconPixmap( "zoom" ) );
// setup zooming-stuff
m_zoomingComboBox = new comboBox( m_toolBar, eng() );
m_zoomingComboBox = new comboBox( m_toolBar, NULL, eng(), NULL );
m_zoomingComboBox->setFixedSize( 80, 22 );
for( int i = 0; i < 6; ++i )
{
@@ -413,7 +413,7 @@ pianoRoll::pianoRoll( engine * _engine ) :
QLabel * quantize_lbl = new QLabel( m_toolBar );
quantize_lbl->setPixmap( embed::getIconPixmap( "quantize" ) );
m_quantizeComboBox = new comboBox( m_toolBar, eng() );
m_quantizeComboBox = new comboBox( m_toolBar, NULL, eng(), NULL );
m_quantizeComboBox->setFixedSize( 60, 22 );
for( int i = 0; i < 7; ++i )
{
@@ -426,7 +426,7 @@ pianoRoll::pianoRoll( engine * _engine ) :
QLabel * note_len_lbl = new QLabel( m_toolBar );
note_len_lbl->setPixmap( embed::getIconPixmap( "note" ) );
m_noteLenComboBox = new comboBox( m_toolBar, eng() );
m_noteLenComboBox = new comboBox( m_toolBar, NULL, eng(), NULL );
m_noteLenComboBox->setFixedSize( 120, 22 );
m_noteLenComboBox->addItem( tr( "Last note" ),
embed::getIconPixmap( "edit_draw" ) );