File indexing completed on 2024-05-05 16:08:28

0001 /* This file is part of the KDE libraries
0002     Copyright (C) 2005 Stephan Binner <binner@kde.org>
0003 
0004     This library is free software; you can redistribute it and/or
0005     modify it under the terms of the GNU Library General Public
0006     License version 2 as published by the Free Software Foundation.
0007 
0008     This library is distributed in the hope that it will be useful,
0009     but WITHOUT ANY WARRANTY; without even the implied warranty of
0010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0011     Library General Public License for more details.
0012 
0013     You should have received a copy of the GNU Library General Public License
0014     along with this library; see the file COPYING.LIB.  If not, write to
0015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0016     Boston, MA 02110-1301, USA.
0017 
0018  */
0019 
0020 #ifndef __KPREVIEWPROPS_H__
0021 #define __KPREVIEWPROPS_H__
0022 
0023 #include <kpropertiesdialog.h>
0024 #include <kdelibs4support_export.h>
0025 
0026 class KFileMetaPreview;
0027 
0028 /*!
0029  * PreviewProps plugin
0030  * This plugin displays a preview of the given file
0031  */
0032 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KPreviewPropsPlugin : public KPropertiesDialogPlugin
0033 {
0034     Q_OBJECT
0035 
0036 public:
0037 
0038     KPreviewPropsPlugin(KPropertiesDialog *_props);
0039     virtual ~KPreviewPropsPlugin();
0040 
0041     /**
0042      * Tests whether a preview for the first item should be shown
0043      */
0044     static bool supports(const KFileItemList &_items);
0045 
0046 private Q_SLOTS:
0047     void currentPageChanged(KPageWidgetItem *, KPageWidgetItem *);
0048 
0049 private:
0050     KFileMetaPreview *preview;
0051     void createLayout();
0052 
0053     class KPreviewPropsPluginPrivate;
0054     KPreviewPropsPluginPrivate *const d;
0055 };
0056 
0057 #endif