diff options
Diffstat (limited to 'src/k9prefauthor.cpp')
-rw-r--r-- | src/k9prefauthor.cpp | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/k9prefauthor.cpp b/src/k9prefauthor.cpp new file mode 100644 index 0000000..6717bce --- /dev/null +++ b/src/k9prefauthor.cpp @@ -0,0 +1,60 @@ +// +// C++ Implementation: +// +// Description: +// +// +// Author: Jean-Michel PETIT <[email protected]>, (C) 2007 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include "k9prefauthor.h" +#include "k9config.h" +#include <qcombobox.h> +#include <knuminput.h> +#include <kcolorbutton.h> +#include <kfontdialog.h> + +k9prefAuthor::k9prefAuthor(QWidget* parent, const char* name, WFlags fl) +: prefAuthor(parent,name,fl) +{ + load(); +} + +void k9prefAuthor::load() { + k9Config config; + cbAudioFormat->setCurrentText(config.getPrefAudioFormat()); + cbAudioBitrate->setCurrentText(QString::number(config.getPrefAudioBitrate())); + inButtonWidth->setValue(config.getPrefButtonWidth()); + inButtonHeight->setValue(config.getPrefButtonHeight()); + cbHiliteColor->setColor(config.getPrefButtonHiliteColor()); + cbTextColor->setColor(config.getPrefButtonTextColor()); + m_font=config.getPrefButtonFont(); +} + +k9prefAuthor::~k9prefAuthor() +{ +} + +/*$SPECIALIZATION$*/ +void k9prefAuthor::bButtonFontClicked() +{ + KFontDialog::getFont( m_font ); +} + +void k9prefAuthor::save() { + k9Config config; + config.setPrefAudioFormat(cbAudioFormat->currentText()); + config.setPrefAudioBitrate(cbAudioBitrate->currentText().toInt()); + config.setPrefButtonWidth(inButtonWidth->value()); + config.setPrefButtonHeight(inButtonHeight->value()); + config.setPrefButtonHiliteColor(cbHiliteColor->color()); + config.setPrefButtonFont(m_font); + config.setPrefButtonTextColor(cbTextColor->color()); + config.save(); +} + +#include "k9prefauthor.moc" + |