X-Git-Url: http://git.maemo.org/git/?p=qstardict;a=blobdiff_plain;f=qstardict%2Fdictwidget.cpp;h=5bbaafab6a1fd9a34e2203abdc489280a3a56d41;hp=f0d4ad6130c796be6122f042b2559f038dd5772d;hb=refs%2Fheads%2Fmaster;hpb=15ae4fc455d1171c3406300abf80a18014a61dff diff --git a/qstardict/dictwidget.cpp b/qstardict/dictwidget.cpp index f0d4ad6..5bbaafa 100644 --- a/qstardict/dictwidget.cpp +++ b/qstardict/dictwidget.cpp @@ -104,7 +104,7 @@ DictWidget::DictWidget(QWidget *parent, Qt::WindowFlags f) actionSpeak->setFont(font); QSize toolBarSize; toolBarSize.setWidth(70); - toolBarSize.setHeight(60); + toolBarSize.setHeight(50); m_toolBar->setIconSize(toolBarSize); QVBoxLayout *layout = new QVBoxLayout(this); @@ -115,6 +115,12 @@ DictWidget::DictWidget(QWidget *parent, Qt::WindowFlags f) setLayout(layout); } +void DictWidget::toggleToolBar(bool CheckedState) +{ + CheckedState ? this->m_toolBar->show() : this->m_toolBar->hide(); + //m_toolBar->setVisible(CheckedState); +} + void DictWidget::translate(const QString &str) { m_translationView->setSource(QUrl("qstardict:" + str)); @@ -133,7 +139,7 @@ void DictWidget::saveToFile() QFileDialog dialog(this, tr("Save translation"), dir.path(), filter); //updated by Frank dialog.selectFile(translatedWord());//added by Frank - dialog.setNameFilters(QStringList() << tr("HTML files (*.html *.htm)") << tr("Text files (*.txt)"));//updated by Frank + dialog.setNameFilters(QStringList() << tr("HTML files (*.html, *.htm)") << tr("Text files (*.txt)"));//updated by Frank dialog.selectNameFilter(filter); //added by Frank if (dialog.exec() && dialog.selectedFiles().size())