summaryrefslogtreecommitdiffstats
path: root/examples/qdir/qdir.h
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-07-10 15:24:15 -0500
committerTimothy Pearson <[email protected]>2011-07-10 15:24:15 -0500
commitbd0f3345a938b35ce6a12f6150373b0955b8dd12 (patch)
tree7a520322212d48ebcb9fbe1087e7fca28b76185c /examples/qdir/qdir.h
downloadqt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.tar.gz
qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.zip
Add Qt3 development HEAD version
Diffstat (limited to 'examples/qdir/qdir.h')
-rw-r--r--examples/qdir/qdir.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/examples/qdir/qdir.h b/examples/qdir/qdir.h
new file mode 100644
index 0000000..a4bee8f
--- /dev/null
+++ b/examples/qdir/qdir.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
+**
+** This file is part of an example program for Qt. This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#ifndef QDIREXAMPLE_H
+#define QDIREXAMPLE_H
+
+#include <qscrollview.h>
+#include <qfiledialog.h>
+#include <qwidgetstack.h>
+#include <qvbox.h>
+#include <qurl.h>
+#include <qpixmap.h>
+#include <qstringlist.h>
+
+class QMultiLineEdit;
+class QTextView;
+class DirectoryView;
+class QSpinBox;
+class QShowEvent;
+class QPopupMenu;
+
+class PixmapView : public QScrollView
+{
+ Q_OBJECT
+
+public:
+ PixmapView( QWidget *parent );
+ void setPixmap( const QPixmap &pix );
+ void drawContents( QPainter *p, int, int, int, int );
+
+private:
+ QPixmap pixmap;
+
+};
+
+class Preview : public QWidgetStack
+{
+ Q_OBJECT
+
+public:
+ Preview( QWidget *parent );
+ void showPreview( const QUrl &u, int size );
+
+private:
+ QMultiLineEdit *normalText;
+ QTextView *html;
+ PixmapView *pixmap;
+
+};
+
+class PreviewWidget : public QVBox,
+ public QFilePreview
+{
+ Q_OBJECT
+
+public:
+ PreviewWidget( QWidget *parent );
+ void previewUrl( const QUrl &u );
+
+private:
+ QSpinBox *sizeSpinBox;
+ Preview *preview;
+
+};
+
+class CustomFileDialog : public QFileDialog
+{
+ Q_OBJECT
+
+public:
+ CustomFileDialog();
+ ~CustomFileDialog();
+
+protected:
+ void showEvent( QShowEvent *e );
+
+public slots:
+ void setDir2( const QString & );
+
+private slots:
+ void bookmarkChosen( int i );
+ void goHome();
+
+private:
+ DirectoryView *dirView;
+ QPopupMenu *bookmarkMenu;
+ QStringList bookmarkList;
+ int addId;
+
+};
+
+#endif