diff options
Diffstat (limited to 'rbutil/rbutilqt/browseof.cpp')
-rw-r--r-- | rbutil/rbutilqt/browseof.cpp | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/rbutil/rbutilqt/browseof.cpp b/rbutil/rbutilqt/browseof.cpp deleted file mode 100644 index 28cde9c6fe..0000000000 --- a/rbutil/rbutilqt/browseof.cpp +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2007 by Dominik Wenger | ||
10 | * $Id$ | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #include <QtGui> | ||
21 | |||
22 | #include "browseof.h" | ||
23 | #include "browsedirtree.h" | ||
24 | |||
25 | |||
26 | BrowseOF::BrowseOF(QWidget *parent) : QDialog(parent) | ||
27 | { | ||
28 | ui.setupUi(this); | ||
29 | this->setModal(true); | ||
30 | |||
31 | connect(ui.browseOFButton,SIGNAL(clicked()),this,SLOT(onBrowse())); | ||
32 | } | ||
33 | |||
34 | void BrowseOF::setFile(QString file) | ||
35 | { | ||
36 | ui.OFlineEdit->setText(file); | ||
37 | } | ||
38 | |||
39 | void BrowseOF::onBrowse() | ||
40 | { | ||
41 | BrowseDirtree browser(this); | ||
42 | browser.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); | ||
43 | |||
44 | if(QFileInfo(ui.OFlineEdit->text()).exists()) | ||
45 | { | ||
46 | browser.setDir(ui.OFlineEdit->text()); | ||
47 | } | ||
48 | |||
49 | if(browser.exec() == QDialog::Accepted) | ||
50 | { | ||
51 | qDebug() << browser.getSelected(); | ||
52 | setFile(browser.getSelected()); | ||
53 | } | ||
54 | } | ||
55 | |||
56 | QString BrowseOF::getFile() | ||
57 | { | ||
58 | return ui.OFlineEdit->text(); | ||
59 | } | ||
60 | |||
61 | void BrowseOF::accept() | ||
62 | { | ||
63 | this->close(); | ||
64 | setResult(QDialog::Accepted); | ||
65 | } | ||
66 | |||
67 | |||
68 | |||