• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkonq

konq_filetip.h

Go to the documentation of this file.
00001 /* This file is part of the KDE projects
00002    Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
00003    Copyright (C) 2000, 2001, 2002 David Faure <faure@kde.org>
00004    Copyright (C) 2004 Martin Koller <m.koller@surfeu.at>
00005 
00006    This program is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; see the file COPYING.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KONQ_FILETIP_H
00023 #define KONQ_FILETIP_H
00024 
00025 #include <QtGui/QPixmap>
00026 #include <QtGui/QLabel>
00027 #include <QtGui/QResizeEvent>
00028 #include <kio/previewjob.h>
00029 
00030 #include <libkonq_export.h>
00031 
00032 class KFileItem;
00033 class QLabel;
00034 class QScrollArea;
00035 class QTimer;
00036 
00037 //--------------------------------------------------------------------------------
00038 
00039 class LIBKONQ_EXPORT KonqFileTip : public QFrame
00040 {
00041   Q_OBJECT
00042 
00043   public:
00044     KonqFileTip( QScrollArea *parent );
00045     ~KonqFileTip();
00046 
00047     void setPreview(bool on);
00048 
00054     void setOptions( bool on, bool preview, int num );
00055 
00061     void setItem( const KFileItem &item, const QRect &rect = QRect(),
00062                   const QPixmap *pixmap = 0 );
00063 
00064     virtual bool eventFilter( QObject *, QEvent *e );
00065 
00066   protected:
00067     virtual void paintEvent( QPaintEvent *ev );
00068     virtual void resizeEvent( QResizeEvent * );
00069 
00070   private Q_SLOTS:
00071     void gotPreview( const KFileItem&, const QPixmap& );
00072     void gotPreviewResult();
00073 
00074     void startDelayed();
00075     void showTip();
00076     void hideTip();
00077 
00078   private:
00079     void setFilter( bool enable );
00080 
00081     void reposition();
00082 
00083     QLabel*    m_iconLabel;
00084     QLabel*    m_textLabel;
00085     bool       m_on : 1;
00086     bool       m_preview : 1;  // shall the preview icon be shown
00087     bool       m_filter : 1;
00088     QPixmap    m_corners[4];
00089     int        m_corner;
00090     int        m_num;
00091     QScrollArea* m_view;
00092     KFileItem  m_item;
00093     KIO::PreviewJob* m_previewJob;
00094     QRect      m_rect;
00095     QTimer*    m_timer;
00096 };
00097 
00098 #endif

libkonq

Skip menu "libkonq"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal