2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
13 #include "movelist_p.h"
14 #include "pref_movelist.h"
17 PrefMoveList::PrefMoveList(QWidget
*parent
)
22 m_settings
= new MoveList::Settings
;
25 groupAnimations
->setChecked(m_settings
->anim_enabled
);
26 checkFading
->setChecked(m_settings
->anim_hideshow
);
27 checkHighlighting
->setChecked(m_settings
->anim_highlight
);
28 checkMovements
->setChecked(m_settings
->anim_moving
);
29 sliderSpeed
->setValue(m_settings
->anim_speed
);
30 sliderSmoothness
->setValue(m_settings
->anim_smoothness
);
32 colorSelected
->setColor(m_settings
->select_color
);
33 colorComments
->setColor(m_settings
->comment_color
);
34 checkMovesFont
->setChecked(m_settings
->use_mv_font
);
35 fontMoves
->setFont(m_settings
->mv_font
);
36 checkCommentsFont
->setChecked(m_settings
->use_comm_font
);
37 fontComments
->setFont(m_settings
->comm_font
);
40 PrefMoveList::~PrefMoveList() {
44 void PrefMoveList::apply() {
45 m_settings
->anim_enabled
= groupAnimations
->isChecked();
46 m_settings
->anim_hideshow
= checkFading
->isChecked();
47 m_settings
->anim_highlight
= checkHighlighting
->isChecked();
48 m_settings
->anim_moving
= checkMovements
->isChecked();
49 m_settings
->anim_speed
= sliderSpeed
->value();
50 m_settings
->anim_smoothness
= sliderSmoothness
->value();
52 m_settings
->select_color
= colorSelected
->color();
53 m_settings
->comment_color
= colorComments
->color();
54 m_settings
->use_mv_font
= checkMovesFont
->isChecked();
55 m_settings
->mv_font
= fontMoves
->font();
56 m_settings
->use_comm_font
= checkCommentsFont
->isChecked();
57 m_settings
->comm_font
= fontComments
->font();