author | dwmw2 <dwmw2> | 2002-05-09 10:33:18 (UTC) |
---|---|---|
committer | dwmw2 <dwmw2> | 2002-05-09 10:33:18 (UTC) |
commit | 388e930a890f11c51dd862f6258c1fc60b396334 (patch) (side-by-side diff) | |
tree | 69f322f31c2b2c3338fdb461924349c106f72f59 | |
parent | 4216d2833503440d25ee40683cd563f379f125a6 (diff) | |
download | opie-388e930a890f11c51dd862f6258c1fc60b396334.zip opie-388e930a890f11c51dd862f6258c1fc60b396334.tar.gz opie-388e930a890f11c51dd862f6258c1fc60b396334.tar.bz2 |
Add missing #include <qpainter.h>
-rw-r--r-- | libopie/ofileselector.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index d780da9..8299b3d 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc @@ -1,139 +1,140 @@ #include <qcheckbox.h> #include <qcombobox.h> #include <qheader.h> #include <qlabel.h> #include <qabstractlayout.h> #include <qlayout.h> #include <qlineedit.h> #include <qlistview.h> #include <qmessagebox.h> +#include <qpainter.h> #include <qpushbutton.h> #include <qwidgetstack.h> #include <qpopupmenu.h> #include <qdir.h> #include <qfile.h> #include <qfileinfo.h> #include <qtimer.h> #include <qpe/qpeapplication.h> #include <qpe/applnk.h> #include <qpe/fileselector.h> #include <qpe/global.h> #include <qpe/mimetype.h> #include <qpe/resource.h> #include <qpe/storage.h> #include <unistd.h> #include <stdlib.h> #include <sys/stat.h> #include "ofileselector.h" QMap<QString,QPixmap> *OFileSelector::m_pixmaps = 0; namespace { int indexByString( const QComboBox *box, const QString &str ){ int index= 0; for(int i= 0; i < box->count(); i++ ){ if( str == box->text(i ) ){ index= i; break; } } return index; } class OFileSelectorItem : public QListViewItem { public: OFileSelectorItem(QListView *view, const QPixmap &pixmap, const QString &path, const QString &date, const QString &size, const QString &mDir, bool isLocked=false, bool isDir=false ): QListViewItem(view) { setPixmap(0, pixmap ); setText(1, path ); setText(2, size ); setText(3, date ); //setText(4, mDir ); m_dir = mDir; dir = isDir; mLocked = isLocked; } bool isLocked() const{ return mLocked; } QString directory()const{ return m_dir; } bool isDir()const{ return dir; } QString path()const{ return text(1 ); } QString key(int id, bool )const { QString ke; if( id == 0 || id == 1 ){ // name if( dir ){ ke.append("0" ); ke.append( text(1) ); }else{ ke.append("1" ); ke.append( text(1) ); } }else if( id == 2 ){ // size return text(2); }else if( id == 3 ){ // date return text(3); } return ke; }; private: bool mLocked:1; bool dir:1; QString m_dir; }; }; OFileSelector::OFileSelector( QWidget *wid, int mode, int selector, const QString &dirName, const QString &fileName, const QStringList &mimeTypes ) : QWidget( wid, "OFileSelector") { m_mimetypes = mimeTypes; initVars(); m_mode = mode; m_selector = selector; m_currentDir = dirName; init(); QTimer::singleShot(6*1000, this, SLOT( slotTest() ) ); } OFileSelector::OFileSelector(const QString &mimeFilter, QWidget *parent, const char *name, bool newVisible = TRUE, bool closeVisible = FALSE ) : QWidget( parent, name ) { m_mimetypes = QStringList::split(";", mimeFilter ); initVars(); m_currentDir = QPEApplication::documentDir(); m_mode = OPEN; m_selector = NORMAL; m_shClose = closeVisible; m_shNew = newVisible; m_shLne = false; m_shPerm = false; m_shYesNo = false; init(); } OFileSelector::~OFileSelector() { } void OFileSelector::setNewVisible( bool visible ) |