~ubuntu-branches/ubuntu/natty/kdenetwork/natty-proposed

« back to all changes in this revision

Viewing changes to .pc/kubuntu_05_samba_sharing.diff/filesharing/advanced/kcm_sambaconf/kcminterface.ui.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-02-21 14:26:58 UTC
  • Revision ID: package-import@ubuntu.com-20110221142658-mzt9flk82tzdunxj
Tags: 4:4.6.0-0ubuntu4
Update kubuntu_05_samba_sharing.diff to match master

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
** ui.h extension file, included from the uic-generated form implementation.
 
3
**
 
4
** If you wish to add, delete or rename slots use Qt Designer which will
 
5
** update this file, preserving your code. Create an init() slot in place of
 
6
** a constructor, and a destroy() slot in place of a destructor.
 
7
*****************************************************************************/
 
8
 
 
9
/******************************************************************************
 
10
 *                                                                            *
 
11
 *  This file is part of KSambaPlugin.                                        *
 
12
 *                                                                            *
 
13
 *  KSambaPlugin is free software; you can redistribute it and/or modify      *
 
14
 *  it under the terms of the GNU General Public License as published by      *
 
15
 *  the Free Software Foundation; either version 2 of the License, or         *
 
16
 *  (at your option) any later version.                                       *
 
17
 *                                                                            *
 
18
 *  KSambaPlugin is distributed in the hope that it will be useful,           *
 
19
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of            *
 
20
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
 
21
 *  GNU General Public License for more details.                              *
 
22
 *                                                                            *
 
23
 *  You should have received a copy of the GNU General Public License         *
 
24
 *  along with KSambaPlugin; if not, write to the Free Software Foundation,   *
 
25
 *  Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA         *
 
26
 *                                                                            *
 
27
 ******************************************************************************/
 
28
 
 
29
#ifndef KCM_SAMBACONF_KCMINTERFACE_UI_H
 
30
#define KCM_SAMBACONF_KCMINTERFACE_UI_H
 
31
 
 
32
void KcmInterface::init()
 
33
{
 
34
    addShareBtn->setIconSet(SmallIconSet("document-new"));
 
35
    editShareBtn->setIconSet(SmallIconSet("document-properties"));
 
36
    removeShareBtn->setIconSet(SmallIconSet("edit-delete"));
 
37
    editDefaultShareBtn->setIconSet(SmallIconSet("queue"));
 
38
    
 
39
    addPrinterBtn->setIconSet(SmallIconSet("document-new"));
 
40
    editPrinterBtn->setIconSet(SmallIconSet("document-properties"));
 
41
    removePrinterBtn->setIconSet(SmallIconSet("edit-delete"));
 
42
    editDefaultPrinterBtn->setIconSet(SmallIconSet("printer-multiple"));
 
43
 
 
44
    advancedWarningPixLbl->setPixmap(SmallIcon("dialog-warning"));
 
45
}
 
46
 
 
47
 
 
48
void KcmInterface::changedSlot()
 
49
{
 
50
    emit changed();
 
51
}
 
52
 
 
53
 
 
54
void KcmInterface::securityLevelCombo_activated( int i )
 
55
{
 
56
   passwordServerEdit->setDisabled(i<2);
 
57
   allowGuestLoginsChk->setDisabled(i==0);
 
58
}
 
59
 
 
60
 
 
61
void KcmInterface::shareRadio_clicked()
 
62
{
 
63
  securityLevelHelpLbl->setText(i18n("Use the <i>share</i> security level if you have a home network "
 
64
                                     "or a small office network.<br /> It allows everyone to read the list "
 
65
                                     "of all your shared directories and printers before a login is required."));
 
66
}
 
67
 
 
68
 
 
69
void KcmInterface::userRadio_clicked()
 
70
{
 
71
  securityLevelHelpLbl->setText(i18n("Use the <i>user</i> security level if you have a bigger network "
 
72
                                     "and you do not want to allow everyone to read your list of shared "
 
73
                                     "directories and printers without a login.<br /><br />"
 
74
                                     "If you want to run your Samba server as a <b>Primary Domain controller</b> (PDC) "
 
75
                                     "you also have to set this option."));
 
76
}
 
77
 
 
78
void KcmInterface::serverRadio_clicked()
 
79
{
 
80
  securityLevelHelpLbl->setText(i18n("Use the <i>server</i> security level if you have a big network "
 
81
                                     "and the samba server should validate the username/password "
 
82
                                     "by passing it to another SMB server, such as an NT box."));
 
83
}
 
84
 
 
85
 
 
86
void KcmInterface::domainRadio_clicked()
 
87
{
 
88
  securityLevelHelpLbl->setText(i18n("Use the <i>domain</i> security level if you have a big network "
 
89
                                     "and the samba server should validate the username/password "
 
90
                                     "by passing it to a Windows NT Primary or Backup Domain Controller."));
 
91
}
 
92
 
 
93
 
 
94
void KcmInterface::adsRadioClicked()
 
95
{
 
96
  securityLevelHelpLbl->setText(i18n("Use the <i>ADS</i> security level if you have a big network "
 
97
                                     "and the samba server should act as a domain member in an ADS realm."));
 
98
}
 
99
 
 
100
 
 
101
void KcmInterface::KUrlLabel1_leftClickedURL()
 
102
{
 
103
    K3Process* p = new K3Process();
 
104
 
 
105
    *p << "konqueror";
 
106
    *p << "man:smb.conf";
 
107
    p->start();
 
108
}
 
109
 
 
110
 
 
111
void KcmInterface::lmAnnounceCombo_activated( int i)
 
112
{
 
113
    lmIntervalSpin->setEnabled(i==0);
 
114
}
 
115
 
 
116
 
 
117
void KcmInterface::allowGuestLoginsChk_toggled( bool b)
 
118
{
 
119
    int i = 0;
 
120
    if (b)
 
121
        i = 1;
 
122
 
 
123
    mapToGuestCombo->setCurrentItem(i);
 
124
}
 
125
 
 
126
 
 
127
void KcmInterface::mapToGuestCombo_activated( int i)
 
128
{
 
129
    allowGuestLoginsChk->setChecked(i>0);
 
130
}
 
131
 
 
132
#endif // KCM_SAMBACONF_KCMINTERFACE_UI_H