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 @@ -28,6 +28,7 @@ #include <qpe/config.h> #include <qpe/mimetype.h> #include <qpe/applnk.h> +#include <qpe/ir.h> //#include <opie/ofileselector.h> #include <qmultilineedit.h> @@ -691,6 +692,8 @@ void AdvancedFm::showLocalMenu(QListViewItem * item) m.setItemChecked(m.idAt(0),TRUE); else m.setItemChecked(m.idAt(0),FALSE); + if(Ir::supported()) + m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); m.exec( QCursor::pos() ); } } @@ -728,6 +731,8 @@ void AdvancedFm::showRemoteMenu(QListViewItem * item) m.setItemChecked(m.idAt(0),TRUE); else m.setItemChecked(m.idAt(0),FALSE); + if(Ir::supported()) + m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); m.exec( QCursor::pos() ); } } @@ -937,7 +942,7 @@ void AdvancedFm::localRename() void AdvancedFm::remoteRename() { - QString curFile = Remote_View->currentItem()->text(0); + QString curFile = Local_View->currentItem()->text(0); InputDialog *fileDlg; fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); fileDlg->setInputText((const QString &)curFile); @@ -1657,6 +1662,43 @@ 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 ); // QListViewItemIterator it( Local_View ); // for ( ; it.current(); ++it ) { 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 @@ -19,6 +19,7 @@ #include <qstring.h> #include <qpoint.h> #include <qstringlist.h> +#include <qpe/ir.h> class QVBoxLayout; class QHBoxLayout; @@ -123,6 +124,8 @@ protected slots: void move(); void fileStatus(); void doAbout(); + void doBeam(); + void fileBeamFinished( Ir *ir); }; #endif // ADVANCEDFM_H |