You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
1.8 KiB
99 lines
1.8 KiB
13 years ago
|
/****************************************************************************
|
||
|
**
|
||
|
** 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
|
||
|
|
||
13 years ago
|
#include <ntqscrollview.h>
|
||
5 months ago
|
#include <tqfiledialog.h>
|
||
7 months ago
|
#include <tqwidgetstack.h>
|
||
13 years ago
|
#include <ntqvbox.h>
|
||
5 months ago
|
#include <tqurl.h>
|
||
13 years ago
|
#include <ntqpixmap.h>
|
||
6 months ago
|
#include <tqstringlist.h>
|
||
13 years ago
|
|
||
|
class TQMultiLineEdit;
|
||
|
class TQTextView;
|
||
|
class DirectoryView;
|
||
|
class TQSpinBox;
|
||
|
class TQShowEvent;
|
||
|
class TQPopupMenu;
|
||
|
|
||
|
class PixmapView : public TQScrollView
|
||
|
{
|
||
13 years ago
|
TQ_OBJECT
|
||
13 years ago
|
|
||
|
public:
|
||
|
PixmapView( TQWidget *parent );
|
||
|
void setPixmap( const TQPixmap &pix );
|
||
|
void drawContents( TQPainter *p, int, int, int, int );
|
||
|
|
||
|
private:
|
||
|
TQPixmap pixmap;
|
||
|
|
||
|
};
|
||
|
|
||
|
class Preview : public TQWidgetStack
|
||
|
{
|
||
13 years ago
|
TQ_OBJECT
|
||
13 years ago
|
|
||
|
public:
|
||
|
Preview( TQWidget *parent );
|
||
|
void showPreview( const TQUrl &u, int size );
|
||
|
|
||
|
private:
|
||
|
TQMultiLineEdit *normalText;
|
||
|
TQTextView *html;
|
||
|
PixmapView *pixmap;
|
||
|
|
||
|
};
|
||
|
|
||
|
class PreviewWidget : public TQVBox,
|
||
|
public TQFilePreview
|
||
|
{
|
||
13 years ago
|
TQ_OBJECT
|
||
13 years ago
|
|
||
|
public:
|
||
|
PreviewWidget( TQWidget *parent );
|
||
|
void previewUrl( const TQUrl &u );
|
||
|
|
||
|
private:
|
||
|
TQSpinBox *sizeSpinBox;
|
||
|
Preview *preview;
|
||
|
|
||
|
};
|
||
|
|
||
|
class CustomFileDialog : public TQFileDialog
|
||
|
{
|
||
13 years ago
|
TQ_OBJECT
|
||
13 years ago
|
|
||
|
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
|