Changeset View
Changeset View
Standalone View
Standalone View
plugins/history/historypreferences.cpp
Context not available. | |||||
35 | HistoryPreferences::HistoryPreferences(QWidget *parent, const QVariantList &args) | 35 | HistoryPreferences::HistoryPreferences(QWidget *parent, const QVariantList &args) | ||
---|---|---|---|---|---|
36 | : KCModule(parent, args) | 36 | : KCModule(parent, args) | ||
37 | { | 37 | { | ||
38 | kDebug(14310) << "called."; | 38 | qDebug() << "called."; | ||
39 | 39 | | |||
40 | QVBoxLayout *l = new QVBoxLayout(this); | 40 | QVBoxLayout *l = new QVBoxLayout(this); | ||
41 | QWidget *w = new QWidget; | 41 | QWidget *w = new QWidget; | ||
Context not available. | |||||
43 | p->setupUi(w); | 43 | p->setupUi(w); | ||
44 | l->addWidget(w); | 44 | l->addWidget(w); | ||
45 | 45 | | |||
46 | connect(p->chkShowPrevious, SIGNAL(toggled(bool)), this, SLOT(slotShowPreviousChanged(bool))); | 46 | connect(p->chkShowPrevious, &QCheckBox::toggled, this, &HistoryPreferences::slotShowPreviousChanged); | ||
47 | connect(p->Number_Auto_chatwindow, SIGNAL(valueChanged(int)), | 47 | connect(p->Number_Auto_chatwindow, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &HistoryPreferences::slotModified); | ||
48 | this, SLOT(slotModified())); | 48 | connect(p->Number_ChatWindow, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &HistoryPreferences::slotModified); | ||
49 | connect(p->Number_ChatWindow, SIGNAL(valueChanged(int)), | 49 | connect(p->History_color, &KColorButton::changed, this, &HistoryPreferences::slotModified); | ||
50 | this, SLOT(slotModified())); | | |||
51 | connect(p->History_color, SIGNAL(changed(QColor)), | | |||
52 | this, SLOT(slotModified())); | | |||
53 | } | 50 | } | ||
54 | 51 | | |||
55 | HistoryPreferences::~HistoryPreferences() | 52 | HistoryPreferences::~HistoryPreferences() | ||
56 | { | 53 | { | ||
57 | kDebug(14310) << "called."; | 54 | qDebug() << "called."; | ||
58 | delete p; | 55 | delete p; | ||
59 | } | 56 | } | ||
60 | 57 | | |||
61 | void HistoryPreferences::load() | 58 | void HistoryPreferences::load() | ||
62 | { | 59 | { | ||
63 | kDebug(14310) << "called."; | 60 | qDebug() << "called."; | ||
64 | HistoryConfig::self()->load(); | 61 | HistoryConfig::self()->load(); | ||
65 | p->chkShowPrevious->setChecked(HistoryConfig::auto_chatwindow()); | 62 | p->chkShowPrevious->setChecked(HistoryConfig::auto_chatwindow()); | ||
66 | slotShowPreviousChanged(p->chkShowPrevious->isChecked()); | 63 | slotShowPreviousChanged(p->chkShowPrevious->isChecked()); | ||
Context not available. | |||||
73 | 70 | | |||
74 | void HistoryPreferences::save() | 71 | void HistoryPreferences::save() | ||
75 | { | 72 | { | ||
76 | kDebug(14310) << "called."; | 73 | qDebug() << "called."; | ||
77 | HistoryConfig::setAuto_chatwindow(p->chkShowPrevious->isChecked()); | 74 | HistoryConfig::setAuto_chatwindow(p->chkShowPrevious->isChecked()); | ||
78 | HistoryConfig::setNumber_Auto_chatwindow(p->Number_Auto_chatwindow->value()); | 75 | HistoryConfig::setNumber_Auto_chatwindow(p->Number_Auto_chatwindow->value()); | ||
79 | HistoryConfig::setNumber_ChatWindow(p->Number_ChatWindow->value()); | 76 | HistoryConfig::setNumber_ChatWindow(p->Number_ChatWindow->value()); | ||
Context not available. |