Rev 19168 | Rev 22635 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
10242 | subik | 1 | /* |
2 | For general Scribus (>=1.3.2) copyright and licensing information please refer |
||
3 | to the COPYING file provided with the program. Following this notice may exist |
||
4 | a copyright and/or license notice that predates the release of Scribus 1.3.2 |
||
5 | for which a new license (GPL+exception) is in place. |
||
6 | */ |
||
7 | #ifndef SCFILEWIDGET_H |
||
8 | #define SCFILEWIDGET_H |
||
9 | |||
10 | #include <QFileDialog> |
||
11 | |||
10248 | jghali | 12 | #include "scribusapi.h" |
10242 | subik | 13 | |
14 | /*! \brief Simple wrapper simulating the QFileDialog as a common widget. |
||
15 | Usage is simple - everything is like in QFileDialog except it is not |
||
16 | a dialog, it's a widget. It can be used for extension features etc. |
||
17 | \note Original QFileDialog OK/Cancel buttons are hidden. You must |
||
18 | write your own dialog accept/reject handling. |
||
10263 | subik | 19 | There is one good idea - it's quite good to handle original dialog |
20 | accepted() signal on your own to prevent ugly widget hidding when |
||
21 | user e.g. doubleclicks the "open" file (in the parent (new) dialog): |
||
22 | connect(fileWidget, SIGNAL(accepted()), this, SLOT(accept())); |
||
10242 | subik | 23 | \author Petr Vanek <petr@scribus.info> |
24 | */ |
||
10248 | jghali | 25 | class SCRIBUS_API ScFileWidget : public QFileDialog |
10242 | subik | 26 | { |
27 | Q_OBJECT |
||
28 | |||
18154 | jghali | 29 | public: |
30 | ScFileWidget(QWidget * parent); |
||
10242 | subik | 31 | |
18154 | jghali | 32 | QString selectedFile(); |
10242 | subik | 33 | |
18154 | jghali | 34 | public slots: |
35 | void accept(); |
||
19168 | craig | 36 | void locationDropped(QString fileUrl); |
19180 | craig | 37 | void gotoParentDirectory(); |
38 | void gotoSelectedDirectory(); |
||
39 | void gotoDesktopDirectory(); |
||
40 | void gotoHomeDirectory(); |
||
10242 | subik | 41 | }; |
42 | |||
43 | #endif |