Rev 15 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3 | paul | 1 | /*************************************************************************** |
2 | customfdialog.h - description |
||
3 | ------------------- |
||
4 | begin : Fri Nov 30 2001 |
||
5 | copyright : (C) 2001 by Franz Schmid |
||
6 | email : Franz.Schmid@altmuehlnet.de |
||
7 | ***************************************************************************/ |
||
8 | |||
9 | /*************************************************************************** |
||
10 | * * |
||
11 | * This program is free software; you can redistribute it and/or modify * |
||
12 | * it under the terms of the GNU General Public License as published by * |
||
13 | * the Free Software Foundation; either version 2 of the License, or * |
||
14 | * (at your option) any later version. * |
||
15 | * * |
||
16 | ***************************************************************************/ |
||
17 | |||
18 | #ifndef CUSTOMFDIALOG_H |
||
19 | #define CUSTOMFDIALOG_H |
||
20 | |||
21 | #include <qfiledialog.h> |
||
22 | #include <qurl.h> |
||
23 | #include <qlabel.h> |
||
24 | #include <qdir.h> |
||
25 | #include <qpixmap.h> |
||
26 | #include <qcheckbox.h> |
||
27 | #include <qlayout.h> |
||
28 | #include <qframe.h> |
||
29 | #include <qtoolbutton.h> |
||
30 | /** |
||
31 | *@author Franz Schmid |
||
32 | */ |
||
33 | class ImIconProvider : public QFileIconProvider |
||
34 | { |
||
35 | Q_OBJECT |
||
36 | QStringList fmts; |
||
37 | QPixmap imagepm; |
||
38 | QPixmap docpm; |
||
39 | QPixmap pspm; |
||
40 | QPixmap pdfpm; |
||
41 | QPixmap txtpm; |
||
42 | |||
43 | public: |
||
44 | ImIconProvider(QWidget *pa); |
||
45 | ~ImIconProvider() {}; |
||
46 | |||
47 | const QPixmap * pixmap(const QFileInfo &fi); |
||
48 | }; |
||
49 | |||
50 | class FDialogPreview : public QLabel, public QFilePreview |
||
51 | { |
||
52 | Q_OBJECT |
||
53 | public: |
||
54 | FDialogPreview(QWidget *pa); |
||
55 | ~FDialogPreview() {}; |
||
56 | void GenPreview(QString name); |
||
57 | virtual void previewUrl(const QUrl &url); |
||
58 | }; |
||
59 | |||
60 | class CustomFDialog : public QFileDialog |
||
61 | { |
||
62 | Q_OBJECT |
||
63 | public: |
||
64 | CustomFDialog(QWidget *pa, QString cap = "", QString filter = "", bool Pre = false, bool mod = true, bool comp = false); |
||
65 | ~CustomFDialog(); |
||
66 | QDir cDir; |
||
67 | QCheckBox* SaveZip; |
||
68 | QFrame* Layout; |
||
69 | QToolButton* HomeB; |
||
70 | private slots: |
||
71 | void slotHome(); |
||
72 | void HandleComp(); |
||
73 | protected: |
||
74 | QHBoxLayout* Layout1; |
||
75 | }; |
||
76 | |||
77 | #endif |