KIO
kfilemetadatawidget.h
Go to the documentation of this file.
00001 /***************************************************************************** 00002 * Copyright (C) 2008 by Sebastian Trueg <trueg@kde.org> * 00003 * Copyright (C) 2009-2010 by Peter Penz <peter.penz@gmx.at> * 00004 * * 00005 * This library is free software; you can redistribute it and/or * 00006 * modify it under the terms of the GNU Library General Public * 00007 * License as published by the Free Software Foundation; either * 00008 * version 2 of the License, or (at your option) any later version. * 00009 * * 00010 * This library is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00013 * Library General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU Library General Public License * 00016 * along with this library; see the file COPYING.LIB. If not, write to * 00017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00018 * Boston, MA 02110-1301, USA. * 00019 *****************************************************************************/ 00020 00021 #ifndef KFILEMETADATAWIDGET_H 00022 #define KFILEMETADATAWIDGET_H 00023 00024 #include <kio/kio_export.h> 00025 #include <kfileitem.h> 00026 00027 #include <QList> 00028 #include <QWidget> 00029 00030 class KUrl; 00031 00044 class KIO_EXPORT KFileMetaDataWidget : public QWidget 00045 { 00046 Q_OBJECT 00047 Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly) 00048 00049 public: 00050 explicit KFileMetaDataWidget(QWidget* parent = 0); 00051 virtual ~KFileMetaDataWidget(); 00052 00058 void setItems(const KFileItemList& items); 00059 KFileItemList items() const; 00060 00065 void setReadOnly(bool readOnly); 00066 bool isReadOnly() const; 00067 00069 virtual QSize sizeHint() const; 00070 00071 Q_SIGNALS: 00076 void urlActivated(const KUrl& url); 00077 00083 void metaDataRequestFinished(const KFileItemList& items); 00084 00085 protected: 00086 virtual bool event(QEvent* event); 00087 00088 private: 00089 class Private; 00090 Private* d; 00091 00092 Q_PRIVATE_SLOT(d, void slotLoadingFinished()) 00093 Q_PRIVATE_SLOT(d, void slotLinkActivated(QString)) 00094 Q_PRIVATE_SLOT(d, void slotDataChangeStarted()) 00095 Q_PRIVATE_SLOT(d, void slotDataChangeFinished()) 00096 }; 00097 00098 #endif
KDE 4.6 API Reference