summaryrefslogtreecommitdiffabout
path: root/microkde/kfiledialog.cpp
authorzautrix <zautrix>2005-02-05 14:31:01 (UTC)
committer zautrix <zautrix>2005-02-05 14:31:01 (UTC)
commit231a90376b096687770b2b029d4a3d2efa232b2e (patch) (unidiff)
tree609a9b8434fe28eab8ea9a1a7e4441a37be0b246 /microkde/kfiledialog.cpp
parent7be6218eaf6bd29d4bc09d0bb79bb0dec6da9ae5 (diff)
downloadkdepimpi-231a90376b096687770b2b029d4a3d2efa232b2e.zip
kdepimpi-231a90376b096687770b2b029d4a3d2efa232b2e.tar.gz
kdepimpi-231a90376b096687770b2b029d4a3d2efa232b2e.tar.bz2
many fixes
Diffstat (limited to 'microkde/kfiledialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kfiledialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp
index 309f8dc..3f47425 100644
--- a/microkde/kfiledialog.cpp
+++ b/microkde/kfiledialog.cpp
@@ -7,59 +7,59 @@
7 7
8#ifndef DESKTOP_VERSION 8#ifndef DESKTOP_VERSION
9//US orig#include <ofileselector.h> 9//US orig#include <ofileselector.h>
10#include <ofileselector_p.h> 10#include <ofileselector_p.h>
11QString KFileDialog::getSaveFileName( const QString & fn, 11QString KFileDialog::getSaveFileName( const QString & fn,
12 const QString & cap , QWidget * par ) 12 const QString & cap , QWidget * par )
13{ 13{
14 QString retfile = ""; 14 QString retfile = "";
15 QDialog dia ( par, "input-dialog", true ); 15 QDialog dia ( par, "input-dialog", true );
16 QVBoxLayout lay( &dia ); 16 QVBoxLayout lay( &dia );
17 lay.setMargin(7); 17 lay.setMargin(7);
18 lay.setSpacing(7); 18 lay.setSpacing(7);
19 dia.setCaption( cap );
20 QString file = fn; 19 QString file = fn;
21 if ( file.isEmpty() ) 20 if ( file.isEmpty() )
22 file = QDir::homeDirPath()+"/*"; 21 file = QDir::homeDirPath()+"/*";
23 QFileInfo fi ( file ); 22 QFileInfo fi ( file );
24 OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() ); 23 OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() );
25 QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); 24 QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) );
26 lay.addWidget( &o); 25 lay.addWidget( &o);
27 // o.setNewVisible( true ); 26 // o.setNewVisible( true );
28 // o.setNameVisible( true ); 27 // o.setNameVisible( true );
29 dia.showMaximized(); 28 dia.showMaximized();
29 dia.setCaption( cap );
30 int res = dia.exec(); 30 int res = dia.exec();
31 if ( res ) 31 if ( res )
32 retfile = o.selectedName(); 32 retfile = o.selectedName();
33 return retfile; 33 return retfile;
34} 34}
35 35
36QString KFileDialog::getOpenFileName( const QString & fn, 36QString KFileDialog::getOpenFileName( const QString & fn,
37 const QString & cap, QWidget * par ) 37 const QString & cap, QWidget * par )
38{ 38{
39 QString retfile = ""; 39 QString retfile = "";
40 QDialog dia ( par, "input-dialog", true ); 40 QDialog dia ( par, "input-dialog", true );
41 // QLineEdit lab ( &dia ); 41 // QLineEdit lab ( &dia );
42 QVBoxLayout lay( &dia ); 42 QVBoxLayout lay( &dia );
43 lay.setMargin(7); 43 lay.setMargin(7);
44 lay.setSpacing(7); 44 lay.setSpacing(7);
45 dia.setCaption( cap );
46 QString file = fn; 45 QString file = fn;
47 if ( file.isEmpty() ) 46 if ( file.isEmpty() )
48 file = QDir::homeDirPath()+"/*";; 47 file = QDir::homeDirPath()+"/*";;
49 QFileInfo fi ( file ); 48 QFileInfo fi ( file );
50 OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); 49 OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() );
51 QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); 50 QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) );
52 lay.addWidget( &o); 51 lay.addWidget( &o);
53 dia.showMaximized(); 52 dia.showMaximized();
53 dia.setCaption( cap );
54 int res = dia.exec(); 54 int res = dia.exec();
55 if ( res ) 55 if ( res )
56 retfile = o.selectedName(); 56 retfile = o.selectedName();
57 return retfile; 57 return retfile;
58} 58}
59 59
60#else 60#else
61 61
62#include <qfiledialog.h> 62#include <qfiledialog.h>
63 63
64QString KFileDialog::getSaveFileName( const QString & fn, 64QString KFileDialog::getSaveFileName( const QString & fn,
65 const QString & cap , QWidget * par ) 65 const QString & cap , QWidget * par )