author | zecke <zecke> | 2002-04-12 13:07:35 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-12 13:07:35 (UTC) |
commit | 3973cf42c778055ab81a9ee254eaf8829464f936 (patch) (unidiff) | |
tree | 4ae4fc512c9e37657ea9f4e05f28d1ea57a855d3 | |
parent | c1c9ac64f7f4871642d645ac1da1a2f36853ccb2 (diff) | |
download | opie-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 )
-rw-r--r-- | libopie/libopie.pro | 4 | ||||
-rw-r--r-- | libopie/ofiledialog.cc | 14 | ||||
-rw-r--r-- | libopie/ofileselector.cc | 40 |
3 files changed, 20 insertions, 38 deletions
diff --git a/libopie/libopie.pro b/libopie/libopie.pro index 4ba2836..3c8da78 100644 --- a/libopie/libopie.pro +++ b/libopie/libopie.pro | |||
@@ -2,4 +2,4 @@ TEMPLATE = lib | |||
2 | CONFIG += qte warn_on release | 2 | CONFIG += qte warn_on release |
3 | HEADERS = ofileselector.h tododb.h todoevent.h todoresource.h todovcalresource.h xmltree.h oconfig.h | 3 | HEADERS = ofileselector.h ofiledialog.h tododb.h todoevent.h todoresource.h todovcalresource.h xmltree.h oconfig.h |
4 | SOURCES = ofileselector.cc xmltree.cc tododb.cpp todoevent.cpp todovcalresource.cpp oconfig.cpp | 4 | SOURCES = ofileselector.cc ofiledialog.cc xmltree.cc tododb.cpp todoevent.cpp todovcalresource.cpp oconfig.cpp |
5 | TARGET = opie | 5 | TARGET = opie |
diff --git a/libopie/ofiledialog.cc b/libopie/ofiledialog.cc index 92b0d0a..164fadd 100644 --- a/libopie/ofiledialog.cc +++ b/libopie/ofiledialog.cc | |||
@@ -42,5 +42,6 @@ OFileDialog::OFileDialog(const QString &caption, | |||
42 | { | 42 | { |
43 | QVBoxLayout *lay = new QVBoxLayout(this); | 43 | // QVBoxLayout *lay = new QVBoxLayout(this); |
44 | 44 | //showMaximized(); | |
45 | file = new OFileSelector(0 , mode, selector, | 45 | QVBoxLayout *lay = new QVBoxLayout(this ); |
46 | file = new OFileSelector(this , mode, selector, | ||
46 | dirName, fileName, | 47 | dirName, fileName, |
@@ -48,2 +49,4 @@ OFileDialog::OFileDialog(const QString &caption, | |||
48 | lay->addWidget( file ); | 49 | lay->addWidget( file ); |
50 | |||
51 | //lay->addWidget( file ); | ||
49 | //showFullScreen(); | 52 | //showFullScreen(); |
@@ -55,3 +58,4 @@ OFileDialog::OFileDialog(const QString &caption, | |||
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 |
@@ -80,2 +84,3 @@ QString OFileDialog::getOpenFileName(int selector, | |||
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() ) |
@@ -95,2 +100,3 @@ QString OFileDialog::getSaveFileName(int selector, | |||
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() ) |
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index c3a3514..7451c1b 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc | |||
@@ -81,4 +81,4 @@ OFileSelector::OFileSelector(QWidget *wid, int mode, int selector, const QString | |||
81 | { | 81 | { |
82 | 82 | if(wid!=0) | |
83 | resize(wid->width(),wid->height()); | 83 | resize(wid->width(),wid->height()); |
84 | m_selector = selector; | 84 | m_selector = selector; |
@@ -196,2 +196,3 @@ void OFileSelector::init() | |||
196 | connect(m_select, SIGNAL(fileSelected( const DocLnk &) ), this, SLOT(slotFileBridgeSelected(const DocLnk &) ) ); | 196 | connect(m_select, SIGNAL(fileSelected( const DocLnk &) ), this, SLOT(slotFileBridgeSelected(const DocLnk &) ) ); |
197 | m_pseudoLayout = 0l; | ||
197 | }else { | 198 | }else { |
@@ -597,3 +598,4 @@ void OFileSelector::slotViewCheck(const QString &view ){ | |||
597 | delete m_pseudo; | 598 | delete m_pseudo; |
598 | delete m_pseudoLayout; | 599 | if(m_pseudoLayout!=0 ) |
600 | delete m_pseudoLayout; | ||
599 | } | 601 | } |
@@ -626,16 +628,3 @@ void OFileSelector::slotViewCheck(const QString &view ){ | |||
626 | 628 | ||
627 | delete m_boxToolbar; | 629 | |
628 | delete m_homeButton; | ||
629 | delete m_docButton; | ||
630 | delete m_location; | ||
631 | delete m_up; | ||
632 | delete m_pseudo; | ||
633 | delete m_pseudoLayout; | ||
634 | m_boxToolbar = 0; | ||
635 | m_homeButton = 0; | ||
636 | m_docButton = 0; | ||
637 | m_location = 0; | ||
638 | m_up = 0; | ||
639 | m_pseudo = 0; | ||
640 | m_pseudoLayout = 0; | ||
641 | 630 | ||
@@ -652,16 +641,2 @@ void OFileSelector::slotViewCheck(const QString &view ){ | |||
652 | m_View = 0; | 641 | m_View = 0; |
653 | delete m_boxToolbar; | ||
654 | delete m_homeButton; | ||
655 | delete m_docButton; | ||
656 | delete m_location; | ||
657 | delete m_up; | ||
658 | delete m_pseudo; | ||
659 | delete m_pseudoLayout; | ||
660 | m_boxToolbar = 0; | ||
661 | m_homeButton = 0; | ||
662 | m_docButton = 0; | ||
663 | m_location = 0; | ||
664 | m_up = 0; | ||
665 | m_pseudo = 0; | ||
666 | m_pseudoLayout = 0; | ||
667 | 642 | ||
@@ -703,3 +678,4 @@ void OFileSelector::initializeListView() | |||
703 | delete m_pseudo; | 678 | delete m_pseudo; |
704 | delete m_pseudoLayout; | 679 | if(m_pseudoLayout!=0 ) // why did you overload malloc |
680 | delete m_pseudoLayout; | ||
705 | m_boxToolbar = 0; | 681 | m_boxToolbar = 0; |