source: trunk/examples/qdir/qdir.h@ 202

Last change on this file since 202 was 160, checked in by dmik, 19 years ago

Imported table and iconview modules and a bunch of dependent examples from the official release 3.3.1 from Trolltech.

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1/****************************************************************************
2** $Id: qdir.h 160 2006-12-11 20:15:57Z dmik $
3**
4** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
5**
6** This file is part of an example program for Qt. This example
7** program may be used, distributed and modified without limitation.
8**
9*****************************************************************************/
10
11#ifndef QDIREXAMPLE_H
12#define QDIREXAMPLE_H
13
14#include <qscrollview.h>
15#include <qfiledialog.h>
16#include <qwidgetstack.h>
17#include <qvbox.h>
18#include <qurl.h>
19#include <qpixmap.h>
20#include <qstringlist.h>
21
22class QMultiLineEdit;
23class QTextView;
24class DirectoryView;
25class QSpinBox;
26class QShowEvent;
27class QPopupMenu;
28
29class PixmapView : public QScrollView
30{
31 Q_OBJECT
32
33public:
34 PixmapView( QWidget *parent );
35 void setPixmap( const QPixmap &pix );
36 void drawContents( QPainter *p, int, int, int, int );
37
38private:
39 QPixmap pixmap;
40
41};
42
43class Preview : public QWidgetStack
44{
45 Q_OBJECT
46
47public:
48 Preview( QWidget *parent );
49 void showPreview( const QUrl &u, int size );
50
51private:
52 QMultiLineEdit *normalText;
53 QTextView *html;
54 PixmapView *pixmap;
55
56};
57
58class PreviewWidget : public QVBox,
59 public QFilePreview
60{
61 Q_OBJECT
62
63public:
64 PreviewWidget( QWidget *parent );
65 void previewUrl( const QUrl &u );
66
67private:
68 QSpinBox *sizeSpinBox;
69 Preview *preview;
70
71};
72
73class CustomFileDialog : public QFileDialog
74{
75 Q_OBJECT
76
77public:
78 CustomFileDialog();
79 ~CustomFileDialog();
80
81protected:
82 void showEvent( QShowEvent *e );
83
84public slots:
85 void setDir2( const QString & );
86
87private slots:
88 void bookmarkChosen( int i );
89 void goHome();
90
91private:
92 DirectoryView *dirView;
93 QPopupMenu *bookmarkMenu;
94 QStringList bookmarkList;
95 int addId;
96
97};
98
99#endif
Note: See TracBrowser for help on using the repository browser.