summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-22 14:31:30 (UTC)
committer llornkcor <llornkcor>2002-05-22 14:31:30 (UTC)
commit7535b4d2d300c32fd50218a652c32ab4bb5886ab (patch) (unidiff)
tree8da153ffd648c186d6358a79ecebb68c4df4ede5
parent2493cdf0bee9cc02423a2968af5844c70389aca5 (diff)
downloadopie-7535b4d2d300c32fd50218a652c32ab4bb5886ab.zip
opie-7535b4d2d300c32fd50218a652c32ab4bb5886ab.tar.gz
opie-7535b4d2d300c32fd50218a652c32ab4bb5886ab.tar.bz2
ir
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
@@ -28,6 +28,7 @@
28#include <qpe/config.h> 28#include <qpe/config.h>
29#include <qpe/mimetype.h> 29#include <qpe/mimetype.h>
30#include <qpe/applnk.h> 30#include <qpe/applnk.h>
31#include <qpe/ir.h>
31 32
32//#include <opie/ofileselector.h> 33//#include <opie/ofileselector.h>
33#include <qmultilineedit.h> 34#include <qmultilineedit.h>
@@ -691,6 +692,8 @@ void AdvancedFm::showLocalMenu(QListViewItem * item)
691 m.setItemChecked(m.idAt(0),TRUE); 692 m.setItemChecked(m.idAt(0),TRUE);
692 else 693 else
693 m.setItemChecked(m.idAt(0),FALSE); 694 m.setItemChecked(m.idAt(0),FALSE);
695 if(Ir::supported())
696 m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() ));
694 m.exec( QCursor::pos() ); 697 m.exec( QCursor::pos() );
695 } 698 }
696} 699}
@@ -728,6 +731,8 @@ void AdvancedFm::showRemoteMenu(QListViewItem * item)
728 m.setItemChecked(m.idAt(0),TRUE); 731 m.setItemChecked(m.idAt(0),TRUE);
729 else 732 else
730 m.setItemChecked(m.idAt(0),FALSE); 733 m.setItemChecked(m.idAt(0),FALSE);
734 if(Ir::supported())
735 m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() ));
731 m.exec( QCursor::pos() ); 736 m.exec( QCursor::pos() );
732 } 737 }
733} 738}
@@ -937,7 +942,7 @@ void AdvancedFm::localRename()
937 942
938void AdvancedFm::remoteRename() 943void AdvancedFm::remoteRename()
939{ 944{
940 QString curFile = Remote_View->currentItem()->text(0); 945 QString curFile = Local_View->currentItem()->text(0);
941 InputDialog *fileDlg; 946 InputDialog *fileDlg;
942 fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); 947 fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
943 fileDlg->setInputText((const QString &)curFile); 948 fileDlg->setInputText((const QString &)curFile);
@@ -1657,6 +1662,43 @@ QString AdvancedFm::getFileSystemType(const QString &currentText) {
1657} 1662}
1658 1663
1659 1664
1665void AdvancedFm::doBeam() {
1666 Ir ir;
1667 if(!ir.supported()){
1668 } else {
1669
1670 QStringList curFileList = getPath();
1671
1672 if (TabWidget->currentPageIndex() == 0) {
1673 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
1674
1675 QString curFile = currentDir.canonicalPath()+"/"+(*it);
1676 if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1);
1677 Ir *file = new Ir(this, "IR");
1678 connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * )));
1679 file->send( curFile, curFile );
1680 }
1681
1682 } else {
1683 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
1684
1685 QString curFile = currentRemoteDir.canonicalPath()+"/"+(*it);
1686 if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1);
1687 Ir *file = new Ir(this, "IR");
1688 connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * )));
1689 file->send( curFile, curFile );
1690
1691 }
1692 }
1693 }
1694}
1695
1696void AdvancedFm::fileBeamFinished( Ir *ir) {
1697 QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") );
1698
1699}
1700
1701
1660// QList<QListViewItem> * getSelectedItems( QListView * Local_View ); 1702// QList<QListViewItem> * getSelectedItems( QListView * Local_View );
1661// QListViewItemIterator it( Local_View ); 1703// QListViewItemIterator it( Local_View );
1662// for ( ; it.current(); ++it ) { 1704// 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 @@
19#include <qstring.h> 19#include <qstring.h>
20#include <qpoint.h> 20#include <qpoint.h>
21#include <qstringlist.h> 21#include <qstringlist.h>
22#include <qpe/ir.h>
22 23
23class QVBoxLayout; 24class QVBoxLayout;
24class QHBoxLayout; 25class QHBoxLayout;
@@ -123,6 +124,8 @@ protected slots:
123 void move(); 124 void move();
124 void fileStatus(); 125 void fileStatus();
125 void doAbout(); 126 void doAbout();
127 void doBeam();
128 void fileBeamFinished( Ir *ir);
126}; 129};
127 130
128#endif // ADVANCEDFM_H 131#endif // ADVANCEDFM_H