summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp44
-rw-r--r--noncore/apps/advancedfm/advancedfm.h3
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 &currentText) {
+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);
};