summaryrefslogtreecommitdiff
path: root/noncore/apps
authorllornkcor <llornkcor>2002-05-22 14:31:30 (UTC)
committer llornkcor <llornkcor>2002-05-22 14:31:30 (UTC)
commit7535b4d2d300c32fd50218a652c32ab4bb5886ab (patch) (side-by-side diff)
tree8da153ffd648c186d6358a79ecebb68c4df4ede5 /noncore/apps
parent2493cdf0bee9cc02423a2968af5844c70389aca5 (diff)
downloadopie-7535b4d2d300c32fd50218a652c32ab4bb5886ab.zip
opie-7535b4d2d300c32fd50218a652c32ab4bb5886ab.tar.gz
opie-7535b4d2d300c32fd50218a652c32ab4bb5886ab.tar.bz2
ir
Diffstat (limited to 'noncore/apps') (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
@@ -29,4 +29,5 @@
#include <qpe/mimetype.h>
#include <qpe/applnk.h>
+#include <qpe/ir.h>
//#include <opie/ofileselector.h>
@@ -692,4 +693,6 @@ void AdvancedFm::showLocalMenu(QListViewItem * item)
else
m.setItemChecked(m.idAt(0),FALSE);
+ if(Ir::supported())
+ m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() ));
m.exec( QCursor::pos() );
}
@@ -729,4 +732,6 @@ void AdvancedFm::showRemoteMenu(QListViewItem * item)
else
m.setItemChecked(m.idAt(0),FALSE);
+ if(Ir::supported())
+ m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() ));
m.exec( QCursor::pos() );
}
@@ -938,5 +943,5 @@ 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);
@@ -1658,4 +1663,41 @@ 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 );
// QListViewItemIterator it( 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
@@ -20,4 +20,5 @@
#include <qpoint.h>
#include <qstringlist.h>
+#include <qpe/ir.h>
class QVBoxLayout;
@@ -124,4 +125,6 @@ protected slots:
void fileStatus();
void doAbout();
+ void doBeam();
+ void fileBeamFinished( Ir *ir);
};