Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 44 |
1 files changed, 43 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 | |||
@@ -30,2 +30,3 @@ | |||
30 | #include <qpe/applnk.h> | 30 | #include <qpe/applnk.h> |
31 | #include <qpe/ir.h> | ||
31 | 32 | ||
@@ -693,2 +694,4 @@ void AdvancedFm::showLocalMenu(QListViewItem * item) | |||
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() ); |
@@ -730,2 +733,4 @@ void AdvancedFm::showRemoteMenu(QListViewItem * item) | |||
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() ); |
@@ -939,3 +944,3 @@ 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; |
@@ -1659,2 +1664,39 @@ QString AdvancedFm::getFileSystemType(const QString ¤tText) { | |||
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 ); |