blob: 6717bce8ef6f0c0f023ea259cfc12aef6394df18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
//
// C++ Implementation:
//
// Description:
//
//
// Author: Jean-Michel PETIT <k9copy@free.fr>, (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"
|