author | llornkcor <llornkcor> | 2002-05-22 14:31:30 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-05-22 14:31:30 (UTC) |
commit | 7535b4d2d300c32fd50218a652c32ab4bb5886ab (patch) (side-by-side diff) | |
tree | 8da153ffd648c186d6358a79ecebb68c4df4ede5 | |
parent | 2493cdf0bee9cc02423a2968af5844c70389aca5 (diff) | |
download | opie-7535b4d2d300c32fd50218a652c32ab4bb5886ab.zip opie-7535b4d2d300c32fd50218a652c32ab4bb5886ab.tar.gz opie-7535b4d2d300c32fd50218a652c32ab4bb5886ab.tar.bz2 |
ir
-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 @@ -30,2 +30,3 @@ #include <qpe/applnk.h> +#include <qpe/ir.h> @@ -693,2 +694,4 @@ void AdvancedFm::showLocalMenu(QListViewItem * item) m.setItemChecked(m.idAt(0),FALSE); + if(Ir::supported()) + m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); m.exec( QCursor::pos() ); @@ -730,2 +733,4 @@ void AdvancedFm::showRemoteMenu(QListViewItem * item) m.setItemChecked(m.idAt(0),FALSE); + if(Ir::supported()) + m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); m.exec( QCursor::pos() ); @@ -939,3 +944,3 @@ void AdvancedFm::remoteRename() { - QString curFile = Remote_View->currentItem()->text(0); + QString curFile = Local_View->currentItem()->text(0); InputDialog *fileDlg; @@ -1659,2 +1664,39 @@ QString AdvancedFm::getFileSystemType(const QString ¤tText) { +void AdvancedFm::doBeam() { + Ir ir; + if(!ir.supported()){ + } else { + + QStringList curFileList = getPath(); + + if (TabWidget->currentPageIndex() == 0) { + for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { + + QString curFile = currentDir.canonicalPath()+"/"+(*it); + if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); + Ir *file = new Ir(this, "IR"); + connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); + file->send( curFile, curFile ); + } + + } else { + for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { + + QString curFile = currentRemoteDir.canonicalPath()+"/"+(*it); + if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); + Ir *file = new Ir(this, "IR"); + connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); + file->send( curFile, curFile ); + + } + } + } +} + +void AdvancedFm::fileBeamFinished( Ir *ir) { + QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); + +} + + // QList<QListViewItem> * getSelectedItems( QListView * 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 @@ -21,2 +21,3 @@ #include <qstringlist.h> +#include <qpe/ir.h> @@ -125,2 +126,4 @@ protected slots: void doAbout(); + void doBeam(); + void fileBeamFinished( Ir *ir); }; |