-rw-r--r-- | libopie/ofileselector.cc | 23 | ||||
-rw-r--r-- | libopie/ofileselector.h | 4 |
2 files changed, 25 insertions, 2 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index 14f035e..fbe69ed 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc | |||
@@ -686,128 +686,131 @@ void OFileSelector::updateMimes() // lets check which mode is active | |||
686 | }else{ | 686 | }else{ |
687 | // should be allreday updatet | 687 | // should be allreday updatet |
688 | ; | 688 | ; |
689 | } | 689 | } |
690 | }; | 690 | }; |
691 | void OFileSelector::initializeListView() | 691 | void OFileSelector::initializeListView() |
692 | { | 692 | { |
693 | // just to make sure but clean it up better FIXME | 693 | // just to make sure but clean it up better FIXME |
694 | delete m_View; | 694 | delete m_View; |
695 | m_View = 0; | 695 | m_View = 0; |
696 | delete m_boxToolbar; | 696 | delete m_boxToolbar; |
697 | delete m_homeButton; | 697 | delete m_homeButton; |
698 | delete m_docButton; | 698 | delete m_docButton; |
699 | delete m_location; | 699 | delete m_location; |
700 | delete m_up; | 700 | delete m_up; |
701 | delete m_pseudo; | 701 | delete m_pseudo; |
702 | delete m_pseudoLayout; | 702 | delete m_pseudoLayout; |
703 | m_boxToolbar = 0; | 703 | m_boxToolbar = 0; |
704 | m_homeButton = 0; | 704 | m_homeButton = 0; |
705 | m_docButton = 0; | 705 | m_docButton = 0; |
706 | m_location = 0; | 706 | m_location = 0; |
707 | m_up = 0; | 707 | m_up = 0; |
708 | m_pseudo = 0; | 708 | m_pseudo = 0; |
709 | m_pseudoLayout = 0; | 709 | m_pseudoLayout = 0; |
710 | // time for the toolbar | 710 | // time for the toolbar |
711 | m_pseudo = new QWidget(m_stack, "Pseudo Widget"); | 711 | m_pseudo = new QWidget(m_stack, "Pseudo Widget"); |
712 | m_pseudoLayout = new QVBoxLayout(m_pseudo ); | 712 | m_pseudoLayout = new QVBoxLayout(m_pseudo ); |
713 | if(m_shTool ){ | 713 | if(m_shTool ){ |
714 | m_boxToolbar = new QHBoxLayout( ); | 714 | m_boxToolbar = new QHBoxLayout( ); |
715 | m_boxToolbar->setAutoAdd( true ); | 715 | m_boxToolbar->setAutoAdd( true ); |
716 | m_location = new QComboBox(m_pseudo ); | 716 | m_location = new QComboBox(m_pseudo ); |
717 | 717 | ||
718 | m_up = new QPushButton(Resource::loadIconSet("up"),"", m_pseudo,"cdUpButton"); | 718 | m_up = new QPushButton(Resource::loadIconSet("up"),"", m_pseudo,"cdUpButton"); |
719 | m_up->setMinimumSize( QSize( 20, 20 ) ); | 719 | m_up->setMinimumSize( QSize( 20, 20 ) ); |
720 | m_up->setMaximumSize( QSize( 20, 20 ) ); | 720 | m_up->setMaximumSize( QSize( 20, 20 ) ); |
721 | connect(m_up ,SIGNAL(clicked()),this,SLOT(cdUP() ) ); | 721 | connect(m_up ,SIGNAL(clicked()),this,SLOT(cdUP() ) ); |
722 | m_up->setFlat(TRUE); | 722 | m_up->setFlat(TRUE); |
723 | 723 | ||
724 | m_homeButton = new QPushButton(Resource::loadIconSet("home") , "", m_pseudo); | 724 | m_homeButton = new QPushButton(Resource::loadIconSet("home") , "", m_pseudo); |
725 | m_homeButton->setMinimumSize( QSize( 20, 20 ) ); | 725 | m_homeButton->setMinimumSize( QSize( 20, 20 ) ); |
726 | m_homeButton->setMaximumSize( QSize( 20, 20 ) ); | 726 | m_homeButton->setMaximumSize( QSize( 20, 20 ) ); |
727 | connect(m_homeButton,SIGNAL(clicked()),this,SLOT(slotHome() ) ); | 727 | connect(m_homeButton,SIGNAL(clicked()),this,SLOT(slotHome() ) ); |
728 | m_homeButton->setFlat(TRUE); | 728 | m_homeButton->setFlat(TRUE); |
729 | 729 | ||
730 | m_docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"", m_pseudo,"docsButton"); | 730 | m_docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"", m_pseudo,"docsButton"); |
731 | m_docButton->setMinimumSize( QSize( 20, 20 ) ); | 731 | m_docButton->setMinimumSize( QSize( 20, 20 ) ); |
732 | m_docButton->setMaximumSize( QSize( 20, 20 ) ); | 732 | m_docButton->setMaximumSize( QSize( 20, 20 ) ); |
733 | connect(m_homeButton,SIGNAL(clicked()),this,SLOT(slotDoc() ) ); | 733 | connect(m_homeButton,SIGNAL(clicked()),this,SLOT(slotDoc() ) ); |
734 | m_docButton->setFlat(TRUE); | 734 | m_docButton->setFlat(TRUE); |
735 | 735 | ||
736 | m_boxToolbar->addWidget(m_location ); | 736 | m_boxToolbar->addWidget(m_location ); |
737 | m_boxToolbar->addWidget(m_up ); | 737 | m_boxToolbar->addWidget(m_up ); |
738 | m_boxToolbar->addWidget(m_homeButton ); | 738 | m_boxToolbar->addWidget(m_homeButton ); |
739 | m_boxToolbar->addWidget(m_docButton ); | 739 | m_boxToolbar->addWidget(m_docButton ); |
740 | m_pseudoLayout->addLayout(m_boxToolbar ); | 740 | m_pseudoLayout->addLayout(m_boxToolbar ); |
741 | // lets fill the combobox | 741 | // lets fill the combobox |
742 | StorageInfo storage; | 742 | StorageInfo storage; |
743 | const QList<FileSystem> &fs = storage.fileSystems(); | 743 | const QList<FileSystem> &fs = storage.fileSystems(); |
744 | QListIterator<FileSystem> it ( fs ); | 744 | QListIterator<FileSystem> it ( fs ); |
745 | for( ; it.current(); ++it ){ | 745 | for( ; it.current(); ++it ){ |
746 | const QString disk = (*it)->name(); | 746 | const QString disk = (*it)->name(); |
747 | const QString path = (*it)->path(); | 747 | const QString path = (*it)->path(); |
748 | m_location->insertItem(path+ "<-"+disk ); | 748 | m_location->insertItem(path+ "<-"+disk ); |
749 | } | 749 | } |
750 | int count = m_location->count(); | ||
751 | m_location->insertItem(m_currentDir ); | ||
752 | m_location->setCurrentItem( count ); | ||
750 | }; | 753 | }; |
751 | m_View = new QListView(m_pseudo, "Extended view" ); | 754 | m_View = new QListView(m_pseudo, "Extended view" ); |
752 | m_stack->addWidget( m_pseudo, EXTENDED ); | 755 | m_stack->addWidget( m_pseudo, EXTENDED ); |
753 | m_stack->raiseWidget( EXTENDED ); | 756 | m_stack->raiseWidget( EXTENDED ); |
754 | m_pseudoLayout->addWidget(m_View ); | 757 | m_pseudoLayout->addWidget(m_View ); |
755 | QPEApplication::setStylusOperation( m_View->viewport(),QPEApplication::RightOnHold); | 758 | QPEApplication::setStylusOperation( m_View->viewport(),QPEApplication::RightOnHold); |
756 | // set up the stuff | 759 | // set up the stuff |
757 | // Pixmap Name Date Size mime | 760 | // Pixmap Name Date Size mime |
758 | //(m_View->header() )->hide(); | 761 | //(m_View->header() )->hide(); |
759 | //m_View->setRootIsDecorated(false); | 762 | //m_View->setRootIsDecorated(false); |
760 | m_View->addColumn(" "); | 763 | m_View->addColumn(" "); |
761 | m_View->addColumn(tr("Name") ); | 764 | m_View->addColumn(tr("Name") ); |
762 | m_View->addColumn(tr("Size") ); | 765 | m_View->addColumn(tr("Size") ); |
763 | m_View->addColumn(tr("Date"), 60 ); | 766 | m_View->addColumn(tr("Date"), 60 ); |
764 | m_View->addColumn(tr("Mime Type") ); | 767 | m_View->addColumn(tr("Mime Type") ); |
765 | QHeader *header = m_View->header(); | 768 | QHeader *header = m_View->header(); |
766 | header->hide(); | 769 | header->hide(); |
767 | m_View->setSorting(1 ); | 770 | m_View->setSorting(1 ); |
768 | // connect now | 771 | // connect now |
769 | connect(m_View, SIGNAL(selectionChanged() ), this, SLOT(slotSelectionChanged() ) ); | 772 | connect(m_View, SIGNAL(selectionChanged() ), this, SLOT(slotSelectionChanged() ) ); |
770 | connect(m_View, SIGNAL(currentChanged(QListViewItem *) ), this, SLOT(slotCurrentChanged(QListViewItem * ) ) ); | 773 | connect(m_View, SIGNAL(currentChanged(QListViewItem *) ), this, SLOT(slotCurrentChanged(QListViewItem * ) ) ); |
771 | connect(m_View, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint &, int) ), | 774 | connect(m_View, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint &, int) ), |
772 | this, SLOT(slotClicked( int, QListViewItem *, const QPoint &, int) ) ); | 775 | this, SLOT(slotClicked( int, QListViewItem *, const QPoint &, int) ) ); |
773 | connect(m_View, SIGNAL(mouseButtonPressed(int, QListViewItem *, const QPoint &, int )), | 776 | connect(m_View, SIGNAL(mouseButtonPressed(int, QListViewItem *, const QPoint &, int )), |
774 | this, SLOT(slotRightButton(int, QListViewItem *, const QPoint &, int ) ) ); | 777 | this, SLOT(slotRightButton(int, QListViewItem *, const QPoint &, int ) ) ); |
775 | 778 | ||
776 | 779 | ||
777 | }; | 780 | }; |
778 | /* If a item is locked depends on the mode | 781 | /* If a item is locked depends on the mode |
779 | if we're in OPEN !isReadable is locked | 782 | if we're in OPEN !isReadable is locked |
780 | if we're in SAVE !isWriteable is locked | 783 | if we're in SAVE !isWriteable is locked |
781 | 784 | ||
782 | 785 | ||
783 | */ | 786 | */ |
784 | 787 | ||
785 | 788 | ||
786 | void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink ){ | 789 | void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink ){ |
787 | qWarning("Add Files" ); | 790 | qWarning("Add Files" ); |
788 | if( !m_files ){ | 791 | if( !m_files ){ |
789 | qWarning("not mfiles" ); | 792 | qWarning("not mfiles" ); |
790 | return; | 793 | return; |
791 | } | 794 | } |
792 | 795 | ||
793 | MimeType type( info->filePath() ); | 796 | MimeType type( info->filePath() ); |
794 | QString name; | 797 | QString name; |
795 | QString dir; | 798 | QString dir; |
796 | bool locked= false; | 799 | bool locked= false; |
797 | if(mime == "All" ){ | 800 | if(mime == "All" ){ |
798 | ; | 801 | ; |
799 | }else if( type.id() != mime ) { | 802 | }else if( type.id() != mime ) { |
800 | return; | 803 | return; |
801 | } | 804 | } |
802 | QPixmap pix = type.pixmap(); | 805 | QPixmap pix = type.pixmap(); |
803 | if(pix.isNull() ) | 806 | if(pix.isNull() ) |
804 | pix = Resource::loadPixmap( "UnknownDocument-14" ); | 807 | pix = Resource::loadPixmap( "UnknownDocument-14" ); |
805 | dir = info->dirPath( true ); | 808 | dir = info->dirPath( true ); |
806 | if( symlink ) { // check if the readLink is readable | 809 | if( symlink ) { // check if the readLink is readable |
807 | // do it right later | 810 | // do it right later |
808 | name = info->fileName() + " -> " + info->dirPath() + "/" + info->readLink(); | 811 | name = info->fileName() + " -> " + info->dirPath() + "/" + info->readLink(); |
809 | }else{ // keep track of the icons | 812 | }else{ // keep track of the icons |
810 | name = info->fileName(); | 813 | name = info->fileName(); |
811 | if( m_mode == OPEN ){ | 814 | if( m_mode == OPEN ){ |
812 | if( !info->isReadable() ){ | 815 | if( !info->isReadable() ){ |
813 | locked = true; | 816 | locked = true; |
@@ -941,119 +944,137 @@ void OFileSelector::slotRightButton(int button, QListViewItem *item, const QPoin | |||
941 | 944 | ||
942 | if( button != Qt::RightButton ) | 945 | if( button != Qt::RightButton ) |
943 | return; | 946 | return; |
944 | qWarning("right button" ); | 947 | qWarning("right button" ); |
945 | slotContextMenu(item); | 948 | slotContextMenu(item); |
946 | } | 949 | } |
947 | void OFileSelector::slotContextMenu(QListViewItem *item) | 950 | void OFileSelector::slotContextMenu(QListViewItem *item) |
948 | { | 951 | { |
949 | qWarning("context menu" ); | 952 | qWarning("context menu" ); |
950 | if( item ==0 || !m_showPopup ) | 953 | if( item ==0 || !m_showPopup ) |
951 | return; | 954 | return; |
952 | 955 | ||
953 | if( m_custom !=0){ | 956 | if( m_custom !=0){ |
954 | m_custom->exec(); | 957 | m_custom->exec(); |
955 | }else{ | 958 | }else{ |
956 | QPopupMenu menu; | 959 | QPopupMenu menu; |
957 | QAction up; | 960 | QAction up; |
958 | up.setText("cd up"); | 961 | up.setText("cd up"); |
959 | up.addTo( &menu ); | 962 | up.addTo( &menu ); |
960 | connect(&up, SIGNAL(activated() ), | 963 | connect(&up, SIGNAL(activated() ), |
961 | this, SLOT(cdUP() ) ); | 964 | this, SLOT(cdUP() ) ); |
962 | 965 | ||
963 | QAction act; | 966 | QAction act; |
964 | OFileSelectorItem *sel = (OFileSelectorItem*)item; | 967 | OFileSelectorItem *sel = (OFileSelectorItem*)item; |
965 | if(sel->isDir() ){ | 968 | if(sel->isDir() ){ |
966 | act.setText( tr("Change Directory") ); | 969 | act.setText( tr("Change Directory") ); |
967 | act.addTo(&menu ); | 970 | act.addTo(&menu ); |
968 | connect(&act, SIGNAL(activated() ), | 971 | connect(&act, SIGNAL(activated() ), |
969 | this, SLOT(slotChangedDir() ) ); | 972 | this, SLOT(slotChangedDir() ) ); |
970 | }else{ | 973 | }else{ |
971 | act.setText( tr("Open file" ) ); | 974 | act.setText( tr("Open file" ) ); |
972 | act.addTo( &menu ); | 975 | act.addTo( &menu ); |
973 | connect(&act, SIGNAL(activated() ), | 976 | connect(&act, SIGNAL(activated() ), |
974 | this, SLOT(slotOpen() ) ); | 977 | this, SLOT(slotOpen() ) ); |
975 | } | 978 | } |
976 | QAction rescan; | 979 | QAction rescan; |
977 | rescan.setText( tr("Rescan") ); | 980 | rescan.setText( tr("Rescan") ); |
978 | rescan.addTo( &menu ); | 981 | rescan.addTo( &menu ); |
979 | connect(&rescan, SIGNAL(activated() ), | 982 | connect(&rescan, SIGNAL(activated() ), |
980 | this, SLOT(slotRescan() ) ); | 983 | this, SLOT(slotRescan() ) ); |
981 | 984 | ||
982 | QAction rename; | 985 | QAction rename; |
983 | rename.setText( tr("Rename") ); | 986 | rename.setText( tr("Rename") ); |
984 | rename.addTo( &menu ); | 987 | rename.addTo( &menu ); |
985 | connect(&rename, SIGNAL(activated() ), | 988 | connect(&rename, SIGNAL(activated() ), |
986 | this, SLOT(slotRename() ) ); | 989 | this, SLOT(slotRename() ) ); |
987 | 990 | ||
988 | menu.insertSeparator(); | 991 | menu.insertSeparator(); |
989 | QAction delItem; | 992 | QAction delItem; |
990 | delItem.setText( tr("Delete") ); | 993 | delItem.setText( tr("Delete") ); |
991 | delItem.addTo(&menu ); | 994 | delItem.addTo(&menu ); |
992 | connect(&delItem, SIGNAL(activated() ), | 995 | connect(&delItem, SIGNAL(activated() ), |
993 | this, SLOT(slotDelete() ) ); | 996 | this, SLOT(slotDelete() ) ); |
994 | 997 | ||
995 | menu.exec(QCursor::pos() ); | 998 | menu.exec(QCursor::pos() ); |
996 | } | 999 | } |
997 | } | 1000 | } |
998 | bool OFileSelector::cd(const QString &str ) | 1001 | bool OFileSelector::cd(const QString &str ) |
999 | { | 1002 | { |
1000 | qWarning(" dir %s", str.latin1() ); | 1003 | qWarning(" dir %s", str.latin1() ); |
1001 | QDir dir( str); | 1004 | QDir dir( str); |
1002 | if(dir.exists() ){ | 1005 | if(dir.exists() ){ |
1003 | m_currentDir = str; | 1006 | m_currentDir = str; |
1004 | reparse(); | 1007 | reparse(); |
1008 | if(m_shTool ){ | ||
1009 | int count = m_location->count(); | ||
1010 | m_location->insertItem(str ); | ||
1011 | m_location->setCurrentItem( count ); | ||
1012 | } | ||
1005 | return true; | 1013 | return true; |
1006 | } | 1014 | } |
1007 | return false; | 1015 | return false; |
1008 | } | 1016 | } |
1009 | 1017 | ||
1010 | void OFileSelector::slotChangedDir() | 1018 | void OFileSelector::slotChangedDir() |
1011 | { | 1019 | { |
1012 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); | 1020 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); |
1013 | if(sel->isDir() ){ | 1021 | if(sel->isDir() ){ |
1014 | QStringList str = QStringList::split("->", sel->text(1) ); | 1022 | QStringList str = QStringList::split("->", sel->text(1) ); |
1015 | cd( sel->directory() + "/" + str[0] ); | 1023 | cd( sel->directory() + "/" + str[0] ); |
1016 | } | 1024 | } |
1017 | } | 1025 | } |
1018 | void OFileSelector::slotOpen() | 1026 | void OFileSelector::slotOpen() |
1019 | { | 1027 | { |
1020 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); | 1028 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); |
1021 | if(!sel->isDir() ){ | 1029 | if(!sel->isDir() ){ |
1022 | QStringList str = QStringList::split("->", sel->text(1) ); | 1030 | QStringList str = QStringList::split("->", sel->text(1) ); |
1023 | slotFileSelected( str[0] ); | 1031 | slotFileSelected( str[0] ); |
1024 | } | 1032 | } |
1025 | } | 1033 | } |
1026 | void OFileSelector::slotRescan() | 1034 | void OFileSelector::slotRescan() |
1027 | { | 1035 | { |
1028 | reparse(); | 1036 | reparse(); |
1029 | } | 1037 | } |
1030 | void OFileSelector::slotRename() | 1038 | void OFileSelector::slotRename() |
1031 | { | 1039 | { |
1032 | // rename inline | 1040 | // rename inline |
1033 | } | 1041 | } |
1034 | void OFileSelector::slotDelete() | 1042 | void OFileSelector::slotDelete() |
1035 | { | 1043 | { |
1036 | qWarning("delete slot" ); | 1044 | qWarning("delete slot" ); |
1037 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); | 1045 | OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); |
1038 | QStringList list = QStringList::split("->", sel->text(1) ); | 1046 | QStringList list = QStringList::split("->", sel->text(1) ); |
1039 | if( sel->isDir() ){ | 1047 | if( sel->isDir() ){ |
1040 | QString str = QString::fromLatin1("rm -rf ") + list[0]; | 1048 | QString str = QString::fromLatin1("rm -rf ") + list[0]; |
1041 | ::system(str.utf8().data() ); | 1049 | ::system(str.utf8().data() ); |
1042 | }else{ | 1050 | }else{ |
1043 | QFile::remove( list[0] ); | 1051 | QFile::remove( list[0] ); |
1044 | } | 1052 | } |
1045 | m_View->takeItem( sel ); | 1053 | m_View->takeItem( sel ); |
1046 | delete sel; | 1054 | delete sel; |
1047 | } | 1055 | } |
1048 | 1056 | ||
1049 | void OFileSelector::cdUP() | 1057 | void OFileSelector::cdUP() |
1050 | { | 1058 | { |
1051 | QDir dir( m_currentDir ); | 1059 | QDir dir( m_currentDir ); |
1052 | dir.cdUp(); | 1060 | dir.cdUp(); |
1053 | if(dir.exists() ){ | 1061 | if(dir.exists() ){ |
1054 | m_currentDir = dir.absPath(); | 1062 | m_currentDir = dir.absPath(); |
1055 | reparse(); | 1063 | reparse(); |
1064 | int count = m_location->count(); | ||
1065 | m_location->insertItem(m_currentDir ); | ||
1066 | m_location->setCurrentItem( count ); | ||
1056 | } | 1067 | } |
1057 | } | 1068 | } |
1069 | void OFileSelector::slotHome() | ||
1070 | { | ||
1071 | cd(QDir::homeDirPath() ); | ||
1072 | } | ||
1073 | void OFileSelector::slotDoc() | ||
1074 | { | ||
1075 | cd(QDir::homeDirPath() + "/Documents" ); | ||
1076 | } | ||
1077 | void OFileSelector::slotNavigate() | ||
1078 | { | ||
1058 | 1079 | ||
1059 | 1080 | } | |
diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h index b91c0ea..bf3cb48 100644 --- a/libopie/ofileselector.h +++ b/libopie/ofileselector.h | |||
@@ -206,70 +206,72 @@ class OFileSelector : public QWidget { | |||
206 | QVBoxLayout *m_pseudoLayout; | 206 | QVBoxLayout *m_pseudoLayout; |
207 | 207 | ||
208 | QString m_currentDir; | 208 | QString m_currentDir; |
209 | QString m_name; | 209 | QString m_name; |
210 | QStringList m_mimetypes; | 210 | QStringList m_mimetypes; |
211 | 211 | ||
212 | FileSelector *m_select; | 212 | FileSelector *m_select; |
213 | QWidgetStack *m_stack; | 213 | QWidgetStack *m_stack; |
214 | QVBoxLayout *m_lay; | 214 | QVBoxLayout *m_lay; |
215 | QGridLayout *m_Oselector; | 215 | QGridLayout *m_Oselector; |
216 | 216 | ||
217 | QHBoxLayout *m_boxToolbar; | 217 | QHBoxLayout *m_boxToolbar; |
218 | QHBoxLayout *m_boxOk; | 218 | QHBoxLayout *m_boxOk; |
219 | QHBoxLayout *m_boxName; | 219 | QHBoxLayout *m_boxName; |
220 | QHBoxLayout *m_boxView; | 220 | QHBoxLayout *m_boxView; |
221 | 221 | ||
222 | QPopupMenu *m_custom; | 222 | QPopupMenu *m_custom; |
223 | 223 | ||
224 | QLineEdit *m_edit; | 224 | QLineEdit *m_edit; |
225 | QLabel *m_fnLabel; | 225 | QLabel *m_fnLabel; |
226 | bool m_shTool:1; | 226 | bool m_shTool:1; |
227 | bool m_shPerm:1; | 227 | bool m_shPerm:1; |
228 | bool m_shLne:1; | 228 | bool m_shLne:1; |
229 | bool m_shChooser:1; | 229 | bool m_shChooser:1; |
230 | bool m_shYesNo:1; | 230 | bool m_shYesNo:1; |
231 | bool m_boCheckPerm:1; | 231 | bool m_boCheckPerm:1; |
232 | bool m_autoMime:1; | 232 | bool m_autoMime:1; |
233 | bool m_case:1; | 233 | bool m_case:1; |
234 | bool m_dir:1; | 234 | bool m_dir:1; |
235 | bool m_files:1; | 235 | bool m_files:1; |
236 | bool m_showPopup:1; | 236 | bool m_showPopup:1; |
237 | 237 | ||
238 | // implementation todo | 238 | // implementation todo |
239 | virtual void addFile(const QString &mime, QFileInfo *info, bool symlink = FALSE ); | 239 | virtual void addFile(const QString &mime, QFileInfo *info, bool symlink = FALSE ); |
240 | virtual void addDir( const QString &mime, QFileInfo *info , bool symlink = FALSE ); | 240 | virtual void addDir( const QString &mime, QFileInfo *info , bool symlink = FALSE ); |
241 | virtual void addSymlink(const QString &, QFileInfo *, bool = FALSE ){}; | 241 | virtual void addSymlink(const QString &, QFileInfo *, bool = FALSE ){}; |
242 | void delItems(); | 242 | void delItems(); |
243 | void initializeName(); | 243 | void initializeName(); |
244 | void initializeYes(); | 244 | void initializeYes(); |
245 | void initializeChooser(); | 245 | void initializeChooser(); |
246 | void initializeListView(); | 246 | void initializeListView(); |
247 | void initPics(); | 247 | void initPics(); |
248 | bool compliesMime(const QString &path, const QString &mime); | 248 | bool compliesMime(const QString &path, const QString &mime); |
249 | 249 | ||
250 | class OFileSelectorPrivate; | 250 | class OFileSelectorPrivate; |
251 | OFileSelectorPrivate *d; | 251 | OFileSelectorPrivate *d; |
252 | static QMap<QString,QPixmap> *m_pixmaps; | 252 | static QMap<QString,QPixmap> *m_pixmaps; |
253 | 253 | ||
254 | private slots: | 254 | private slots: |
255 | void slotFileSelected(const QString & ); // not really meant to be a slot | 255 | void slotFileSelected(const QString & ); // not really meant to be a slot |
256 | void slotFileBridgeSelected( const DocLnk & ); | 256 | void slotFileBridgeSelected( const DocLnk & ); |
257 | virtual void slotSelectionChanged(); | 257 | virtual void slotSelectionChanged(); |
258 | virtual void slotCurrentChanged(QListViewItem* ); | 258 | virtual void slotCurrentChanged(QListViewItem* ); |
259 | virtual void slotClicked( int, QListViewItem *item, const QPoint &, int); | 259 | virtual void slotClicked( int, QListViewItem *item, const QPoint &, int); |
260 | virtual void slotRightButton(int, QListViewItem *, const QPoint &, int ); | 260 | virtual void slotRightButton(int, QListViewItem *, const QPoint &, int ); |
261 | virtual void slotContextMenu( QListViewItem *item); | 261 | virtual void slotContextMenu( QListViewItem *item); |
262 | // listview crap see above | 262 | // listview crap see above |
263 | // PopupMenu crap | 263 | // PopupMenu crap |
264 | virtual void slotChangedDir(); | 264 | virtual void slotChangedDir(); |
265 | virtual void slotOpen(); | 265 | virtual void slotOpen(); |
266 | virtual void slotRescan(); | 266 | virtual void slotRescan(); |
267 | virtual void slotRename(); | 267 | virtual void slotRename(); |
268 | virtual void slotDelete(); | 268 | virtual void slotDelete(); |
269 | virtual void cdUP(); | 269 | virtual void cdUP(); |
270 | 270 | virtual void slotHome(); | |
271 | virtual void slotDoc(); | ||
272 | virtual void slotNavigate( ); | ||
271 | }; | 273 | }; |
272 | 274 | ||
273 | 275 | ||
274 | #endif | 276 | #endif |
275 | 277 | ||