23 #include <QPushButton>
29 const QString & caption,
const QString & directory,
30 const QString & filter,
const QString & encoding )
31 : QFileDialog( parent, caption, directory, filter )
35 mEncodingComboBox =
new QComboBox(
this );
36 QLabel* l =
new QLabel(
tr(
"Encoding:" ),
this );
37 layout()->addWidget( l );
38 layout()->addWidget( mEncodingComboBox );
44 if ( encoding.isEmpty() )
47 enc = settings.value(
"/UI/encoding",
"System" ).toString();
52 int encindex = mEncodingComboBox->findText( enc );
55 mEncodingComboBox->insertItem( 0, enc );
58 mEncodingComboBox->setCurrentIndex( encindex );
64 selectNameFilter( nameFilters().at( 0 ) );
79 return mEncodingComboBox->currentText();
85 settings.setValue(
"/UI/encoding",
encoding() );
91 if ( ! mCancelAllButton )
93 mCancelAllButton =
new QPushButton(
tr(
"Cancel &All" ), NULL );
94 layout()->addWidget( mCancelAllButton );