summaryrefslogtreecommitdiffstats
path: root/kio/misc/tdewalletd/tdewalletwizard.ui.h
blob: a42635e9ba2eb4ef473cdf9e6e6fbc8f79290889 (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
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
** Qt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/

void KWalletWizard::passwordPageUpdate()
{
    bool fe = !_useWallet->isChecked() || _pass1->text() == _pass2->text();
    if (_basic->isChecked()) {
        setFinishEnabled(page2, fe);
    } else {
        setNextEnabled(page2, fe);
        setFinishEnabled(page3, fe);
    }
    
    if (_useWallet->isChecked()) {
	if (_pass1->text() == _pass2->text()) {
            if (_pass1->text().isEmpty()) {
                _matchLabel->setText(i18n("<qt>Password is empty.  <b>(WARNING: Insecure)"));
            } else {
                _matchLabel->setText(i18n("Passwords match."));
            }
	} else {
	    _matchLabel->setText(i18n("Passwords do not match."));
	}
    } else {
	_matchLabel->setText(TQString::null);
    }
    
}


void KWalletWizard::init()
{
    setHelpEnabled(page1, false);
    setHelpEnabled(page2, false);
    setHelpEnabled(page3, false);
    setHelpEnabled(page4, false);
    setAppropriate(page3, false);
    setAppropriate(page4, false);
    setFinishEnabled(page2, true);
}


void KWalletWizard::setAdvanced()
{
    setAppropriate(page3, true);
    setAppropriate(page4, true);
    bool fe = !_useWallet->isChecked() || _pass1->text() == _pass2->text();
    setFinishEnabled(page2, false);
    setNextEnabled(page2, fe);
    setFinishEnabled(page3, fe);
}


void KWalletWizard::setBasic()
{
    setAppropriate(page3, false);
    setAppropriate(page4, false);
    bool fe = !_useWallet->isChecked() || _pass1->text() == _pass2->text();
    setFinishEnabled(page3, false);
    setFinishEnabled(page2, fe);
}


void KWalletWizard::destroy()
{
    _pass1->clear();
    _pass2->clear();
}