summaryrefslogtreecommitdiff
authorzecke <zecke>2002-04-27 23:12:20 (UTC)
committer zecke <zecke>2002-04-27 23:12:20 (UTC)
commita64cc0ad0574ae1e15c4965d2557c3e06cc3fd65 (patch) (unidiff)
tree80a622e1e82e46a24dc5968b7b89180d4420476c
parentdb95cde435e507833f58111237f86cb9f9ac927a (diff)
downloadopie-a64cc0ad0574ae1e15c4965d2557c3e06cc3fd65.zip
opie-a64cc0ad0574ae1e15c4965d2557c3e06cc3fd65.tar.gz
opie-a64cc0ad0574ae1e15c4965d2557c3e06cc3fd65.tar.bz2
compile it for Max
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector.cc4
-rw-r--r--libopie/ofileview.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index 0e508af..9cf3f36 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -870,49 +870,49 @@ void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink )
870 dir = info->dirPath( true ); 870 dir = info->dirPath( true );
871 if( symlink ) { // check if the readLink is readable 871 if( symlink ) { // check if the readLink is readable
872 // do it right later 872 // do it right later
873 name = info->fileName() + " -> " + info->dirPath() + "/" + info->readLink(); 873 name = info->fileName() + " -> " + info->dirPath() + "/" + info->readLink();
874 }else{ // keep track of the icons 874 }else{ // keep track of the icons
875 name = info->fileName(); 875 name = info->fileName();
876 if( m_mode == OPEN ){ 876 if( m_mode == OPEN ){
877 if( !info->isReadable() ){ 877 if( !info->isReadable() ){
878 locked = true; 878 locked = true;
879 pix = Resource::loadPixmap("locked" ); 879 pix = Resource::loadPixmap("locked" );
880 } 880 }
881 }else if( m_mode == SAVE ){ 881 }else if( m_mode == SAVE ){
882 if( !info->isWritable() ){ 882 if( !info->isWritable() ){
883 locked = true; 883 locked = true;
884 pix = Resource::loadPixmap("locked" ); 884 pix = Resource::loadPixmap("locked" );
885 } 885 }
886 } 886 }
887 } 887 }
888 new OFileSelectorItem( m_View, pix, name, 888 new OFileSelectorItem( m_View, pix, name,
889 info->lastModified().toString(), 889 info->lastModified().toString(),
890 QString::number( info->size() ), 890 QString::number( info->size() ),
891 dir, locked ); 891 dir, locked );
892} 892}
893 893
894void OFileSelector::addDir(const QString &mime, QFileInfo *info, bool symlink ) 894void OFileSelector::addDir(const QString &/*mime*/, QFileInfo *info, bool symlink )
895{ 895{
896 if(!m_dir ) 896 if(!m_dir )
897 return; 897 return;
898 //if( showDirs ) 898 //if( showDirs )
899 { 899 {
900 bool locked=false; 900 bool locked=false;
901 QString name; 901 QString name;
902 QPixmap pix; 902 QPixmap pix;
903 if( ( m_mode == OPEN && !info->isReadable() ) || ( m_mode == SAVE && !info->isWritable() ) ){ 903 if( ( m_mode == OPEN && !info->isReadable() ) || ( m_mode == SAVE && !info->isWritable() ) ){
904 locked = true; 904 locked = true;
905 if( symlink ){ 905 if( symlink ){
906 pix = (*m_pixmaps)["symlinkedlocked"]; 906 pix = (*m_pixmaps)["symlinkedlocked"];
907 }else{ 907 }else{
908 pix = Resource::loadPixmap("lockedfolder" ); 908 pix = Resource::loadPixmap("lockedfolder" );
909 } 909 }
910 }else{ 910 }else{
911 if( symlink ){ 911 if( symlink ){
912 pix = (*m_pixmaps)["dirsymlink" ]; 912 pix = (*m_pixmaps)["dirsymlink" ];
913 }else{ 913 }else{
914 pix = Resource::loadPixmap("folder" ); 914 pix = Resource::loadPixmap("folder" );
915 } 915 }
916 } 916 }
917 if( symlink){ 917 if( symlink){
918 name = info->fileName()+ "->"+ info->dirPath(true) +"/" +info->readLink(); 918 name = info->fileName()+ "->"+ info->dirPath(true) +"/" +info->readLink();
@@ -956,49 +956,49 @@ void OFileSelector::slotSelectionChanged() // get the current items
956 qWarning("selection changed" ); 956 qWarning("selection changed" );
957} 957}
958 958
959void OFileSelector::slotCurrentChanged(QListViewItem *item ) 959void OFileSelector::slotCurrentChanged(QListViewItem *item )
960{ 960{
961// qWarning("current changed" ); 961// qWarning("current changed" );
962 if( item == 0 ) 962 if( item == 0 )
963 return; 963 return;
964 964
965 if( m_selector == EXTENDED || m_selector == EXTENDED_ALL ){ 965 if( m_selector == EXTENDED || m_selector == EXTENDED_ALL ){
966 OFileSelectorItem *sel = (OFileSelectorItem*)item; 966 OFileSelectorItem *sel = (OFileSelectorItem*)item;
967 if(!sel->isDir() ){ 967 if(!sel->isDir() ){
968// qWarning("is not dir" ); 968// qWarning("is not dir" );
969 if(m_shLne ){ 969 if(m_shLne ){
970 m_edit->setText(sel->text(1) ); 970 m_edit->setText(sel->text(1) );
971// qWarning("setTexy" ); 971// qWarning("setTexy" );
972 } 972 }
973 } 973 }
974 }else { 974 }else {
975 qWarning("mode not extended" ); 975 qWarning("mode not extended" );
976 } 976 }
977} 977}
978 978
979// either select or change dir 979// either select or change dir
980void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &point, int ) 980void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &/*point*/, int )
981{ 981{
982 if( item == 0 ) 982 if( item == 0 )
983 return; 983 return;
984 984
985 if( button != Qt::LeftButton ) 985 if( button != Qt::LeftButton )
986 return; 986 return;
987 987
988// qWarning("clicked" ); 988// qWarning("clicked" );
989 if(m_selector == EXTENDED || m_selector == EXTENDED_ALL ){ 989 if(m_selector == EXTENDED || m_selector == EXTENDED_ALL ){
990// qWarning("inside" ); 990// qWarning("inside" );
991 OFileSelectorItem *sel = (OFileSelectorItem*)item; 991 OFileSelectorItem *sel = (OFileSelectorItem*)item;
992 if(!sel->isLocked() ){ // not locked either changedir or open 992 if(!sel->isLocked() ){ // not locked either changedir or open
993 QStringList str = QStringList::split("->", sel->text(1) ); 993 QStringList str = QStringList::split("->", sel->text(1) );
994 if(sel->isDir() ){ 994 if(sel->isDir() ){
995 cd( sel->directory() + "/" + str[0] ); 995 cd( sel->directory() + "/" + str[0] );
996 } else { 996 } else {
997// qWarning("file" ); 997// qWarning("file" );
998 if(m_shLne ) 998 if(m_shLne )
999 m_edit->setText(str[0] ); 999 m_edit->setText(str[0] );
1000 emit fileSelected(str[0] ); 1000 emit fileSelected(str[0] );
1001 // emit DocLnk need to do it 1001 // emit DocLnk need to do it
1002 } 1002 }
1003 } else { 1003 } else {
1004 qWarning( "locked" ); 1004 qWarning( "locked" );
diff --git a/libopie/ofileview.h b/libopie/ofileview.h
index 48a71ca..ed256f1 100644
--- a/libopie/ofileview.h
+++ b/libopie/ofileview.h
@@ -21,59 +21,59 @@
21  -_. . .   )=.  = Library General Public License along with 21  -_. . .   )=.  = Library General Public License along with
22    --        :-=` this library; see the file COPYING.LIB. 22    --        :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation, 23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, 24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#ifndef ofileview_h 29#ifndef ofileview_h
30#define ofileview_h 30#define ofileview_h
31 31
32#include <qobject.h> 32#include <qobject.h>
33#include <qwidget.h> 33#include <qwidget.h>
34 34
35class QFileInfo; 35class QFileInfo;
36class QDir; 36class QDir;
37class DocLnk; 37class DocLnk;
38class OFileSelectorView : public QWidget { 38class OFileSelectorView : public QWidget {
39 Q_OBJECT 39 Q_OBJECT
40 public: 40 public:
41 OFileSelectorView(QWidget *widget, 41 OFileSelectorView(QWidget *widget,
42 const char *name ) 42 const char *name )
43 : QWidget(widget, name ) 43 : QWidget(widget, name )
44{ }; 44{ };
45 virtual ~OFileSelectorView(); 45 virtual ~OFileSelectorView() = 0;
46 46
47 virtual void addFile(const QString &mine, 47 virtual void addFile(const QString &mine,
48 QFileInfo *info, 48 QFileInfo *info,
49 bool isSymlink = FALSE ) = 0; 49 bool isSymlink = FALSE ) = 0;
50 50
51 virtual void addDir (const QString &mine, 51 virtual void addDir (const QString &mine,
52 QFileInfo *info, 52 QFileInfo *info,
53 bool isSymlink = FALSE ) = 0; 53 bool isSymlink = FALSE ) = 0;
54 54
55 virtual void addSymlink(const QString &mime, 55 virtual void addSymlink(const QString &mime,
56 QFileInfo *info, 56 QFileInfo *info,
57 bool isSymlink = FALSE ) = 0; 57 bool isSymlink = FALSE ) = 0;
58 58
59 virtual void cd(const QString &path ); 59 virtual void cd(const QString &path ) = 0;
60 signals: 60 signals:
61 void fileSelected(const QString &); 61 void fileSelected(const QString &);
62 void fileSelected(const DocLnk & ); 62 void fileSelected(const DocLnk & );
63 void contextMenu(); 63 void contextMenu();
64 void changedDir(const QString &); 64 void changedDir(const QString &);
65 void changedDir(const QDir & ); 65 void changedDir(const QDir & );
66}; 66};
67 67
68class OFileViewFactory { 68class OFileViewFactory {
69 // Q_OBJECT 69 // Q_OBJECT
70 public: 70 public:
71 OFileViewFactory() {} ; 71 OFileViewFactory() {} ;
72 virtual ~OFileViewFactory(); 72 virtual ~OFileViewFactory() = 0;
73 73
74 OFileSelectorView* newView(QWidget *parent, const char *name ); 74 OFileSelectorView* newView(QWidget *parent, const char *name );
75 QString name()const; 75 QString name()const;
76}; 76};
77 77
78 78
79#endif 79#endif