Show invite menu in wlm chat window immediately
[kdenetwork.git] / filesharing / simple / fileshare.h
blob90a93186944dc64ad930f35ad61bb0b3e3d3e3b1
1 /*
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>
24 #include "kcmodule.h"
25 //Added by qt3to4:
26 #include <QLabel>
27 #include <QBoxLayout>
28 #include "ui_controlcenter.h"
29 class QLabel;
30 class QBoxLayout;
32 class ControlCenterGUI : public QWidget, public Ui::ControlCenterGUI
34 Q_OBJECT
35 public:
36 ControlCenterGUI( QWidget *parent );
37 private slots:
38 void changedSlot();
39 public slots:
40 void listView_selectionChanged();
41 signals:
42 void changed();
47 class KFileShareConfig : public KCModule
49 Q_OBJECT
51 public:
52 KFileShareConfig(QWidget *parent, const QVariantList &);
54 virtual void load();
55 virtual void save();
56 virtual void defaults();
57 virtual QString quickHelp() const;
59 protected:
60 ControlCenterGUI* m_ccgui;
61 QString m_fileShareGroup;
62 bool m_restricted;
63 bool m_rootPassNeeded;
64 QString m_smbConf;
65 void showShareDialog(const KFileItemList & files);
66 bool addGroupAccessesToFile(const QString & file);
67 bool removeGroupAccessesFromFile(const QString & file);
68 bool setGroupAccesses();
70 protected slots:
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
83 Q_OBJECT
84 public:
85 PropertiesPageDlg(QWidget * parent, KFileItemList files);
86 ~PropertiesPageDlg() {}
87 bool hasChanged();
88 protected:
89 PropertiesPage* m_page;
91 protected slots:
92 virtual void slotOk();
98 #endif