summaryrefslogtreecommitdiff
path: root/libopie/ofileselector
authorharlekin <harlekin>2002-10-31 13:09:13 (UTC)
committer harlekin <harlekin>2002-10-31 13:09:13 (UTC)
commitae467a89591b45a8a190174a0cae0b330de8d89e (patch) (side-by-side diff)
tree2a4799378bdf4ce450955492b66b418214b9fbf4 /libopie/ofileselector
parentf6ca21ad98c7af99c0ae4c04afe3c2126317d6de (diff)
downloadopie-ae467a89591b45a8a190174a0cae0b330de8d89e.zip
opie-ae467a89591b45a8a190174a0cae0b330de8d89e.tar.gz
opie-ae467a89591b45a8a190174a0cae0b330de8d89e.tar.bz2
excludeFromRefresh() added
Diffstat (limited to 'libopie/ofileselector') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofileselector/odefaultfactories.cpp8
-rw-r--r--libopie/ofileselector/odefaultfactories.h3
-rw-r--r--libopie/ofileselector/ofiledialog.cpp0
-rw-r--r--libopie/ofileselector/ofiledialog.h3
-rw-r--r--libopie/ofileselector/ofileselector.cpp6
5 files changed, 17 insertions, 3 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
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
}
@@ -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) );
}