2 Copyright (c) 2002,2009 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>
28 #include "ui_controlcenter.h"
32 class ControlCenterGUI
: public QWidget
, public Ui::ControlCenterGUI
36 ControlCenterGUI( QWidget
*parent
);
40 void listView_selectionChanged();
47 class KFileShareConfig
: public KCModule
52 KFileShareConfig(QWidget
*parent
, const QVariantList
&);
56 virtual void defaults();
57 virtual QString
quickHelp() const;
60 ControlCenterGUI
* m_ccgui
;
61 QString m_fileShareGroup
;
63 bool m_rootPassNeeded
;
65 void showShareDialog(const KFileItemList
& files
);
66 bool addGroupAccessesToFile(const QString
& file
);
67 bool removeGroupAccessesFromFile(const QString
& file
);
68 bool setGroupAccesses();
71 void configChanged() { emit
changed( true ); }
72 void updateShareListView();
73 void allowedUsersBtnClicked();
75 virtual void addShareBtnClicked();
76 virtual void changeShareBtnClicked();
77 virtual void removeShareBtnClicked();
81 class PropertiesPageDlg
: public KDialog
85 PropertiesPageDlg(QWidget
* parent
, KFileItemList files
);
86 ~PropertiesPageDlg() {}
89 PropertiesPage
* m_page
;
92 virtual void slotOk();