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 @@ -25,12 +25,13 @@ #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> #include <qpe/mimetype.h> #include <qpe/applnk.h> +#include <qpe/ir.h> //#include <opie/ofileselector.h> #include <qmultilineedit.h> #include <qtextstream.h> #include <qpushbutton.h> @@ -688,12 +689,14 @@ void AdvancedFm::showLocalMenu(QListViewItem * item) m.insertItem( tr( "Properties" ), this, SLOT( doProperties() )); m.setCheckable(TRUE); if (!b) 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() ); } } void AdvancedFm::showRemoteMenu(QListViewItem * item) { @@ -725,12 +728,14 @@ void AdvancedFm::showRemoteMenu(QListViewItem * item) m.insertItem( tr( "Properties" ), this, SLOT( doProperties() )); m.setCheckable(TRUE); if (!b) 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() ); } } void AdvancedFm::runThis() { // QFileInfo *fi; @@ -934,13 +939,13 @@ void AdvancedFm::localRename() } populateLocalView(); } 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); fileDlg->exec(); if( fileDlg->result() == 1 ) { QString oldname = currentRemoteDir.canonicalPath() + "/" + curFile; @@ -1654,12 +1659,49 @@ QString AdvancedFm::getFileSystemType(const QString ¤tText) { } } return baseFs; } +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 ) { // if ( it.current()->isSelected() ) { // QString strItem = it.current()->text(0); // QString localFile = currentDir.canonicalPath()+"/"+strItem; 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 @@ -16,12 +16,13 @@ #include <qdialog.h> #include <qmainwindow.h> #include <qdir.h> #include <qstring.h> #include <qpoint.h> #include <qstringlist.h> +#include <qpe/ir.h> class QVBoxLayout; class QHBoxLayout; class QGridLayout; class QComboBox; class QListView; @@ -120,9 +121,11 @@ protected slots: void currentPathComboActivated(const QString &); void fillCombo(const QString &); bool copyFile( const QString & , const QString & ); void move(); void fileStatus(); void doAbout(); + void doBeam(); + void fileBeamFinished( Ir *ir); }; #endif // ADVANCEDFM_H |