author | harlekin <harlekin> | 2002-10-31 13:09:13 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-31 13:09:13 (UTC) |
commit | ae467a89591b45a8a190174a0cae0b330de8d89e (patch) (side-by-side diff) | |
tree | 2a4799378bdf4ce450955492b66b418214b9fbf4 /libopie/ofileselector | |
parent | f6ca21ad98c7af99c0ae4c04afe3c2126317d6de (diff) | |
download | opie-ae467a89591b45a8a190174a0cae0b330de8d89e.zip opie-ae467a89591b45a8a190174a0cae0b330de8d89e.tar.gz opie-ae467a89591b45a8a190174a0cae0b330de8d89e.tar.bz2 |
excludeFromRefresh() added
-rw-r--r-- | libopie/ofileselector/odefaultfactories.cpp | 8 | ||||
-rw-r--r-- | libopie/ofileselector/odefaultfactories.h | 3 | ||||
-rw-r--r-- | libopie/ofileselector/ofiledialog.cpp | 2 | ||||
-rw-r--r-- | libopie/ofileselector/ofiledialog.h | 3 | ||||
-rw-r--r-- | libopie/ofileselector/ofileselector.cpp | 8 |
5 files changed, 19 insertions, 5 deletions
diff --git a/libopie/ofileselector/odefaultfactories.cpp b/libopie/ofileselector/odefaultfactories.cpp index c41fbca..c8efffb 100644 --- a/libopie/ofileselector/odefaultfactories.cpp +++ b/libopie/ofileselector/odefaultfactories.cpp @@ -1,15 +1,23 @@ #include "ofilelistview.h" +#include "ofileiconview.h" #include "olocallister.h" + #include "odefaultfactories.h" extern "C" { + + OFileView* newFileIconView( OFileSelector* sel, QWidget* parent ) { + return new OFileIconView( parent, sel ); + } + OFileView* newFileListView( OFileSelector* sel, QWidget* par ) { return new OFileListView(par, sel ); } + OLister* newLocalLister( OFileSelector* sel) { return new OLocalLister( sel ); } }; diff --git a/libopie/ofileselector/odefaultfactories.h b/libopie/ofileselector/odefaultfactories.h index eb698d3..b4c35af 100644 --- a/libopie/ofileselector/odefaultfactories.h +++ b/libopie/ofileselector/odefaultfactories.h @@ -1,14 +1,17 @@ #ifndef OPIE_DEFAULT_FACTORIES_H #define OPIE_DEFAULT_FACTORIES_H #include "ofilefactory.h" extern "C" { + OFileView* newFileIconView( OFileSelector*, QWidget* parent ); OFileView* newFileListView( OFileSelector*, QWidget* parent ); + OLister* newLocalLister(OFileSelector* ); + }; #endif diff --git a/libopie/ofileselector/ofiledialog.cpp b/libopie/ofileselector/ofiledialog.cpp index 430def2..d137c66 100644 --- a/libopie/ofileselector/ofiledialog.cpp +++ b/libopie/ofileselector/ofiledialog.cpp @@ -71,33 +71,33 @@ QString OFileDialog::fileName()const DocLnk OFileDialog::selectedDocument()const { return file->selectedDocument(); } QString OFileDialog::getOpenFileName(int selector, const QString &startDir, const QString &file, const MimeTypes &mimes, QWidget *wid, const QString &caption ) { QString ret; OFileDialog dlg( caption.isEmpty() ? tr("Open") : caption, wid, OFileSelector::Open, selector, startDir, file, mimes); dlg.showMaximized(); if( dlg.exec() ) - ret = dlg.fileName(); + ret = dlg.fileName(); return ret; } QString OFileDialog::getSaveFileName(int selector, const QString &startDir, const QString &file, const MimeTypes &mimes, QWidget *wid, const QString &caption ) { QString ret; OFileDialog dlg( caption.isEmpty() ? tr("Save") : caption, wid, OFileSelector::Save, selector, startDir, file, mimes); dlg.showMaximized(); if( dlg.exec() ) ret = dlg.fileName(); diff --git a/libopie/ofileselector/ofiledialog.h b/libopie/ofileselector/ofiledialog.h index e14253c..e368e96 100644 --- a/libopie/ofileselector/ofiledialog.h +++ b/libopie/ofileselector/ofiledialog.h @@ -19,33 +19,34 @@ : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OpieFileDialog_h #define OpieFileDialog_h #include <qdialog.h> -#include <opie/ofileselector.h> +//#include <opie/ofileselector.h> +#include "ofileselector.h" class OFileDialog : public QDialog { Q_OBJECT public: OFileDialog(const QString &caption, QWidget *, int mode, int selector, const QString &dirName, const QString &fileName = QString::null, const MimeTypes &mimetypes = MimeTypes() ); QString mimetype() const; QString fileName() const; DocLnk selectedDocument()const; // static methods static QString getOpenFileName(int selector, const QString& startDir = QString::null, diff --git a/libopie/ofileselector/ofileselector.cpp b/libopie/ofileselector/ofileselector.cpp index 9ce07dd..c6e923f 100644 --- a/libopie/ofileselector/ofileselector.cpp +++ b/libopie/ofileselector/ofileselector.cpp @@ -472,32 +472,34 @@ void OFileSelector::init() initializeOldSelector(); }else{ initializeView(); } if( m_shLne ) // the LineEdit with the current FileName initializeName(); if( m_shPerm ) // the Permission QCheckBox initializePerm(); if( m_shYesNo ) // the Yes No button row initializeYes( ); if (m_selector != Normal ) reparse(); + + showMaximized(); } void OFileSelector::updateMimes() { if( m_autoMime ){ m_mimetypes.clear(); m_mimetypes.insert( tr("All"), QString::null ); if( m_selector == Normal ){ DocLnkSet set; Global::findDocuments(&set, QString::null ); QListIterator<DocLnk> dit( set.children() ); for( ; dit.current(); ++dit ){ if( !m_mimetypes.contains( (*dit)->type() ) ) m_mimetypes.insert( (*dit)->type(), (*dit)->type() ); } }// else done in reparse } @@ -638,33 +640,33 @@ void OFileSelector::initializeChooser() this, SLOT( slotMimeCheck( const QString & ) ) ); } } /* generate the buttons for the toolbar */ void OFileSelector::initToolbar() { m_mainView = new OFileSelectorMain( this ); /* now generate the tool bar */ qWarning( "toolbar" ); m_pseudo = new QWidget( m_mainView, "Pseudo Widget" ); m_pseudoLayout = new QVBoxLayout( m_pseudo ); m_boxToolbar = new QHBox( m_pseudo ); m_boxToolbar->setSpacing( 0 ); // tool bar members now - m_location = new QComboBox( m_boxToolbar ); + m_location = new QComboBox( m_boxToolbar ); m_location->setEditable( TRUE ); m_location->setDuplicatesEnabled( FALSE ); connect( m_location, SIGNAL(activated(const QString& ) ), this, SLOT(slotLocationActivated(const QString& )) ); connect( m_location->lineEdit(), SIGNAL(returnPressed() ) , this, SLOT(locationComboChanged() ) ); // UP Button m_up = new QPushButton( Resource::loadIconSet("up"), QString::null, m_boxToolbar, "cdUpButton" ); m_up->setFixedSize( QSize(20, 20 ) ); connect( m_up, SIGNAL( clicked() ), this, SLOT(cdUP() ) ); m_up->setFlat( TRUE ); // Home Button m_homeButton = new QPushButton(Resource::loadIconSet("home"), @@ -961,35 +963,35 @@ void OFileSelector::setView( const QString& lis ) { list = lis; m_selector = Extended; } setLister(m_listerName); m_fileView = factory()->view( list, this, m_mainView ); m_mainView->setWidget( m_fileView->widget() ); reparse(); } } /* * the factory */ void OFileSelector::initFactory() { m_fileFactory = new OFileFactory(); m_fileFactory->addLister(tr("Files"), newLocalLister ); m_fileFactory->addView(tr("List View"), newFileListView ); - /* the factory is just a dummy */ - m_fileFactory->addView(tr("Documents"), newFileListView ); + m_fileFactory->addView(tr("Documents"), newFileIconView ); } + void OFileSelector::fillList() { qWarning("fill list"); if (!m_viewCheck ) return; m_viewCheck->clear(); QStringList list = factory()->views(); qWarning("views: " + list.join(";") ); for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { qWarning( (*it) ); if ( (*it) == tr("Documents") ) { m_viewCheck->insertItem( (*it) ); }else{ m_viewCheck->insertItem( (*it) ); m_viewCheck->insertItem( tr("All ") + (*it) ); } |