author | zautrix <zautrix> | 2005-06-11 18:34:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-11 18:34:05 (UTC) |
commit | b56d3be87557510285d3381250faf9b7af300680 (patch) (side-by-side diff) | |
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 @@ -1,88 +1,88 @@ #include <kfiledialog.h> #include <qdialog.h> #include <qlayout.h> #include <qdir.h> #include <qfileinfo.h> #include <qapplication.h> #ifndef DESKTOP_VERSION //US orig#include <ofileselector.h> #include <ofileselector_p.h> QString KFileDialog::getSaveFileName( const QString & fn, const QString & cap , QWidget * par ) { QString retfile = ""; QDialog dia ( par, "input-dialog", true ); QVBoxLayout lay( &dia ); lay.setMargin(7); lay.setSpacing(7); QString file = fn; if ( file.isEmpty() ) file = QDir::homeDirPath()+"/*"; QFileInfo fi ( file ); OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() ); QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); lay.addWidget( &o); // o.setNewVisible( true ); // o.setNameVisible( true ); dia.showMaximized(); if ( cap.isEmpty() ) dia.setCaption( file ); else dia.setCaption( cap ); int res = dia.exec(); if ( res ) retfile = o.selectedName(); return retfile; } QString KFileDialog::getOpenFileName( const QString & fn, const QString & cap, QWidget * par ) { QString retfile = ""; QDialog dia ( par, "input-dialog", true ); // QLineEdit lab ( &dia ); QVBoxLayout lay( &dia ); lay.setMargin(7); lay.setSpacing(7); QString file = fn; if ( file.isEmpty() ) file = QDir::homeDirPath()+"/*";; QFileInfo fi ( file ); OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); lay.addWidget( &o); dia.showMaximized(); dia.setCaption( cap ); int res = dia.exec(); if ( res ) retfile = o.selectedName(); return retfile; } QString KFileDialog::getExistingDirectory( const QString & fn, const QString & cap, QWidget * par ) { - return KFileDialog::getSaveFileName( fn, cap, pr ); + return KFileDialog::getSaveFileName( fn, cap, par ); } #else #include <qfiledialog.h> QString KFileDialog::getSaveFileName( const QString & fn, const QString & cap , QWidget * par ) { return QFileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap ); } QString KFileDialog::getOpenFileName( const QString & fn, const QString & cap, QWidget * par ) { return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); } QString KFileDialog::getExistingDirectory( const QString & fn, const QString & cap, QWidget * par ) { return QFileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); } #endif |