diff options
| author | Elvis Angelaccio <[email protected]> | 2017-02-09 19:36:11 +0100 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2017-02-09 19:36:11 +0100 |
| commit | d75b1de7bfeba76c540f6772e997aed4aacada88 (patch) | |
| tree | a28620b1593201d2b8f7c7a9b7fb91a7eb290da6 /src/views/tooltips/dolphinfilemetadatawidget.h | |
| parent | 333e2ae031fec6139a712f15283f0fffb23f2dc6 (diff) | |
Rename FileMetaDataToolTip to DolphinFileMetaDataWidget
Since commit 230fe13d1f this class is not a "tooltip" anymore, but just a
simple widget. Rename it to avoid future confusion.
Reviewers: emmanuelp
Differential Revision: https://phabricator.kde.org/D4451
Diffstat (limited to 'src/views/tooltips/dolphinfilemetadatawidget.h')
| -rw-r--r-- | src/views/tooltips/dolphinfilemetadatawidget.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/src/views/tooltips/dolphinfilemetadatawidget.h b/src/views/tooltips/dolphinfilemetadatawidget.h new file mode 100644 index 000000000..cf796250d --- /dev/null +++ b/src/views/tooltips/dolphinfilemetadatawidget.h @@ -0,0 +1,82 @@ +/*************************************************************************** + * Copyright (C) 2010 by Peter Penz <[email protected]> * + * Copyright (C) 2008 by Fredrik Höglund <[email protected]> * + * Copyright (C) 2012 by Mark Gaiser <[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 DOLPHINFILEMETADATAWIDGET_H +#define DOLPHINFILEMETADATAWIDGET_H + +#include <QWidget> +#include "config-baloo.h" + +class KFileItemList; +class QLabel; + +#ifndef HAVE_BALOO +class KFileMetaDataWidget; +#else +namespace Baloo { + class FileMetaDataWidget; +} +#endif + +/** + * @brief Widget that shows the meta information and a preview of one + * or more files inside a KToolTipWidget. + */ +class DolphinFileMetaDataWidget : public QWidget +{ + Q_OBJECT + +public: + DolphinFileMetaDataWidget(QWidget* parent = 0); + virtual ~DolphinFileMetaDataWidget(); + + void setPreview(const QPixmap& pixmap); + QPixmap preview() const; + + void setName(const QString& name); + QString name() const; + + /** + * Sets the items for which the meta data should be shown. + * The signal metaDataRequestFinished() will be emitted, + * as soon as the meta data for the items has been received. + */ + void setItems(const KFileItemList& items); + KFileItemList items() const; + +signals: + /** + * Is emitted after the meta data has been received for the items + * set by DolphinFileMetaDataWidget::setItems(). + */ + void metaDataRequestFinished(const KFileItemList& items); + +private: + QLabel* m_preview; + QLabel* m_name; +#ifndef HAVE_BALOO + KFileMetaDataWidget* m_fileMetaDataWidget; +#else + Baloo::FileMetaDataWidget* m_fileMetaDataWidget; +#endif +}; + +#endif |
