• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libkonq
 

libkonq

  • libkonq
konq_filetip.h
1 /* This file is part of the KDE projects
2  Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3  Copyright (C) 2000, 2001, 2002 David Faure <david@mandrakesoft.com>
4  Copyright (C) 2004 Martin Koller <m.koller@surfeu.at>
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; see the file COPYING. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KONQ_FILETIP_H
23 #define KONQ_FILETIP_H
24 
25 #include <tqframe.h>
26 #include <tqpixmap.h>
27 #include <tdeio/previewjob.h>
28 
29 #include <libkonq_export.h>
30 
31 class KFileItem;
32 class TQLabel;
33 class TQScrollView;
34 class TQTimer;
35 
36 //--------------------------------------------------------------------------------
37 
38 class LIBKONQ_EXPORT KonqFileTip : public TQFrame
39 {
40  TQ_OBJECT
41 
42  public:
43  KonqFileTip( TQScrollView *parent );
44  ~KonqFileTip();
45 
46  void setPreview(bool on);
47 
53  void setOptions( bool on, bool preview, int num );
54 
60  void setItem( KFileItem *item, const TQRect &rect = TQRect(),
61  const TQPixmap *pixmap = 0 );
62 
63  virtual bool eventFilter( TQObject *, TQEvent *e );
64 
65  protected:
66  virtual void drawContents( TQPainter *p );
67  virtual void resizeEvent( TQResizeEvent * );
68 
69  private slots:
70  void gotPreview( const KFileItem*, const TQPixmap& );
71  void gotPreviewResult();
72 
73  void startDelayed();
74  void showTip();
75  void hideTip();
76 
77  private:
78  void setFilter( bool enable );
79 
80  void reposition();
81 
82  TQLabel* m_iconLabel;
83  TQLabel* m_textLabel;
84  bool m_on : 1;
85  bool m_preview : 1; // shall the preview icon be shown
86  bool m_filter : 1;
87  TQPixmap m_corners[4];
88  int m_corner;
89  int m_num;
90  TQScrollView* m_view;
91  KFileItem* m_item;
92  TDEIO::PreviewJob* m_previewJob;
93  TQRect m_rect;
94  TQTimer* m_timer;
95 };
96 
97 #endif

libkonq

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

libkonq

Skip menu "libkonq"
  • kate
  • libkonq
  • twin
  •   lib
Generated for libkonq by doxygen 1.9.1
This website is maintained by Timothy Pearson.