-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 44 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 3 |
2 files changed, 46 insertions, 1 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 3a8c22d..f32031b 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -29,4 +29,5 @@ | |||
29 | #include <qpe/mimetype.h> | 29 | #include <qpe/mimetype.h> |
30 | #include <qpe/applnk.h> | 30 | #include <qpe/applnk.h> |
31 | #include <qpe/ir.h> | ||
31 | 32 | ||
32 | //#include <opie/ofileselector.h> | 33 | //#include <opie/ofileselector.h> |
@@ -692,4 +693,6 @@ void AdvancedFm::showLocalMenu(QListViewItem * item) | |||
692 | else | 693 | else |
693 | m.setItemChecked(m.idAt(0),FALSE); | 694 | m.setItemChecked(m.idAt(0),FALSE); |
695 | if(Ir::supported()) | ||
696 | m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); | ||
694 | m.exec( QCursor::pos() ); | 697 | m.exec( QCursor::pos() ); |
695 | } | 698 | } |
@@ -729,4 +732,6 @@ void AdvancedFm::showRemoteMenu(QListViewItem * item) | |||
729 | else | 732 | else |
730 | m.setItemChecked(m.idAt(0),FALSE); | 733 | m.setItemChecked(m.idAt(0),FALSE); |
734 | if(Ir::supported()) | ||
735 | m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); | ||
731 | m.exec( QCursor::pos() ); | 736 | m.exec( QCursor::pos() ); |
732 | } | 737 | } |
@@ -938,5 +943,5 @@ void AdvancedFm::localRename() | |||
938 | void AdvancedFm::remoteRename() | 943 | void AdvancedFm::remoteRename() |
939 | { | 944 | { |
940 | QString curFile = Remote_View->currentItem()->text(0); | 945 | QString curFile = Local_View->currentItem()->text(0); |
941 | InputDialog *fileDlg; | 946 | InputDialog *fileDlg; |
942 | fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); | 947 | fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); |
@@ -1658,4 +1663,41 @@ QString AdvancedFm::getFileSystemType(const QString ¤tText) { | |||
1658 | 1663 | ||
1659 | 1664 | ||
1665 | void AdvancedFm::doBeam() { | ||
1666 | Ir ir; | ||
1667 | if(!ir.supported()){ | ||
1668 | } else { | ||
1669 | |||
1670 | QStringList curFileList = getPath(); | ||
1671 | |||
1672 | if (TabWidget->currentPageIndex() == 0) { | ||
1673 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | ||
1674 | |||
1675 | QString curFile = currentDir.canonicalPath()+"/"+(*it); | ||
1676 | if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); | ||
1677 | Ir *file = new Ir(this, "IR"); | ||
1678 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); | ||
1679 | file->send( curFile, curFile ); | ||
1680 | } | ||
1681 | |||
1682 | } else { | ||
1683 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | ||
1684 | |||
1685 | QString curFile = currentRemoteDir.canonicalPath()+"/"+(*it); | ||
1686 | if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); | ||
1687 | Ir *file = new Ir(this, "IR"); | ||
1688 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); | ||
1689 | file->send( curFile, curFile ); | ||
1690 | |||
1691 | } | ||
1692 | } | ||
1693 | } | ||
1694 | } | ||
1695 | |||
1696 | void AdvancedFm::fileBeamFinished( Ir *ir) { | ||
1697 | QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); | ||
1698 | |||
1699 | } | ||
1700 | |||
1701 | |||
1660 | // QList<QListViewItem> * getSelectedItems( QListView * Local_View ); | 1702 | // QList<QListViewItem> * getSelectedItems( QListView * Local_View ); |
1661 | // QListViewItemIterator it( Local_View ); | 1703 | // QListViewItemIterator it( Local_View ); |
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 90619ba..5817fca 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -20,4 +20,5 @@ | |||
20 | #include <qpoint.h> | 20 | #include <qpoint.h> |
21 | #include <qstringlist.h> | 21 | #include <qstringlist.h> |
22 | #include <qpe/ir.h> | ||
22 | 23 | ||
23 | class QVBoxLayout; | 24 | class QVBoxLayout; |
@@ -124,4 +125,6 @@ protected slots: | |||
124 | void fileStatus(); | 125 | void fileStatus(); |
125 | void doAbout(); | 126 | void doAbout(); |
127 | void doBeam(); | ||
128 | void fileBeamFinished( Ir *ir); | ||
126 | }; | 129 | }; |
127 | 130 | ||