summaryrefslogtreecommitdiff
path: root/libopie/ofiledialog.cc
authorzecke <zecke>2002-04-12 13:07:35 (UTC)
committer zecke <zecke>2002-04-12 13:07:35 (UTC)
commit3973cf42c778055ab81a9ee254eaf8829464f936 (patch) (unidiff)
tree4ae4fc512c9e37657ea9f4e05f28d1ea57a855d3 /libopie/ofiledialog.cc
parentc1c9ac64f7f4871642d645ac1da1a2f36853ccb2 (diff)
downloadopie-3973cf42c778055ab81a9ee254eaf8829464f936.zip
opie-3973cf42c778055ab81a9ee254eaf8829464f936.tar.gz
opie-3973cf42c778055ab81a9ee254eaf8829464f936.tar.bz2
Add OFileDialog to the .pro
OFileDialog is now working resize it when not used by the static methods OFileSelector some bugfixes. Some bugs are not yet fixed (the switching from views can segfault )
Diffstat (limited to 'libopie/ofiledialog.cc') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofiledialog.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/libopie/ofiledialog.cc b/libopie/ofiledialog.cc
index 92b0d0a..164fadd 100644
--- a/libopie/ofiledialog.cc
+++ b/libopie/ofiledialog.cc
@@ -40,12 +40,15 @@ OFileDialog::OFileDialog(const QString &caption,
40 const QStringList &mimetypes ) 40 const QStringList &mimetypes )
41 : QDialog( wid, "OFileDialog", true ) 41 : QDialog( wid, "OFileDialog", true )
42{ 42{
43 // QVBoxLayout *lay = new QVBoxLayout(this);
44 //showMaximized();
43 QVBoxLayout *lay = new QVBoxLayout(this); 45 QVBoxLayout *lay = new QVBoxLayout(this);
44 46 file = new OFileSelector(this , mode, selector,
45 file = new OFileSelector(0 , mode, selector,
46 dirName, fileName, 47 dirName, fileName,
47 mimetypes ); 48 mimetypes );
48 lay->addWidget( file ); 49 lay->addWidget( file );
50
51 //lay->addWidget( file );
49 //showFullScreen(); 52 //showFullScreen();
50 setCaption( caption.isEmpty() ? tr("FileDialog") : caption ); 53 setCaption( caption.isEmpty() ? tr("FileDialog") : caption );
51 connect(file, SIGNAL(fileSelected(const QString&) ), 54 connect(file, SIGNAL(fileSelected(const QString&) ),
@@ -53,7 +56,8 @@ OFileDialog::OFileDialog(const QString &caption,
53 56
54 connect(file, SIGNAL(dirSelected(const QString &) ), 57 connect(file, SIGNAL(dirSelected(const QString &) ),
55 this, SLOT(slotDirSelected(const QString &) ) ); 58 this, SLOT(slotDirSelected(const QString &) ) );
56 showMaximized(); 59
60
57 file->setYesCancelVisible( false ); // relayout 61 file->setYesCancelVisible( false ); // relayout
58} 62}
59QString OFileDialog::mimetype()const 63QString OFileDialog::mimetype()const
@@ -78,6 +82,7 @@ QString OFileDialog::getOpenFileName(int selector,
78 QString ret; 82 QString ret;
79 OFileDialog dlg( caption.isEmpty() ? tr("Open") : caption, 83 OFileDialog dlg( caption.isEmpty() ? tr("Open") : caption,
80 wid, OFileSelector::OPEN, selector, startDir, file, mimes); 84 wid, OFileSelector::OPEN, selector, startDir, file, mimes);
85 dlg.showMaximized();
81 if( dlg.exec() ) 86 if( dlg.exec() )
82 ret = dlg.fileName(); 87 ret = dlg.fileName();
83 88
@@ -93,6 +98,7 @@ QString OFileDialog::getSaveFileName(int selector,
93 QString ret; 98 QString ret;
94 OFileDialog dlg( caption.isEmpty() ? tr("Save") : caption, 99 OFileDialog dlg( caption.isEmpty() ? tr("Save") : caption,
95 wid, OFileSelector::SAVE, selector, startDir, file, mimes); 100 wid, OFileSelector::SAVE, selector, startDir, file, mimes);
101 dlg.showMaximized();
96 if( dlg.exec() ) 102 if( dlg.exec() )
97 ret = dlg.fileName(); 103 ret = dlg.fileName();
98 104