summaryrefslogtreecommitdiffstats
path: root/examples/qdir/ntqdir.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qdir/ntqdir.h')
-rw-r--r--examples/qdir/ntqdir.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/examples/qdir/ntqdir.h b/examples/qdir/ntqdir.h
new file mode 100644
index 000000000..9b591345e
--- /dev/null
+++ b/examples/qdir/ntqdir.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
+**
+** This file is part of an example program for TQt. This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#ifndef TQDIREXAMPLE_H
+#define TQDIREXAMPLE_H
+
+#include <ntqscrollview.h>
+#include <ntqfiledialog.h>
+#include <ntqwidgetstack.h>
+#include <ntqvbox.h>
+#include <ntqurl.h>
+#include <ntqpixmap.h>
+#include <ntqstringlist.h>
+
+class TQMultiLineEdit;
+class TQTextView;
+class DirectoryView;
+class TQSpinBox;
+class TQShowEvent;
+class TQPopupMenu;
+
+class PixmapView : public TQScrollView
+{
+ Q_OBJECT
+
+public:
+ PixmapView( TQWidget *parent );
+ void setPixmap( const TQPixmap &pix );
+ void drawContents( TQPainter *p, int, int, int, int );
+
+private:
+ TQPixmap pixmap;
+
+};
+
+class Preview : public TQWidgetStack
+{
+ Q_OBJECT
+
+public:
+ Preview( TQWidget *parent );
+ void showPreview( const TQUrl &u, int size );
+
+private:
+ TQMultiLineEdit *normalText;
+ TQTextView *html;
+ PixmapView *pixmap;
+
+};
+
+class PreviewWidget : public TQVBox,
+ public TQFilePreview
+{
+ Q_OBJECT
+
+public:
+ PreviewWidget( TQWidget *parent );
+ void previewUrl( const TQUrl &u );
+
+private:
+ TQSpinBox *sizeSpinBox;
+ Preview *preview;
+
+};
+
+class CustomFileDialog : public TQFileDialog
+{
+ Q_OBJECT
+
+public:
+ CustomFileDialog();
+ ~CustomFileDialog();
+
+protected:
+ void showEvent( TQShowEvent *e );
+
+public slots:
+ void setDir2( const TQString & );
+
+private slots:
+ void bookmarkChosen( int i );
+ void goHome();
+
+private:
+ DirectoryView *dirView;
+ TQPopupMenu *bookmarkMenu;
+ TQStringList bookmarkList;
+ int addId;
+
+};
+
+#endif