~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kcontrol/desktoppaths/globalpaths.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 *  Copyright (c) Martin R. Jones 1996
 
3
 *  Copyright 1998-2007 David Faure <faure@kde.org>
 
4
 *
 
5
 *  This program is free software; you can redistribute it and/or modify
 
6
 *  it under the terms of the GNU General Public License as published by
 
7
 *  the Free Software Foundation; either version 2 of the License, or
 
8
 *  (at your option) any later version.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
18
 */
 
19
 
 
20
// Summarized history:
 
21
//
 
22
// "Desktop Icons Options" Tab for KDesktop configuration
 
23
// Martin Jones
 
24
//
 
25
// Port to KControl, split from "Misc" Tab, Port to KControl2
 
26
// (c) David Faure 1998
 
27
// Desktop menus, paths
 
28
// (c) David Faure 2000
 
29
 
 
30
#ifndef __GLOBALPATHS_H
 
31
#define __GLOBALPATHS_H
 
32
 
 
33
#include <kcmodule.h>
 
34
#include <kio/global.h>
 
35
#include <kio/udsentry.h>
 
36
#include <kurl.h>
 
37
 
 
38
class QFormLayout;
 
39
class KJob;
 
40
class KUrlRequester;
 
41
class QStringList;
 
42
 
 
43
namespace KIO { class Job; }
 
44
 
 
45
//-----------------------------------------------------------------------------
 
46
// The "Path" Tab contains :
 
47
// The paths for Desktop, Autostart and Documents
 
48
 
 
49
class DesktopPathConfig : public KCModule
 
50
{
 
51
    Q_OBJECT
 
52
public:
 
53
    DesktopPathConfig( QWidget *parent, const QVariantList &args );
 
54
    virtual void load();
 
55
    virtual void save();
 
56
    virtual void defaults();
 
57
 
 
58
private Q_SLOTS:
 
59
    void slotEntries( KIO::Job * job, const KIO::UDSEntryList& list);
 
60
 
 
61
private:
 
62
    KUrlRequester* addRow(QFormLayout *lay, const QString& label, const QString& whatsThis);
 
63
    bool xdgSavePath(KUrlRequester* ur, const KUrl& currentUrl, const char* xdgKey, const QString& type);
 
64
 
 
65
    // Desktop Paths
 
66
    KUrlRequester *urDesktop;
 
67
    KUrlRequester *urAutostart;
 
68
    KUrlRequester *urDocument;
 
69
    KUrlRequester *urDownload;
 
70
    KUrlRequester *urMovie;
 
71
    KUrlRequester *urPicture;
 
72
    KUrlRequester *urMusic;
 
73
 
 
74
    bool moveDir( const KUrl & src, const KUrl & dest, const QString & type );
 
75
    bool m_ok;
 
76
    KUrl m_copyToDest; // used when the destination directory already exists
 
77
    KUrl m_copyFromSrc;
 
78
 
 
79
private Q_SLOTS:
 
80
    void slotResult( KJob * job );
 
81
};
 
82
 
 
83
#endif
 
84