diff options
Diffstat (limited to 'src/k9prefpreview.cpp')
-rw-r--r-- | src/k9prefpreview.cpp | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/src/k9prefpreview.cpp b/src/k9prefpreview.cpp new file mode 100644 index 0000000..e1c4fbf --- /dev/null +++ b/src/k9prefpreview.cpp @@ -0,0 +1,76 @@ +// +// C++ Implementation: +// +// Description: +// +// +// Author: Jean-Michel PETIT <[email protected]>, (C) 2006 +// +// Copyright: See COPYING file that comes with this distribution +// +// + + +#include "k9prefpreview.h" +#include "k9config.h" +#include <qwidgetstack.h> +#include <qradiobutton.h> +#include <qcombobox.h> +#include <qcheckbox.h> +#include <klocale.h> + +k9prefPreview::k9prefPreview(QWidget* parent, const char* name, WFlags fl) +: prefPreview(parent,name,fl) +{ load(); +} + +k9prefPreview::~k9prefPreview() +{ +} + +/*$SPECIALIZATION$*/ + +void k9prefPreview::load() { + k9Config config; + + ckUseGL->setChecked(config.getUseGL()); + cbVout->setCurrentItem(config.getMplayerVout()); + cbAout->setCurrentItem(config.getMplayerAout()); + rbMplayer->setChecked(config.getUseMplayer()); + rbInternal->setChecked(!config.getUseMplayer()); + + if (rbMplayer->isChecked()) + rbMplayerClick(); + else + rbInternalClick(); + +} + + + +void k9prefPreview::save() { + k9Config config; + + if (rbMplayer->isChecked()) { + config.setMplayerVout( cbVout->currentItem()); + config.setMplayerAout( cbAout->currentItem()); + }else { + config.setUseGL( ckUseGL->isChecked()); + } + config.setUseMplayer( rbMplayer->isChecked()); + config.save(); +} + + +void k9prefPreview::rbInternalClick() { + wsOptions->raiseWidget(0); +} + +void k9prefPreview::rbMplayerClick() { + wsOptions->raiseWidget(1); +} + + + +#include "k9prefpreview.moc" + |