| 1 | /********************************************************************** |
| 2 | ** Author: Nicolas Remy |
| 3 | ** Copyright (C) 2002-2004 The Board of Trustees of the Leland Stanford Junior |
| 4 | ** University |
| 5 | ** All rights reserved. |
| 6 | ** |
| 7 | ** This file is part of the luckybackup project |
| 8 | ** |
| 9 | ** This file may be distributed and/or modified under the terms of the |
| 10 | ** license defined by the Stanford Center for Reservoir Forecasting and |
| 11 | ** appearing in the file LICENSE.XFREE included in the packaging of this file. |
| 12 | ** |
| 13 | ** This file may be distributed and/or modified under the terms of the |
| 14 | ** GNU General Public License version 2 as published by the Free Software |
| 15 | ** Foundation and appearing in the file LICENSE.GPL included in the |
| 16 | ** packaging of this file. |
| 17 | ** |
| 18 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
| 19 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 20 | ** |
| 21 | ** See http://www.gnu.org/copyleft/gpl.html for GPL licensing information. |
| 22 | ** |
| 23 | ** Contact the Stanford Center for Reservoir Forecasting, Stanford University |
| 24 | ** if any conditions of this licensing are not clear to you. |
| 25 | ** |
| 26 | **********************************************************************/ |
| 27 | |
| 28 | #include "qdirdialog.h"cxx . . $ `<file>/src/qdirdialog.h`/ |
| 29 | |
| 30 | |
| 31 | QDirDialogcxx . . $ QDirDialog#::QDirDialogcxx . . $ QDirDialog#QDirDialog(584271a40ee9463d).( const QStringcxx . . $ QString#& extension, |
| 32 | const QStringcxx . . $ QString#& dirName, QWidgetcxx . . $ QWidget#* parent, |
| 33 | const char* name, |
| 34 | QFileDialogcxx . . $ QFileDialog#::FileModecxx . . $ QFileDialog#FileMode# mode, |
| 35 | bool modal ) |
| 36 | : QFileDialogcxx . . $ QFileDialog#( parent, QStringcxx . . $ QString#QString(ee6b7ef95d0103b6).::nullcxx . . $ QString#null., dirName), |
| 37 | extension_cxx . . $ QDirDialog#extension_.( extension ) { |
| 38 | |
| 39 | if(name) |
| 40 | setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).(namecxx . . $ QString#QString(85c52e162fed56f9).); |
| 41 | |
| 42 | setModalcxx . . $ QDialog#setModal(b45ddcbc8423892c).(modal); |
| 43 | init_dialogcxx . . $ QDirDialog#init_dialog(508d43a8df9137e8).( mode ); |
| 44 | } |
| 45 | |
| 46 | QDirDialogcxx . . $ QDirDialog#::QDirDialogcxx . . $ QDirDialog#QDirDialog(63efbab6f16361e9).( const QStringcxx . . $ QString#& extension, |
| 47 | QWidgetcxx . . $ QWidget#* parent, |
| 48 | const char* name, |
| 49 | QFileDialogcxx . . $ QFileDialog#::FileModecxx . . $ QFileDialog#FileMode# mode, |
| 50 | bool modal ) |
| 51 | : QFileDialogcxx . . $ QFileDialog#( parent, Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::Dialogcxx . . $ Qt/Dialog.), |
| 52 | extension_cxx . . $ QDirDialog#extension_.( extension ) { |
| 53 | |
| 54 | setModalcxx . . $ QDialog#setModal(b45ddcbc8423892c).(modal); |
| 55 | if(name) |
| 56 | setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).(namecxx . . $ QString#QString(85c52e162fed56f9).); |
| 57 | |
| 58 | init_dialogcxx . . $ QDirDialog#init_dialog(508d43a8df9137e8).( mode ); |
| 59 | } |
| 60 | |
| 61 | |
| 62 | void QDirDialogcxx . . $ QDirDialog#::check_selected_directorycxx . . $ QDirDialog#check_selected_directory(3520e46b33348bf6).( const QStringcxx . . $ QString#& dirName ) { |
| 63 | if( !dirName.endsWithcxx . . $ QString#endsWith(8cce4688c16f48f3).( extension_cxx . . $ QDirDialog#extension_., Qtcxx . . $ Qt/::CaseInsensitivecxx . . $ Qt/CaseInsensitive.) ) return; |
| 64 | |
| 65 | selected_directory_cxx . . $ QDirDialog#selected_directory_. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). dirName; |
| 66 | this->acceptcxx . . $ QDirDialog#accept(49f6e7a06ebc5aa8).(); |
| 67 | } |
| 68 | |
| 69 | |
| 70 | void QDirDialogcxx . . $ QDirDialog#::init_dialogcxx . . $ QDirDialog#init_dialog(508d43a8df9137e8).( QFileDialogcxx . . $ QFileDialog#::FileModecxx . . $ QFileDialog#FileMode# mode ) { |
| 71 | setFileModecxx . . $ QFileDialog#setFileMode(508d43a8df9137e8).( mode ); |
| 72 | |
| 73 | QObjectcxx . . $ QObject#::connectcxx . . $ QObject#connect(158df1d9a01a3410).( this, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( directoryEntered( const QString& ) ), |
| 74 | this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( check_selected_directory( const QString& ) ) ); |
| 75 | |
| 76 | } |
| 77 | |
| 78 | |
| 79 | void QDirDialogcxx . . $ QDirDialog#::acceptcxx . . $ QDirDialog#accept(49f6e7a06ebc5aa8).() { |
| 80 | QDialogcxx . . $ QDialog#::acceptcxx . . $ QDialog#accept(49f6e7a06ebc5aa8).(); |
| 81 | QStringListcxx . . $ QStringList# sl = selectedFilescxx . . $ QFileDialog#selectedFiles(e1dbd5c4feadc8f5).(); |
| 82 | if( selected_directory_cxx . . $ QDirDialog#selected_directory_..isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() ) { |
| 83 | selected_directory_cxx . . $ QDirDialog#selected_directory_. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). sl[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0]; |
| 84 | } |
| 85 | } |