diff options
| author | Peter Penz <[email protected]> | 2012-05-05 21:38:01 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-05-05 21:38:37 +0200 |
| commit | 23fff35aeb4143b73666471d7f79f30d808e2cf2 (patch) | |
| tree | 0788f8688b5579fa7f689a3b04d13b8561dcdd37 /src/panels/places/placesitem.h | |
| parent | 067642a23cfd759442a541335e42cef0e8c09e7f (diff) | |
Places Panel: Provide access to devices
Diffstat (limited to 'src/panels/places/placesitem.h')
| -rw-r--r-- | src/panels/places/placesitem.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/panels/places/placesitem.h b/src/panels/places/placesitem.h new file mode 100644 index 000000000..20289c95a --- /dev/null +++ b/src/panels/places/placesitem.h @@ -0,0 +1,62 @@ +/*************************************************************************** + * Copyright (C) 2012 by Peter Penz <[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 PLACESITEM_H +#define PLACESITEM_H + +#include <kitemviews/kstandarditem.h> +#include <KUrl> +#include <QPointer> +#include <Solid/Device> +#include <Solid/OpticalDisc> +#include <Solid/StorageAccess> +#include <Solid/StorageVolume> + +class KBookmark; + +/** + * @brief Extends KStandardItem by places-specific properties. + */ +class PlacesItem : public KStandardItem +{ + +public: + explicit PlacesItem(PlacesItem* parent = 0); + PlacesItem(const KBookmark& bookmark, + const QString& udi, + PlacesItem* parent = 0); + PlacesItem(const PlacesItem& item); + virtual ~PlacesItem(); + + void setUrl(const KUrl& url); + KUrl url() const; + + void setHidden(bool hidden); + bool isHidden() const; + +private: + Solid::Device m_device; + QPointer<Solid::StorageAccess> m_access; + QPointer<Solid::StorageVolume> m_volume; + QPointer<Solid::OpticalDisc> m_disc; +}; + +#endif + + |
