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 | |
parent | f6ca21ad98c7af99c0ae4c04afe3c2126317d6de (diff) | |
download | opie-ae467a89591b45a8a190174a0cae0b330de8d89e.zip opie-ae467a89591b45a8a190174a0cae0b330de8d89e.tar.gz opie-ae467a89591b45a8a190174a0cae0b330de8d89e.tar.bz2 |
excludeFromRefresh() added
-rw-r--r-- | libopie/libopie.pro | 28 | ||||
-rw-r--r-- | libopie/ofileselector/odefaultfactories.cpp | 8 | ||||
-rw-r--r-- | libopie/ofileselector/odefaultfactories.h | 3 | ||||
-rw-r--r-- | libopie/ofileselector/ofiledialog.cpp | 0 | ||||
-rw-r--r-- | libopie/ofileselector/ofiledialog.h | 3 | ||||
-rw-r--r-- | libopie/ofileselector/ofileselector.cpp | 6 | ||||
-rw-r--r-- | libopie/todayplugininterface.h | 6 |
7 files changed, 49 insertions, 5 deletions
diff --git a/libopie/libopie.pro b/libopie/libopie.pro index df9c40a..a216cca 100644 --- a/libopie/libopie.pro +++ b/libopie/libopie.pro @@ -1,67 +1,91 @@ TEMPLATE = lib CONFIG += qte warn_on release HEADERS = ofontmenu.h \ ocolorbutton.h \ - ofiledialog.h ofileselector.h tododb.h \ + ofileselector/odefaultfactories.h \ + ofileselector/ofiledialog.h \ + ofileselector/ofilelistview.h \ + ofileselector/ofileiconview.h \ + ofileselector/ofileselector.h \ + ofileselector/ofileselectoritem.h \ + ofileselector/ofileselectoriconitem.h \ + ofileselector/ofileselectormain.h \ + ofileselector/ofileview.h \ + ofileselector/olister.h \ + ofileselector/olocallister.h \ + ofileselector/opixmapprovider.h \ + tododb.h \ ocheckitem.h todoevent.h todoresource.h \ todovcalresource.h xmltree.h \ colordialog.h colorpopupmenu.h \ oclickablelabel.h oprocctrl.h \ oprocess.h odevice.h \ otimepicker.h otabwidget.h \ otabbar.h otabinfo.h \ ofontselector.h \ pim/opimrecord.h \ pim/otodo.h \ pim/orecordlist.h \ pim/opimaccesstemplate.h \ pim/opimaccessbackend.h \ pim/otodoaccess.h \ pim/otodacessbackend.h \ pim/ocontact.h \ pim/ocontactaccess.h \ pim/ocontactaccessbackend.h \ pim/ocontactaccessbackend_xml.h \ pim/obackendfactory.h \ pim/opimcache.h \ pim/otodoaccessvcal.h \ pim/orecur.h \ orecurrancewidget.h # pim/otodoaccesssql.h \ SOURCES = ofontmenu.cc \ ocolorbutton.cpp \ + ofileselector/odefaultfactories.cpp \ + ofileselector/ofiledialog.cpp \ + ofileselector/ofilefactory.cpp \ + ofileselector/ofilelistview.cpp \ + ofileselector/ofileiconview.cpp \ + ofileselector/ofileselector.cpp \ + ofileselector/ofileselectoritem.cpp \ + ofileselector/ofileselectoriconitem.cpp \ + ofileselector/ofileselectormain.cpp \ + ofileselector/ofileview.cpp \ + ofileselector/olister.cpp \ + ofileselector/olocallister.cpp \ + ofileselector/opixmapprovider.cpp \ xmltree.cc \ - ofiledialog.cc ofileselector.cc \ ocheckitem.cpp tododb.cpp todoevent.cpp \ todovcalresource.cpp colordialog.cpp \ colorpopupmenu.cpp oclickablelabel.cpp \ oprocctrl.cpp oprocess.cpp \ odevice.cpp otimepicker.cpp \ otabwidget.cpp otabbar.cpp \ ofontselector.cpp \ pim/otodo.cpp \ pim/opimrecord.cpp \ pim/otodoaccess.cpp \ pim/otodoaccessbackend.cpp \ pim/otodoaccessxml.cpp \ pim/ocontact.cpp \ pim/ocontactaccess.cpp \ pim/otodoaccessvcal.cpp \ pim/orecur.cpp \ orecurrancewidget.cpp # pim/otodoaccesssql.cpp \ TARGET = opie INCLUDEPATH += $(OPIEDIR)/include DESTDIR = $(QTDIR)/lib$(PROJMAK) #VERSION = 1.0.0 # LIBS += -lopiesql INTERFACES = otimepickerbase.ui orecurrancebase.ui TRANSLATIONS = ../i18n/de/libopie.ts \ ../i18n/en/libopie.ts \ ../i18n/es/libopie.ts \ ../i18n/fr/libopie.ts \ 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 @@ -3,65 +3,66 @@ .=l. Copyright (c) 2002 zecke <zecke@handhelds.org> .>+-= _;:, .> :=|. This library is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This library is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; 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, const QString &fileName = QString::null, const MimeTypes& mime = MimeTypes(), QWidget *wid = 0, const QString &caption = QString::null ); static QString getSaveFileName(int selector, const QString& startDir = QString::null, const QString& fileName = QString::null, const MimeTypes& mimefilter = MimeTypes(), QWidget *wid = 0, const QString &caption = QString::null ); //let's OFileSelector catch up first //static QString getExistingDirectory(const QString& startDir = QString::null, // QWidget *parent = 0, // const QString& caption = 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 @@ -456,64 +456,66 @@ void OFileSelector::init() /* take care of the main view... */ initToolbar(); //if( m_shChooser ) // the Chooser for the view and Mimetypes initializeChooser(); /* initialize the file lister */ if( m_selector == Normal ){ QString mime; if (!m_autoMime) { if (!m_mimetypes.isEmpty() ) { QMap<QString, QStringList>::Iterator it; it = m_mimetypes.begin(); // cause we're in the init mime = it.data().join(";"); } } 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 } } void OFileSelector::initVars() { if( m_mimetypes.isEmpty() ) m_autoMime = true; else m_autoMime = false; m_shClose = false; m_shNew = false; m_shTool = true; m_shPerm = false; m_shLne = true; m_shChooser = true; m_shYesNo = true; m_case = false; @@ -945,67 +947,67 @@ void OFileSelector::setView( const QString& lis ) { m_fileView = 0l; initializeOldSelector(); }else { qWarning("lis %s", lis.latin1() ); QString list; delete m_lister; delete m_fileView; delete m_select; m_lister =0l; m_fileView = 0l; m_select = 0l; if ( lis.startsWith("All") ) { m_selector = ExtendedAll; list = lis.mid(4 ).stripWhiteSpace(); } else{ 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) ); } } } OFileFactory* OFileSelector::factory() { return m_fileFactory; } OFileView* OFileSelector::currentView() { return m_fileView; } OFileView* OFileSelector::currentView() const{ return m_fileView; } int OFileSelector::filter() { int filter; if ( m_selector == ExtendedAll ) diff --git a/libopie/todayplugininterface.h b/libopie/todayplugininterface.h index becb79c..b37a3ab 100644 --- a/libopie/todayplugininterface.h +++ b/libopie/todayplugininterface.h @@ -30,50 +30,56 @@ public: */ virtual QString pluginName() const = 0; /** * Version numbering */ virtual double versionNumber() const = 0; virtual QString pixmapNameWidget() const = 0; /** widget for the today view * It _needs_ a parent here. */ virtual QWidget* widget( QWidget * ) = 0; /** * Pixmap used in the config widget */ virtual QString pixmapNameConfig() const = 0; /** * Config plugin widget - optional * If the plugin has a config widget, it _needs_ a parent here. */ virtual TodayConfigWidget* configWidget( QWidget * ) = 0; /** * The application that should be assigned to the button (pixmap) */ virtual QString appName() const = 0; + + /** + * If the plugin should take part in the periodic refresh + */ + virtual bool excludeFromRefresh() const = 0; + /** * minimum height the plugin at least should have */ // virtual int minHeight() const = 0; /** * maximum height that should be used before starting scrolling */ // virtual int maxHeight() const = 0; }; struct TodayPluginInterface : public QUnknownInterface { virtual TodayPluginObject *guiPart() = 0; }; #endif |