summaryrefslogtreecommitdiffstats
path: root/filesharing/advanced/kcm_sambaconf/share.ui.h
blob: 7de229bcb588993e6e2d03192cdb48090915f329 (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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename slots use Qt Designer which will
** update this file, preserving your code. Create an init() slot in place of
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/

/******************************************************************************
 *                                                                            *
 *  This file is part of KSambaPlugin.                                        *
 *                                                                            *
 *  KSambaPlugin is free software; you can redistribute it and/or modify      *
 *  it under the terms of the GNU General Public License as published by      *
 *  the Free Software Foundation; either version 2 of the License, or         *
 *  (at your option) any later version.                                       *
 *                                                                            *
 *  KSambaPlugin is distributed in the hope that it will be useful,           *
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of            *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
 *  GNU General Public License for more details.                              *
 *                                                                            *
 *  You should have received a copy of the GNU General Public License         *
 *  along with KSambaPlugin; if not, write to the Free Software                     *
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA  *
 *                                                                            *
 ******************************************************************************/

void KcmShareDlg::checkValues()
{
/*
	bool state = true;
	// Check if the ok-button should be enabled 
	if (directory->isChecked()){
	    if (homes->isChecked()){
		state = true;
	    }else{
		if (shareName->text() == "")
		    state = false;
		if (path->url() == "")
		    state = false;
	    }
	}else{
	    if (printers->isChecked()){
		state = true;
	    }else{
		if (shareName->text() == ""){
		    state = false;
		}
	    }
	}
	buttonOk->setEnabled(state);
*/
}






void KcmShareDlg::init()
{
    directoryPixLbl->setPixmap(DesktopIcon("folder"));
    PixmapLabel1->setPixmap(SmallIcon("messagebox_warning"));
/*
    TQListBoxItem* item = 0;
    TQPtrList<TQListBoxItem>* selectedList = new TQPtrList<TQListBoxItem>;
    selectedList->setAutoDelete(false);
    for (int i=0; i < possible->count(); i++){
	item = possible->item(i);
	if (item->isSelected()){
	    selectedList->append(item);
	}
    }
    selected->clearSelection();
    for (TQPtrListIterator<TQListBoxItem> it(*selectedList); it.current(); ++it){
	possible->takeItem(it.current());
	selected->insertItem(it.current());
    }
    delete selectedList;
*/
}




void KcmShareDlg::trytoAccept()
{
/*
    bool error = false;
    if (directory->isChecked()){
	if (!homes->isChecked()){
	    if (shareName->text() == "[homes]"){
		KMessageBox::sorry(this, i18n("Sorry, but you can't create a share named \"[homes]\".\nIf you want to share your home-directorys, please click on \"Share homes\" on the \"Base settings\"-tab."));
		error = true;
	    }
	}
    }else{
	if (!printers->isChecked()){
	    if (shareName->text() == "[printers]"){
		KMessageBox::sorry(this, i18n("Sorry, but you can't create a share named \"[printers]\".\nIf you want to share all your printers, please click on \"Share all printers\" on the \"Base settings\"-tab."));
		error = true;
	    }
	}
    }
    if (!error){
	updateShareData();
	accept();
    }
*/
}





void KcmShareDlg::homeChkToggled( bool )
{

}

void KcmShareDlg::addAllowedUserBtnClicked()
{

}

void KcmShareDlg::removeAllowedUserBtnClicked()
{

}

void KcmShareDlg::guestOnlyChk_toggled( bool b)
{
  if (b)
  {
    onlyUserChk->setChecked(false);
    publicBaseChk->setChecked(true);
  }
    
  onlyUserChk->setDisabled(b);
  publicBaseChk->setDisabled(b);
}


void KcmShareDlg::userOnlyChk_toggled( bool b)
{
  if (b)
  {
    guestOnlyChk->setChecked(false);
    publicBaseChk->setChecked(false);
  }
    
  guestOnlyChk->setDisabled(b);
  publicBaseChk->setDisabled(b);
}

void KcmShareDlg::accessModifierBtnClicked()
{
  
    
}


void KcmShareDlg::changedSlot()
{

}


void KcmShareDlg::publicBaseChk_toggled( bool b)
{
    guestOnlyChk->setEnabled(b);
    if (!b) {
       guestOnlyChk->setChecked(false);
   }
    guestAccountCombo->setEnabled(b);
    guestAccountLbl->setEnabled(b);
    
}


void KcmShareDlg::pathUrlRq_textChanged( const TQString & )
{

}


void KcmShareDlg::oplocksChk_toggled( bool b)
{
    if (b) 
	fakeOplocksChk->setChecked(false);
}


void KcmShareDlg::lockingChk_toggled( bool b)
{
  // Its Dangerous to disable locking !
/*	
    if (!b)  {
	enableLockingWarnPix->setPixmap(SmallIcon("messagebox_warning"));    
	enableLockingWarnPix->show();
    } else {
	enableLockingWarnPix->hide();
    }
*/    

}


void KcmShareDlg::fakeOplocksChk_toggled( bool b)
{
/*
    if (b)  {
	fakeOplocksWarnPix->setPixmap(SmallIcon("messagebox_info"));    
	fakeOplocksWarnPix->setText(i18n("Better use the real oplocks support than this parameter"));
	fakeOplocksWarnPix->showMaximized();
	fakeOplocksWarnPix->show();
    } else {
	fakeOplocksWarnPix->hide();
    }
*/
}


void KcmShareDlg::oplockContentionLimitSpin_valueChanged( int i)
{
/*    
    oplockContentionLimitWarnPix->setMaximumWidth(32767);
    oplockContentionLimitWarnPix->setPixmap(SmallIcon("messagebox_critical"));
*/   
    //oplockContentionLimitWarnPix->show();
    
}


void KcmShareDlg::storeDosAttributesChk_toggled( bool b)
{
    mapArchiveChk->setDisabled(b);
    mapSystemChk->setDisabled(b);
    mapHiddenChk->setDisabled(b);
  
    if (b) {
	mapArchiveChk->setChecked(false);
	mapSystemChk->setChecked(false);
	mapHiddenChk->setChecked(false);
    }  
}


void KcmShareDlg::buttonHelp_clicked()
{
    KProcess* p = new KProcess();
    *p << "konqueror";
    *p << "man:smb.conf";
    p->start();
}