Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / konqueror / settings / konq / globalpaths.h
blob83721a57d1c4376e2f0dc0415caf5a5c803feca2
1 /**
2 * Copyright (c) Martin R. Jones 1996
3 * Copyright 1998-2007 David Faure <faure@kde.org>
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.
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.
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.
20 // Summarized history:
22 // "Desktop Icons Options" Tab for KDesktop configuration
23 // Martin Jones
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
30 #ifndef __GLOBALPATHS_H
31 #define __GLOBALPATHS_H
33 #include <kcmodule.h>
34 #include <kio/global.h>
35 #include <kio/udsentry.h>
36 #include <kurl.h>
38 class QGridLayout;
39 class KJob;
40 class KUrlRequester;
41 class QStringList;
43 namespace KIO { class Job; }
45 //-----------------------------------------------------------------------------
46 // The "Path" Tab contains :
47 // The paths for Desktop, Autostart and Documents
49 class DesktopPathConfig : public KCModule
51 Q_OBJECT
52 public:
53 DesktopPathConfig( QWidget *parent, const QVariantList &args );
54 virtual void load();
55 virtual void save();
56 virtual void defaults();
58 private Q_SLOTS:
59 void slotEntries( KIO::Job * job, const KIO::UDSEntryList& list);
61 private:
62 KUrlRequester* addRow(int row, QGridLayout *lay, const QString& label, const QString& whatsThis);
63 bool xdgSavePath(KUrlRequester* ur, const KUrl& currentUrl, const char* xdgKey, const QString& type);
65 // Desktop Paths
66 KUrlRequester *urDesktop;
67 KUrlRequester *urAutostart;
68 KUrlRequester *urDocument;
69 KUrlRequester *urDownload;
70 KUrlRequester *urMovie;
71 KUrlRequester *urPicture;
72 KUrlRequester *urMusic;
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;
79 private Q_SLOTS:
80 void slotResult( KJob * job );
83 #endif