summaryrefslogtreecommitdiffstats
path: root/configdialog/kbfxconfigdlgtooltip.ui.h
blob: 4f55e803c96b032975f671066ce0e587bda9075a (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** TQt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/

void KbfxConfigDlgTooltip::init()
{
	img_on = ConfigInit().KbfxOnImg;
	img_off = ConfigInit().KbfxOffImg;
}

void KbfxConfigDlgTooltip::KbfxTooltipAnimationButtonToggled ( bool )
{
	if ( KbfxTooltipAnimationButton->state() == 2 )
	{
		KbfxTooltipAnimationButton->setText ( tr2i18n ( "Turn the animation 'OFF'" ) );
		KbfxTooltipAnimationPixmapLabel->setPixmap ( img_on );
		ConfigInit().m_ToolTipAnimation = TRUE;
	}

	if ( KbfxTooltipAnimationButton->state() == 0 )
	{
		KbfxTooltipAnimationButton->setText ( tr2i18n ( "Turn the animation 'ON'" ) );
		KbfxTooltipAnimationPixmapLabel->setPixmap ( img_off );
		ConfigInit().m_ToolTipAnimation = FALSE;
	}

	kdDebug() << "Tooltip animation state: "
	<< ConfigInit().m_ToolTipAnimation
	<< endl;
}

void KbfxConfigDlgTooltip::KbfxTooltipTextEditTextChanged()
{
	ConfigInit().m_ToolTipText = KbfxTooltipTextEdit->text();

	kdDebug() << "Tooltip text: "
	<< ConfigInit().m_ToolTipText
	<< endl;
}

void KbfxConfigDlgTooltip::KbfxTooltipOnButtonToggled ( bool )
{
	if ( KbfxTooltipOnButton->state() == 2 )
	{
		KbfxTooltipOnButton->setText ( tr2i18n ( "Turn the tooltip 'OFF'" ) );
		KbfxTooltipOnPixmapLabel->setPixmap ( img_on );
		ConfigInit().m_ToolTip = TRUE;
	}

	if ( KbfxTooltipOnButton->state() == 0 )
	{
		KbfxTooltipOnButton->setText ( tr2i18n ( "Turn the tooltip 'ON'" ) );
		KbfxTooltipOnPixmapLabel->setPixmap ( img_off );
		ConfigInit().m_ToolTip = FALSE;

	}

	kdDebug() << "Tooltip state: "
	<< ConfigInit().m_ToolTip
	<< endl;
}

void KbfxConfigDlgTooltip::ChangeForm()
{
	if ( ConfigInit().m_ToolTip == TRUE && KbfxTooltipOnButton->state() == 0 )
		KbfxTooltipOnButton->toggle();

	if ( ConfigInit().m_ToolTip == FALSE && KbfxTooltipOnButton->state() == 2 )
		KbfxTooltipOnButton->toggle();

	if ( ConfigInit().m_ToolTipAnimation == TRUE && KbfxTooltipAnimationButton->state() == 0 )
		KbfxTooltipAnimationButton->toggle();

	if ( ConfigInit().m_ToolTipAnimation == FALSE && KbfxTooltipAnimationButton->state() == 2 )
		KbfxTooltipAnimationButton->toggle();

	KbfxTooltipTextEdit->setText ( ConfigInit().m_ToolTipText );
}