1
// =============================================================================
3
// --- kvi_options_gui_labels.cpp ---
5
// This file is part of the KVIrc IRC client distribution
6
// Copyright (C) 1999-2000 Szymon Stefanek (stefanek@tin.it)
8
// This program is FREE software. You can redistribute it and/or
9
// modify it under the terms of the GNU General Public License
10
// as published by the Free Software Foundation; either version 2
11
// of the License, or (at your opinion) any later version.
13
// This program is distributed in the HOPE that it will be USEFUL,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
// See the GNU General Public License for more details.
18
// You should have received a copy of the GNU General Public License
19
// along with this program. If not, write to the Free Software Foundation,
20
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
// =============================================================================
24
#define _KVI_DEBUG_CHECK_RANGE_
25
#define _KVI_DEBUG_CLASS_NAME_ "KviOptionsGuiLabels"
30
#include "kvi_colorselector.h"
31
#include "kvi_fontselector.h"
32
#include "kvi_imageselector.h"
33
#include "kvi_locale.h"
34
#include "kvi_options_gui_labels.h"
35
#include "kvi_options.h"
38
@quickhelp: KviOptionsGuiLabels
39
@widget: Channel labels GUI options
41
KviOptionsGuiLabels::KviOptionsGuiLabels(QWidget *parent)
42
: KviOptionsWidget(parent, KVI_GENERAL_OPTIONS_WIDGET_ID_GUILABELS)
44
QGridLayout *g = new QGridLayout(this, 6, 1, KVI_GENERAL_OPTIONS_GRIDLAYOUT_BORDER, 1);
46
KviColorSelector *s = new KviColorSelector(this, _i18n_("Background color:"), &(g_pOptions->m_clrLabelsBack));
47
g->addWidget(s, 0, 0);
48
s = new KviColorSelector(this, _i18n_("Active foreground color:"), &(g_pOptions->m_clrLabelsActiveFore));
49
g->addWidget(s, 1, 0);
50
s = new KviColorSelector(this, _i18n_("Inactive foreground color:"), &(g_pOptions->m_clrLabelsInactiveFore));
51
g->addWidget(s, 2, 0);
52
KviFontSelector *f = new KviFontSelector(this, _i18n_("Font:"), &(g_pOptions->m_fntLabels));
53
g->addWidget(f, 3, 0);
55
QFrame *fr = new QFrame(this);
56
fr->setFrameStyle(QFrame::HLine | QFrame::Sunken);
57
g->addWidget(fr, 4, 0);
59
m_pLabelsImageSelector = new KviImageSelector(this,
60
_i18n_("Use background image:"), &(g_pOptions->m_szLabelsBack), g_pOptions->m_pixLabelsBack
62
g->addWidget(m_pLabelsImageSelector, 5, 0);
64
fr = new QFrame(this);
65
g->addWidget(fr, 6, 0);
66
g->setRowStretch(6, 1);
69
KviOptionsGuiLabels::~KviOptionsGuiLabels()
74
void KviOptionsGuiLabels::commitChanges()
76
commitColorSelectors();
77
commitFontSelectors();
78
commitImageSelectors();
79
g_pOptions->loadLabelsBackgroundImage(m_pLabelsImageSelector->getImage());
80
g_pApp->triggerGlobalRepaint();
83
#include "m_kvi_options_gui_labels.moc"