summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm
authorzecke <zecke>2004-03-14 16:13:28 (UTC)
committer zecke <zecke>2004-03-14 16:13:28 (UTC)
commitf3d284849df36ef281dcb5aa2d00f613e3a354d8 (patch) (unidiff)
tree65406b10a839ffa1ba683f59e61ef7227a0093d1 /noncore/apps/advancedfm
parentf12af18557c8f376f0c6c30e80a85737ff6c592e (diff)
downloadopie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.zip
opie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.tar.gz
opie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.tar.bz2
Fix up depends on LIBOPIE1
Proper signature for signal and slots and namespaces
Diffstat (limited to 'noncore/apps/advancedfm') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp4
-rw-r--r--noncore/apps/advancedfm/output.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index a694b70..6d41ac3 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -684,52 +684,52 @@ void AdvancedFm::doBeam() {
684 } 684 }
685 Ir *file = new Ir(this, "IR"); 685 Ir *file = new Ir(this, "IR");
686 connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*))); 686 connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*)));
687 file->send( curFilePath, curFile ); 687 file->send( curFilePath, curFile );
688 } 688 }
689 } 689 }
690 } 690 }
691} 691}
692 692
693void AdvancedFm::fileBeamFinished( Ir *) { 693void AdvancedFm::fileBeamFinished( Ir *) {
694 QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); 694 QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") );
695} 695}
696 696
697void AdvancedFm::selectAll() { 697void AdvancedFm::selectAll() {
698 QListView *thisView = CurrentView(); 698 QListView *thisView = CurrentView();
699 thisView->selectAll(true); 699 thisView->selectAll(true);
700 thisView->setSelected( thisView->firstChild(),false); 700 thisView->setSelected( thisView->firstChild(),false);
701} 701}
702 702
703void AdvancedFm::startProcess(const QString & cmd) { 703void AdvancedFm::startProcess(const QString & cmd) {
704 QStringList command; 704 QStringList command;
705 OProcess *process; 705 OProcess *process;
706 process = new OProcess(); 706 process = new OProcess();
707 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), 707 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
708 this, SLOT( processEnded(OProcess*))); 708 this, SLOT( processEnded(Opie::Core::OProcess*)));
709 709
710 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), 710 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)),
711 this, SLOT( oprocessStderr(OProcess*,char*,int))); 711 this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
712 712
713 command << "/bin/sh"; 713 command << "/bin/sh";
714 command << "-c"; 714 command << "-c";
715 command << cmd.latin1(); 715 command << cmd.latin1();
716 *process << command; 716 *process << command;
717 if(!process->start(OProcess::NotifyOnExit, OProcess::All) ) 717 if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
718 qDebug("could not start process"); 718 qDebug("could not start process");
719} 719}
720 720
721void AdvancedFm::processEnded(OProcess *) { 721void AdvancedFm::processEnded(OProcess *) {
722 rePopulate(); 722 rePopulate();
723} 723}
724 724
725void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) { 725void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) {
726// qWarning("received stderrt %d bytes", buflen); 726// qWarning("received stderrt %d bytes", buflen);
727 727
728 QString lineStr = buffer; 728 QString lineStr = buffer;
729 QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") ); 729 QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") );
730} 730}
731 731
732bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { 732bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
733 if ( o->inherits( "QLineEdit" ) ) { 733 if ( o->inherits( "QLineEdit" ) ) {
734 if ( e->type() == QEvent::KeyPress ) { 734 if ( e->type() == QEvent::KeyPress ) {
735 QKeyEvent *ke = (QKeyEvent*)e; 735 QKeyEvent *ke = (QKeyEvent*)e;
diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp
index 16a0992..6906298 100644
--- a/noncore/apps/advancedfm/output.cpp
+++ b/noncore/apps/advancedfm/output.cpp
@@ -126,52 +126,52 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name,
126 setName( tr("Output")); 126 setName( tr("Output"));
127 resize( 196, 269 ); 127 resize( 196, 269 );
128 setCaption( name ); 128 setCaption( name );
129 129
130 OutputLayout = new QGridLayout( this ); 130 OutputLayout = new QGridLayout( this );
131 OutputLayout->setSpacing( 2); 131 OutputLayout->setSpacing( 2);
132 OutputLayout->setMargin( 2); 132 OutputLayout->setMargin( 2);
133 133
134 QPushButton *docButton; 134 QPushButton *docButton;
135 docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton"); 135 docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton");
136 docButton->setFixedSize( QSize( 20, 20 ) ); 136 docButton->setFixedSize( QSize( 20, 20 ) );
137 connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() )); 137 connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() ));
138 // docButton->setFlat(TRUE); 138 // docButton->setFlat(TRUE);
139 OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 ); 139 OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 );
140 140
141 OutputEdit = new QMultiLineEdit( this, "OutputEdit" ); 141 OutputEdit = new QMultiLineEdit( this, "OutputEdit" );
142 OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 ); 142 OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 );
143 143
144 proc = new OProcess(); 144 proc = new OProcess();
145 145
146 connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)), 146 connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)),
147 this, SLOT( processFinished())); 147 this, SLOT( processFinished()));
148 148
149 connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), 149 connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)),
150 this, SLOT(commandStdout(OProcess*,char*,int))); 150 this, SLOT(commandStdout(Opie::Core::OProcess*,char*,int)));
151 151
152 connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), 152 connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)),
153 this, SLOT(commandStderr(OProcess*,char*,int))); 153 this, SLOT(commandStderr(Opie::Core::OProcess*,char*,int)));
154 154
155// connect( , SIGNAL(received(const QByteArray&)), 155// connect( , SIGNAL(received(const QByteArray&)),
156// this, SLOT(commandStdin(const QByteArray&))); 156// this, SLOT(commandStdin(const QByteArray&)));
157 157
158// * proc << commands.latin1(); 158// * proc << commands.latin1();
159 for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { 159 for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) {
160 qDebug( "%s", (*it).latin1() ); 160 qDebug( "%s", (*it).latin1() );
161 * proc << (*it).latin1(); 161 * proc << (*it).latin1();
162 } 162 }
163 163
164 if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) { 164 if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) {
165 165
166 OutputEdit->append(tr("Process could not start") ); 166 OutputEdit->append(tr("Process could not start") );
167 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); 167 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
168 perror("Error: "); 168 perror("Error: ");
169 QString errorMsg=tr("Error\n")+(QString)strerror(errno); 169 QString errorMsg=tr("Error\n")+(QString)strerror(errno);
170 OutputEdit->append( errorMsg); 170 OutputEdit->append( errorMsg);
171 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); 171 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
172 } 172 }
173} 173}
174 174
175Output::~Output() { 175Output::~Output() {
176} 176}
177 177