author | zautrix <zautrix> | 2005-06-11 18:34:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-11 18:34:05 (UTC) |
commit | b56d3be87557510285d3381250faf9b7af300680 (patch) (unidiff) | |
tree | 887e24db261f56f78dda8397196a6125cc346fc5 /microkde/kfiledialog.cpp | |
parent | 81370a5f955c2710b6e9336b6c412c8d630ef72a (diff) | |
download | kdepimpi-b56d3be87557510285d3381250faf9b7af300680.zip kdepimpi-b56d3be87557510285d3381250faf9b7af300680.tar.gz kdepimpi-b56d3be87557510285d3381250faf9b7af300680.tar.bz2 |
fixxx
-rw-r--r-- | microkde/kfiledialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index c64f325..383e711 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp | |||
@@ -41,48 +41,48 @@ QString KFileDialog::getOpenFileName( const QString & fn, | |||
41 | { | 41 | { |
42 | QString retfile = ""; | 42 | QString retfile = ""; |
43 | QDialog dia ( par, "input-dialog", true ); | 43 | QDialog dia ( par, "input-dialog", true ); |
44 | // QLineEdit lab ( &dia ); | 44 | // QLineEdit lab ( &dia ); |
45 | QVBoxLayout lay( &dia ); | 45 | QVBoxLayout lay( &dia ); |
46 | lay.setMargin(7); | 46 | lay.setMargin(7); |
47 | lay.setSpacing(7); | 47 | lay.setSpacing(7); |
48 | QString file = fn; | 48 | QString file = fn; |
49 | if ( file.isEmpty() ) | 49 | if ( file.isEmpty() ) |
50 | file = QDir::homeDirPath()+"/*";; | 50 | file = QDir::homeDirPath()+"/*";; |
51 | QFileInfo fi ( file ); | 51 | QFileInfo fi ( file ); |
52 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); | 52 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); |
53 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); | 53 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); |
54 | lay.addWidget( &o); | 54 | lay.addWidget( &o); |
55 | dia.showMaximized(); | 55 | dia.showMaximized(); |
56 | dia.setCaption( cap ); | 56 | dia.setCaption( cap ); |
57 | int res = dia.exec(); | 57 | int res = dia.exec(); |
58 | if ( res ) | 58 | if ( res ) |
59 | retfile = o.selectedName(); | 59 | retfile = o.selectedName(); |
60 | return retfile; | 60 | return retfile; |
61 | } | 61 | } |
62 | QString KFileDialog::getExistingDirectory( const QString & fn, | 62 | QString KFileDialog::getExistingDirectory( const QString & fn, |
63 | const QString & cap, QWidget * par ) | 63 | const QString & cap, QWidget * par ) |
64 | { | 64 | { |
65 | return KFileDialog::getSaveFileName( fn, cap, pr ); | 65 | return KFileDialog::getSaveFileName( fn, cap, par ); |
66 | } | 66 | } |
67 | #else | 67 | #else |
68 | 68 | ||
69 | #include <qfiledialog.h> | 69 | #include <qfiledialog.h> |
70 | 70 | ||
71 | QString KFileDialog::getSaveFileName( const QString & fn, | 71 | QString KFileDialog::getSaveFileName( const QString & fn, |
72 | const QString & cap , QWidget * par ) | 72 | const QString & cap , QWidget * par ) |
73 | { | 73 | { |
74 | return QFileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap ); | 74 | return QFileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap ); |
75 | } | 75 | } |
76 | QString KFileDialog::getOpenFileName( const QString & fn, | 76 | QString KFileDialog::getOpenFileName( const QString & fn, |
77 | const QString & cap, QWidget * par ) | 77 | const QString & cap, QWidget * par ) |
78 | { | 78 | { |
79 | 79 | ||
80 | return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); | 80 | return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); |
81 | } | 81 | } |
82 | QString KFileDialog::getExistingDirectory( const QString & fn, | 82 | QString KFileDialog::getExistingDirectory( const QString & fn, |
83 | const QString & cap, QWidget * par ) | 83 | const QString & cap, QWidget * par ) |
84 | { | 84 | { |
85 | return QFileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); | 85 | return QFileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); |
86 | } | 86 | } |
87 | #endif | 87 | #endif |
88 | 88 | ||