* maximal -> maximum
[kdenetwork.git] / filesharing / simple / fileshare.h
blobc007076effad6819f5be7c72aebf74c8d85ed7f0
1 /*
2 Copyright (c) 2002 Laurent Montel <montel@kde.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef __fileshare_h__
20 #define __fileshare_h__
22 #include <kfileitem.h>
23 #include <KPluginFactory>
24 #include "kcmodule.h"
25 //Added by qt3to4:
26 #include <QLabel>
27 #include <QBoxLayout>
28 class QLabel;
29 class QBoxLayout;
30 class ControlCenterGUI;
32 class KFileShareConfig : public KCModule
34 Q_OBJECT
36 public:
37 KFileShareConfig(QWidget *parent, const QVariantList &);
39 virtual void load();
40 virtual void save();
41 virtual void defaults();
42 virtual QString quickHelp() const;
44 protected:
45 ControlCenterGUI* m_ccgui;
46 QString m_fileShareGroup;
47 bool m_restricted;
48 bool m_rootPassNeeded;
49 QString m_smbConf;
50 void showShareDialog(const KFileItemList & files);
51 bool addGroupAccessesToFile(const QString & file);
52 bool removeGroupAccessesFromFile(const QString & file);
53 bool setGroupAccesses();
55 protected slots:
56 void configChanged() { emit changed( true ); }
57 void updateShareListView();
58 void allowedUsersBtnClicked();
60 virtual void addShareBtnClicked();
61 virtual void changeShareBtnClicked();
62 virtual void removeShareBtnClicked();
66 class PropertiesPageDlg : public KDialog
68 Q_OBJECT
69 public:
70 PropertiesPageDlg(QWidget * parent, KFileItemList files);
71 ~PropertiesPageDlg() {}
72 bool hasChanged();
73 protected:
74 PropertiesPage* m_page;
76 protected slots:
77 virtual void slotOk();
83 #endif