1
/***************************************************************************
2
smb4kcustomoptionsdialog - With this dialog the user can define
3
custom Samba options for hosts or shares.
6
copyright : (C) 2006-2008 by Alexander Reinholdt
7
email : dustpuppy@users.berlios.de
8
***************************************************************************/
10
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
* This program is distributed in the hope that it will be useful, but *
17
* WITHOUT ANY WARRANTY; without even the implied warranty of *
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19
* General Public License for more details. *
21
* You should have received a copy of the GNU General Public License *
22
* along with this program; if not, write to the *
23
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
25
***************************************************************************/
27
#ifndef SMB4KCUSTOMOPTIONSDIALOG_H
28
#define SMB4KCUSTOMOPTIONSDIALOG_H
39
#include <knuminput.h>
40
#include <kcombobox.h>
41
#include <klineedit.h>
42
#include <kdemacros.h>
44
// forward declarations
48
class KDE_EXPORT Smb4KCustomOptionsDialog : public KDialog
56
* @param host The host (server) for which the custom options should be defined.
58
* @param parent The parent of this dialog
60
Smb4KCustomOptionsDialog( Smb4KHost *host, QWidget *parent = 0 );
63
* Another constructor, similar to the one above.
65
* @param share The share for which the custom options should be defined.
67
* @param parent The parent of this dialog
69
Smb4KCustomOptionsDialog( Smb4KShare *share, QWidget *parent = 0 );
74
~Smb4KCustomOptionsDialog();
77
* This function returns TRUE if the dialog has been initialized correctly
78
* and may be shown now. It will always return TRUE if you want to set options
79
* for a server or for a share, that is not a 'homes' share. Only in the case
80
* of a homes share it may return FALSE, if you didn't choose a user name.
82
* @returns TRUE if the dialog has been set up correctly.
84
bool isInitialized() { return m_initialized; }
88
* Is invoked when the port value changed
90
* @param int The port number
92
void slotPortChanged( int value );
95
* Is invoked when the protocol value changed
97
* @param t The protocol
99
void slotProtocolChanged( const QString &p );
102
* Is invoked when the user clicked the 'Use Kerberos'
105
* @param on TRUE if the check box was
106
* checked and FALSE otherwise
108
void slotKerberosToggled( bool on );
111
* Commit the custom options provided for the selected
114
void slotOKButtonClicked();
117
* Is invoked if the "Default" button has been pressed.
119
void slotDefaultButtonClicked();
122
* This slot is invoked when the "Write Access" value changed.
124
* @param rw Either 'read-write' or 'read-only' (localized).
126
void slotWriteAccessChanged( const QString &rw );
129
* This slot is invoked when the UID value changed.
131
* @param uid The UID value
133
void slotUIDChanged( const QString &uid );
136
* This slot is invoked when the GID value changed.
138
* @param gid The UID value
140
void slotGIDChanged( const QString &gid );
146
enum ItemType{ Host, Share };
159
* The host item (is NULL if you process a share).
164
* The share item (is NULL if you process a host).
171
KIntNumInput *m_port_input;
175
* This combo box determines if the user wants to mount a share
176
* readwrite or readonly.
178
KComboBox *m_rw_input;
184
KComboBox *m_proto_input;
187
* Boolean that is TRUE if the dialog has been initialized
188
* correctly and my be shown now.
193
* This check box will determine if the user wants to try to
194
* authenticate with Kerberos or not. This is needed for Active
197
QCheckBox *m_kerberos;
200
* This combo box holds the values of the UID that the user can
203
KComboBox *m_uid_input;
206
* This combo box holds the values of the GID that the user can
209
KComboBox *m_gid_input;