diff options
| author | Peter Penz <[email protected]> | 2012-04-26 23:39:48 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-04-26 23:41:01 +0200 |
| commit | d1c5dc52a3ac4f83262d00d37a61f6bfb52d5bf4 (patch) | |
| tree | 54a6f8150b290bed57bb5329ca861be7a858ef85 /src/panels/places/placesitemeditdialog.h | |
| parent | 2854a69fcad54d394ebec504af4995dcb5e18ac4 (diff) | |
Places Panel: Provide dialog for editing places
Diffstat (limited to 'src/panels/places/placesitemeditdialog.h')
| -rw-r--r-- | src/panels/places/placesitemeditdialog.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/panels/places/placesitemeditdialog.h b/src/panels/places/placesitemeditdialog.h new file mode 100644 index 000000000..eddde5430 --- /dev/null +++ b/src/panels/places/placesitemeditdialog.h @@ -0,0 +1,73 @@ +/*************************************************************************** + * Copyright (C) 2012 by Peter Penz <[email protected]> * + * * + * Based on KFilePlaceEditDialog from kdelibs: * + * Copyright (C) 2001,2002,2003 Carsten Pfeiffer <[email protected]> * + * Copyright (C) 2007 Kevin Ottens <[email protected]> * * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef PLACESITEMEDITDIALOG_H +#define PLACESITEMEDITDIALOG_H + +#include <KDialog> +#include <KUrl> + +class KIconButton; +class KLineEdit; +class KUrlRequester; +class QCheckBox; + +class PlacesItemEditDialog: public KDialog +{ + Q_OBJECT + +public: + explicit PlacesItemEditDialog(QWidget* parent = 0); + virtual ~PlacesItemEditDialog(); + + void setIcon(const QString& icon); + QString icon() const; + + void setText(const QString& text); + QString text() const; + + void setUrl(const KUrl& url); + KUrl url() const; + + void setAllowGlobal(bool allow); + bool allowGlobal() const; + +protected: + virtual bool event(QEvent* event); + +private: + void initialize(); + +private: + QString m_icon; + QString m_text; + KUrl m_url; + bool m_allowGlobal; + + KUrlRequester* m_urlEdit; + KLineEdit* m_textEdit; + KIconButton* m_iconButton; + QCheckBox* m_appLocal; +}; + +#endif |
