~ubuntu-branches/ubuntu/natty/kdenetwork/natty-proposed

« back to all changes in this revision

Viewing changes to .pc/kubuntu_05_samba_sharing.diff/filesharing/simple/fileshare.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-02-15 11:13:16 UTC
  • Revision ID: package-import@ubuntu.com-20110215111316-nv5varapc9jc5zmq
Tags: 4:4.6.0-0ubuntu2
* Add kubuntu_05_samba_sharing.diff by Rodrigo Belem to add Samba
  sharing UI to file properties dialogue
* Up kdelibs build-dep to version with Samba patch
* Add -DDISABLE_VIDEOSUPPORT=1 in debian/rules, V4L now deprecated so
  Kopete video support can not be compiled
* Remove libtelepathy-qt4-dev from build-depends, unused

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (c) 2002,2009 Laurent Montel <montel@kde.org>
 
3
 
 
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.
 
8
 
 
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.
 
13
 
 
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.
 
17
*/
 
18
 
 
19
#ifndef __fileshare_h__
 
20
#define __fileshare_h__
 
21
 
 
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;
 
31
 
 
32
class ControlCenterGUI : public QWidget, public Ui::ControlCenterGUI
 
33
{
 
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();
 
43
};
 
44
 
 
45
 
 
46
 
 
47
class KFileShareConfig  : public KCModule
 
48
{
 
49
  Q_OBJECT
 
50
 
 
51
 public:
 
52
  KFileShareConfig(QWidget *parent, const QVariantList &);
 
53
 
 
54
  virtual void load();
 
55
  virtual void save();
 
56
  virtual void defaults();
 
57
  virtual QString quickHelp() const;
 
58
 
 
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();
 
69
 
 
70
 protected slots:
 
71
  void configChanged() { emit changed( true ); }
 
72
  void updateShareListView();
 
73
  void allowedUsersBtnClicked();
 
74
 
 
75
  virtual void addShareBtnClicked();
 
76
  virtual void changeShareBtnClicked();
 
77
  virtual void removeShareBtnClicked();
 
78
 
 
79
};
 
80
 
 
81
class PropertiesPageDlg : public KDialog
 
82
{
 
83
Q_OBJECT
 
84
public:
 
85
  PropertiesPageDlg(QWidget * parent, KFileItemList files);
 
86
  ~PropertiesPageDlg() {}
 
87
  bool hasChanged();
 
88
protected:
 
89
  PropertiesPage* m_page;
 
90
 
 
91
protected slots:
 
92
  virtual void slotOk();
 
93
 
 
94
};
 
95
 
 
96
 
 
97
 
 
98
#endif