Rev 10245 | Rev 13650 | 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 | #include <QPushButton> |
||
8 | |||
9 | #include "scfilewidget.h" |
||
10 | |||
11 | |||
10245 | cbradney | 12 | ScFileWidget::ScFileWidget(QWidget * parent) |
13 | : QFileDialog(parent, Qt::Widget) |
||
10242 | subik | 14 | { |
15 | setSizeGripEnabled(false); |
||
16 | setModal(false); |
||
17 | setViewMode(QFileDialog::List); |
||
18 | setWindowFlags(Qt::Widget); |
||
10250 | fschmid | 19 | QList<QPushButton *> b = findChildren<QPushButton *>(); |
10245 | cbradney | 20 | QListIterator<QPushButton *> i(b); |
21 | while (i.hasNext()) |
||
22 | i.next()->setVisible(false); |
||
10242 | subik | 23 | setMinimumSize(QSize(480, 310)); |
24 | setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); |
||
25 | } |
||
26 | |||
27 | QString ScFileWidget::selectedFile() |
||
28 | { |
||
29 | QStringList l(selectedFiles()); |
||
30 | if (l.count() == 0) |
||
31 | return QString(); |
||
32 | return l.at(0); |
||
33 | } |