Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / lib / konq / knewmenu_p.h
blob23d7799965019952d55bf70d0cb81c808914c892
1 /* This file is part of the KDE project
2 Copyright (C) 1998-2006 David Faure <faure@kde.org>
3 2003 Sven Leiber <s.leiber@web.de>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library 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 GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef KNEWMENU_P_H
21 #define KNEWMENU_P_H
23 #include <kdialog.h>
24 class KLineEdit;
25 class KUrlRequester;
27 /**
28 * @internal
29 * Dialog to ask for a filename and a URL, when creating a link to a URL.
30 * Basically a merge of KLineEditDlg and KUrlRequesterDlg ;)
31 * @author David Faure <faure@kde.org>
33 class KUrlDesktopFileDlg : public KDialog
35 Q_OBJECT
36 public:
37 KUrlDesktopFileDlg( const QString& textFileName, const QString& textUrl, QWidget *parent = 0 );
38 virtual ~KUrlDesktopFileDlg() {}
40 /**
41 * @return the filename the user entered (no path)
43 QString fileName() const;
44 /**
45 * @return the URL the user entered
47 KUrl url() const;
49 protected Q_SLOTS:
50 void slotClear();
51 void slotNameTextChanged( const QString& );
52 void slotURLTextChanged( const QString& );
53 private:
54 void initDialog( const QString& textFileName, const QString& defaultName, const QString& textUrl, const QString& defaultUrl );
56 /**
57 * The line edit widget for the fileName
59 KLineEdit *m_leFileName;
60 /**
61 * The URL requester for the URL :)
63 KUrlRequester *m_urlRequester;
65 /**
66 * True if the filename was manually edited.
68 bool m_fileNameEdited;
71 #endif /* KNEWMENU_P_H */