-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 28 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/advancedfm/output.cpp | 18 |
4 files changed, 30 insertions, 30 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index c44d387..2ba3dca 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -28,50 +28,50 @@ | |||
28 | 28 | ||
29 | #include <sys/stat.h> | 29 | #include <sys/stat.h> |
30 | #include <time.h> | 30 | #include <time.h> |
31 | #include <dirent.h> | 31 | #include <dirent.h> |
32 | #include <fcntl.h> | 32 | #include <fcntl.h> |
33 | #include <sys/vfs.h> | 33 | #include <sys/vfs.h> |
34 | #include <mntent.h> | 34 | #include <mntent.h> |
35 | 35 | ||
36 | #ifdef NOQUICKLAUNCH | 36 | #ifdef NOQUICKLAUNCH |
37 | AdvancedFm::AdvancedFm( ) | 37 | AdvancedFm::AdvancedFm( ) |
38 | #else | 38 | #else |
39 | AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) | 39 | AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) |
40 | #endif | 40 | #endif |
41 | : QMainWindow( ) { | 41 | : QMainWindow( ) { |
42 | init(); | 42 | init(); |
43 | renameBox = 0; | 43 | renameBox = 0; |
44 | 44 | ||
45 | unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | 45 | unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); |
46 | 46 | ||
47 | initConnections(); | 47 | initConnections(); |
48 | whichTab=1; | 48 | whichTab=1; |
49 | rePopulate(); | 49 | rePopulate(); |
50 | currentPathCombo->setFocus(); | 50 | currentPathCombo->setFocus(); |
51 | channel = new QCopChannel( "QPE/Application/advancedfm", this ); | 51 | channel = new QCopChannel( "QPE/Application/advancedfm", this ); |
52 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 52 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), |
53 | this, SLOT( qcopReceive(const QCString&, const QByteArray&)) ); | 53 | this, SLOT( qcopReceive(const QCString&,const QByteArray&)) ); |
54 | } | 54 | } |
55 | 55 | ||
56 | AdvancedFm::~AdvancedFm() { | 56 | AdvancedFm::~AdvancedFm() { |
57 | } | 57 | } |
58 | 58 | ||
59 | 59 | ||
60 | void AdvancedFm::cleanUp() { | 60 | void AdvancedFm::cleanUp() { |
61 | QString sfile=QDir::homeDirPath(); | 61 | QString sfile=QDir::homeDirPath(); |
62 | if(sfile.right(1) != "/") | 62 | if(sfile.right(1) != "/") |
63 | sfile+="/._temp"; | 63 | sfile+="/._temp"; |
64 | else | 64 | else |
65 | sfile+="._temp"; | 65 | sfile+="._temp"; |
66 | QFile file( sfile); | 66 | QFile file( sfile); |
67 | if(file.exists()) | 67 | if(file.exists()) |
68 | file.remove(); | 68 | file.remove(); |
69 | } | 69 | } |
70 | 70 | ||
71 | void AdvancedFm::tabChanged(QWidget *) { | 71 | void AdvancedFm::tabChanged(QWidget *) { |
72 | // qWarning("tab changed"); | 72 | // qWarning("tab changed"); |
73 | QString path = CurrentDir()->canonicalPath(); | 73 | QString path = CurrentDir()->canonicalPath(); |
74 | currentPathCombo->lineEdit()->setText( path ); | 74 | currentPathCombo->lineEdit()->setText( path ); |
75 | 75 | ||
76 | if(whichTab == 1) { | 76 | if(whichTab == 1) { |
77 | viewMenu->setItemChecked(viewMenu->idAt(0), true); | 77 | viewMenu->setItemChecked(viewMenu->idAt(0), true); |
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 763ae34..f791c77 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -232,55 +232,55 @@ void AdvancedFm::init() { | |||
232 | filterStr="*"; | 232 | filterStr="*"; |
233 | b=FALSE; | 233 | b=FALSE; |
234 | showMenuHidden(); | 234 | showMenuHidden(); |
235 | TabWidget->setCurrentWidget(0); | 235 | TabWidget->setCurrentWidget(0); |
236 | 236 | ||
237 | } | 237 | } |
238 | 238 | ||
239 | void AdvancedFm::initConnections() | 239 | void AdvancedFm::initConnections() |
240 | { | 240 | { |
241 | 241 | ||
242 | connect( qApp,SIGNAL( aboutToQuit()), | 242 | connect( qApp,SIGNAL( aboutToQuit()), |
243 | this, SLOT( cleanUp()) ); | 243 | this, SLOT( cleanUp()) ); |
244 | connect( qpeDirButton ,SIGNAL(released()), | 244 | connect( qpeDirButton ,SIGNAL(released()), |
245 | this,SLOT( QPEButtonPushed()) ); | 245 | this,SLOT( QPEButtonPushed()) ); |
246 | connect( cfButton ,SIGNAL(released()), | 246 | connect( cfButton ,SIGNAL(released()), |
247 | this,SLOT( CFButtonPushed()) ); | 247 | this,SLOT( CFButtonPushed()) ); |
248 | connect( sdButton ,SIGNAL(released()), | 248 | connect( sdButton ,SIGNAL(released()), |
249 | this,SLOT( SDButtonPushed()) ); | 249 | this,SLOT( SDButtonPushed()) ); |
250 | connect( cdUpButton ,SIGNAL(released()), | 250 | connect( cdUpButton ,SIGNAL(released()), |
251 | this,SLOT( upDir()) ); | 251 | this,SLOT( upDir()) ); |
252 | connect( docButton,SIGNAL(released()), | 252 | connect( docButton,SIGNAL(released()), |
253 | this,SLOT( docButtonPushed()) ); | 253 | this,SLOT( docButtonPushed()) ); |
254 | connect( homeButton,SIGNAL(released()), | 254 | connect( homeButton,SIGNAL(released()), |
255 | this,SLOT( homeButtonPushed()) ); | 255 | this,SLOT( homeButtonPushed()) ); |
256 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), | 256 | connect( currentPathCombo, SIGNAL( activated(const QString&) ), |
257 | this, SLOT( currentPathComboActivated( const QString & ) ) ); | 257 | this, SLOT( currentPathComboActivated(const QString&) ) ); |
258 | 258 | ||
259 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), | 259 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), |
260 | this,SLOT(currentPathComboChanged())); | 260 | this,SLOT(currentPathComboChanged())); |
261 | 261 | ||
262 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), | 262 | connect( Local_View, SIGNAL( clicked(QListViewItem*)), |
263 | this,SLOT( ListClicked(QListViewItem *)) ); | 263 | this,SLOT( ListClicked(QListViewItem*)) ); |
264 | 264 | ||
265 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 265 | connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), |
266 | this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); | 266 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); |
267 | 267 | ||
268 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); | 268 | connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); |
269 | 269 | ||
270 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), | 270 | connect( Remote_View, SIGNAL( clicked(QListViewItem*)), |
271 | this,SLOT( ListClicked(QListViewItem *)) ); | 271 | this,SLOT( ListClicked(QListViewItem*)) ); |
272 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 272 | connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), |
273 | this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); | 273 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); |
274 | 274 | ||
275 | connect( TabWidget,SIGNAL(currentChanged(QWidget *)), | 275 | connect( TabWidget,SIGNAL(currentChanged(QWidget*)), |
276 | this,SLOT(tabChanged(QWidget*))); | 276 | this,SLOT(tabChanged(QWidget*))); |
277 | 277 | ||
278 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) ); | 278 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) ); |
279 | 279 | ||
280 | connect( menuButton, SIGNAL( selected(const QString &)), SLOT(gotoCustomDir(const QString&))); | 280 | connect( menuButton, SIGNAL( selected(const QString&)), SLOT(gotoCustomDir(const QString&))); |
281 | // connect( menuButton, SIGNAL( selected( int)), SLOT( dirMenuSelected(int))); | 281 | // connect( menuButton, SIGNAL( selected(int)), SLOT( dirMenuSelected(int))); |
282 | connect( viewMenu, SIGNAL( activated(int )), this, SLOT(slotSwitchMenu(int ))); | 282 | connect( viewMenu, SIGNAL( activated(int)), this, SLOT(slotSwitchMenu(int))); |
283 | // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); | 283 | // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); |
284 | 284 | ||
285 | } | 285 | } |
286 | 286 | ||
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 9ad1146..9e740d0 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp | |||
@@ -660,74 +660,74 @@ void AdvancedFm::mkSym() { | |||
660 | } | 660 | } |
661 | 661 | ||
662 | cmd = "ln -s "+curFile+" "+destName; | 662 | cmd = "ln -s "+curFile+" "+destName; |
663 | // qDebug(cmd); | 663 | // qDebug(cmd); |
664 | startProcess( (const QString)cmd ); | 664 | startProcess( (const QString)cmd ); |
665 | } | 665 | } |
666 | rePopulate(); | 666 | rePopulate(); |
667 | setOtherTabCurrent(); | 667 | setOtherTabCurrent(); |
668 | } | 668 | } |
669 | } | 669 | } |
670 | 670 | ||
671 | void AdvancedFm::doBeam() { | 671 | void AdvancedFm::doBeam() { |
672 | Ir ir; | 672 | Ir ir; |
673 | if(!ir.supported()) { | 673 | if(!ir.supported()) { |
674 | } else { | 674 | } else { |
675 | QStringList curFileList = getPath(); | 675 | QStringList curFileList = getPath(); |
676 | if( curFileList.count() > 0) { | 676 | if( curFileList.count() > 0) { |
677 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 677 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
678 | QString curFile = (*it); | 678 | QString curFile = (*it); |
679 | QString curFilePath = CurrentDir()->canonicalPath()+"/"+curFile; | 679 | QString curFilePath = CurrentDir()->canonicalPath()+"/"+curFile; |
680 | if( curFilePath.right(1) == "/") { | 680 | if( curFilePath.right(1) == "/") { |
681 | curFilePath = curFilePath.left( curFilePath.length() -1); | 681 | curFilePath = curFilePath.left( curFilePath.length() -1); |
682 | } | 682 | } |
683 | Ir *file = new Ir(this, "IR"); | 683 | Ir *file = new Ir(this, "IR"); |
684 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); | 684 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*))); |
685 | file->send( curFilePath, curFile ); | 685 | file->send( curFilePath, curFile ); |
686 | } | 686 | } |
687 | } | 687 | } |
688 | } | 688 | } |
689 | } | 689 | } |
690 | 690 | ||
691 | void AdvancedFm::fileBeamFinished( Ir *) { | 691 | void AdvancedFm::fileBeamFinished( Ir *) { |
692 | QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); | 692 | QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); |
693 | } | 693 | } |
694 | 694 | ||
695 | void AdvancedFm::selectAll() { | 695 | void AdvancedFm::selectAll() { |
696 | QListView *thisView = CurrentView(); | 696 | QListView *thisView = CurrentView(); |
697 | thisView->selectAll(true); | 697 | thisView->selectAll(true); |
698 | thisView->setSelected( thisView->firstChild(),false); | 698 | thisView->setSelected( thisView->firstChild(),false); |
699 | } | 699 | } |
700 | 700 | ||
701 | void AdvancedFm::startProcess(const QString & cmd) { | 701 | void AdvancedFm::startProcess(const QString & cmd) { |
702 | QStringList command; | 702 | QStringList command; |
703 | OProcess *process; | 703 | OProcess *process; |
704 | process = new OProcess(); | 704 | process = new OProcess(); |
705 | connect(process, SIGNAL(processExited(OProcess *)), | 705 | connect(process, SIGNAL(processExited(OProcess*)), |
706 | this, SLOT( processEnded(OProcess *))); | 706 | this, SLOT( processEnded(OProcess*))); |
707 | 707 | ||
708 | connect(process, SIGNAL( receivedStderr(OProcess *, char *, int)), | 708 | connect(process, SIGNAL( receivedStderr(OProcess*,char*,int)), |
709 | this, SLOT( oprocessStderr(OProcess *, char *, int))); | 709 | this, SLOT( oprocessStderr(OProcess*,char*,int))); |
710 | 710 | ||
711 | command << "/bin/sh"; | 711 | command << "/bin/sh"; |
712 | command << "-c"; | 712 | command << "-c"; |
713 | command << cmd.latin1(); | 713 | command << cmd.latin1(); |
714 | *process << command; | 714 | *process << command; |
715 | if(!process->start(OProcess::NotifyOnExit, OProcess::All) ) | 715 | if(!process->start(OProcess::NotifyOnExit, OProcess::All) ) |
716 | qDebug("could not start process"); | 716 | qDebug("could not start process"); |
717 | } | 717 | } |
718 | 718 | ||
719 | void AdvancedFm::processEnded(OProcess *) { | 719 | void AdvancedFm::processEnded(OProcess *) { |
720 | rePopulate(); | 720 | rePopulate(); |
721 | } | 721 | } |
722 | 722 | ||
723 | void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) { | 723 | void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) { |
724 | // qWarning("received stderrt %d bytes", buflen); | 724 | // qWarning("received stderrt %d bytes", buflen); |
725 | 725 | ||
726 | QString lineStr = buffer; | 726 | QString lineStr = buffer; |
727 | QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") ); | 727 | QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") ); |
728 | } | 728 | } |
729 | 729 | ||
730 | bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { | 730 | bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { |
731 | if ( o->inherits( "QLineEdit" ) ) { | 731 | if ( o->inherits( "QLineEdit" ) ) { |
732 | if ( e->type() == QEvent::KeyPress ) { | 732 | if ( e->type() == QEvent::KeyPress ) { |
733 | QKeyEvent *ke = (QKeyEvent*)e; | 733 | QKeyEvent *ke = (QKeyEvent*)e; |
diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp index 7dc2416..0bba1d8 100644 --- a/noncore/apps/advancedfm/output.cpp +++ b/noncore/apps/advancedfm/output.cpp | |||
@@ -120,59 +120,59 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name, | |||
120 | // cmmds=QStringList::split( " ", commands, false); | 120 | // cmmds=QStringList::split( " ", commands, false); |
121 | cmmds=commands; | 121 | cmmds=commands; |
122 | // qDebug("count %d", cmmds.count()); | 122 | // qDebug("count %d", cmmds.count()); |
123 | if ( !name ) | 123 | if ( !name ) |
124 | setName( tr("Output")); | 124 | setName( tr("Output")); |
125 | resize( 196, 269 ); | 125 | resize( 196, 269 ); |
126 | setCaption( name ); | 126 | setCaption( name ); |
127 | 127 | ||
128 | OutputLayout = new QGridLayout( this ); | 128 | OutputLayout = new QGridLayout( this ); |
129 | OutputLayout->setSpacing( 2); | 129 | OutputLayout->setSpacing( 2); |
130 | OutputLayout->setMargin( 2); | 130 | OutputLayout->setMargin( 2); |
131 | 131 | ||
132 | QPushButton *docButton; | 132 | QPushButton *docButton; |
133 | docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton"); | 133 | docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton"); |
134 | docButton->setFixedSize( QSize( 20, 20 ) ); | 134 | docButton->setFixedSize( QSize( 20, 20 ) ); |
135 | connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() )); | 135 | connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() )); |
136 | // docButton->setFlat(TRUE); | 136 | // docButton->setFlat(TRUE); |
137 | OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 ); | 137 | OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 ); |
138 | 138 | ||
139 | OutputEdit = new QMultiLineEdit( this, "OutputEdit" ); | 139 | OutputEdit = new QMultiLineEdit( this, "OutputEdit" ); |
140 | OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 ); | 140 | OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 ); |
141 | 141 | ||
142 | proc = new OProcess(); | 142 | proc = new OProcess(); |
143 | 143 | ||
144 | connect(proc, SIGNAL(processExited(OProcess *)), | 144 | connect(proc, SIGNAL(processExited(OProcess*)), |
145 | this, SLOT( processFinished())); | 145 | this, SLOT( processFinished())); |
146 | 146 | ||
147 | connect(proc, SIGNAL(receivedStdout(OProcess *, char *, int)), | 147 | connect(proc, SIGNAL(receivedStdout(OProcess*,char*,int)), |
148 | this, SLOT(commandStdout(OProcess *, char *, int))); | 148 | this, SLOT(commandStdout(OProcess*,char*,int))); |
149 | 149 | ||
150 | connect(proc, SIGNAL(receivedStderr(OProcess *, char *, int)), | 150 | connect(proc, SIGNAL(receivedStderr(OProcess*,char*,int)), |
151 | this, SLOT(commandStderr(OProcess *, char *, int))); | 151 | this, SLOT(commandStderr(OProcess*,char*,int))); |
152 | 152 | ||
153 | // connect( , SIGNAL(received(const QByteArray &)), | 153 | // connect( , SIGNAL(received(const QByteArray&)), |
154 | // this, SLOT(commandStdin(const QByteArray &))); | 154 | // this, SLOT(commandStdin(const QByteArray&))); |
155 | 155 | ||
156 | // * proc << commands.latin1(); | 156 | // * proc << commands.latin1(); |
157 | for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { | 157 | for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { |
158 | qDebug( "%s", (*it).latin1() ); | 158 | qDebug( "%s", (*it).latin1() ); |
159 | * proc << (*it).latin1(); | 159 | * proc << (*it).latin1(); |
160 | } | 160 | } |
161 | 161 | ||
162 | if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) { | 162 | if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) { |
163 | 163 | ||
164 | OutputEdit->append(tr("Process could not start") ); | 164 | OutputEdit->append(tr("Process could not start") ); |
165 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); | 165 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); |
166 | perror("Error: "); | 166 | perror("Error: "); |
167 | QString errorMsg=tr("Error\n")+(QString)strerror(errno); | 167 | QString errorMsg=tr("Error\n")+(QString)strerror(errno); |
168 | OutputEdit->append( errorMsg); | 168 | OutputEdit->append( errorMsg); |
169 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); | 169 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); |
170 | } | 170 | } |
171 | } | 171 | } |
172 | 172 | ||
173 | Output::~Output() { | 173 | Output::~Output() { |
174 | } | 174 | } |
175 | 175 | ||
176 | void Output::saveOutput() { | 176 | void Output::saveOutput() { |
177 | 177 | ||
178 | InputDialog *fileDlg; | 178 | InputDialog *fileDlg; |
@@ -219,50 +219,50 @@ void Output::commandStdout(OProcess*, char *buffer, int buflen) { | |||
219 | } | 219 | } |
220 | 220 | ||
221 | 221 | ||
222 | void Output::commandStdin( const QByteArray &data) { | 222 | void Output::commandStdin( const QByteArray &data) { |
223 | qWarning("received stdin %d bytes", data.size()); | 223 | qWarning("received stdin %d bytes", data.size()); |
224 | // recieved data from the io layer goes to sz | 224 | // recieved data from the io layer goes to sz |
225 | proc->writeStdin(data.data(), data.size()); | 225 | proc->writeStdin(data.data(), data.size()); |
226 | } | 226 | } |
227 | 227 | ||
228 | void Output::commandStderr(OProcess*, char *buffer, int buflen) { | 228 | void Output::commandStderr(OProcess*, char *buffer, int buflen) { |
229 | qWarning("received stderrt %d bytes", buflen); | 229 | qWarning("received stderrt %d bytes", buflen); |
230 | 230 | ||
231 | QString lineStr = buffer; | 231 | QString lineStr = buffer; |
232 | // lineStr=lineStr.left(lineStr.length()-1); | 232 | // lineStr=lineStr.left(lineStr.length()-1); |
233 | OutputEdit->append(lineStr); | 233 | OutputEdit->append(lineStr); |
234 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); | 234 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); |
235 | } | 235 | } |
236 | 236 | ||
237 | void Output::processFinished() { | 237 | void Output::processFinished() { |
238 | 238 | ||
239 | delete proc; | 239 | delete proc; |
240 | OutputEdit->append( tr("\nFinished\n") ); | 240 | OutputEdit->append( tr("\nFinished\n") ); |
241 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); | 241 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); |
242 | // close(); | 242 | // close(); |
243 | // disconnect( layer(), SIGNAL(received(const QByteArray &)), | 243 | // disconnect( layer(), SIGNAL(received(const QByteArray&)), |
244 | // this, SLOT(commandStdin(const QByteArray &))); | 244 | // this, SLOT(commandStdin(const QByteArray&))); |
245 | } | 245 | } |
246 | 246 | ||
247 | //============================== | 247 | //============================== |
248 | 248 | ||
249 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | 249 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) |
250 | : QDialog( parent, name, modal, fl ) | 250 | : QDialog( parent, name, modal, fl ) |
251 | { | 251 | { |
252 | if ( !name ) | 252 | if ( !name ) |
253 | setName( "InputDialog" ); | 253 | setName( "InputDialog" ); |
254 | resize( 234, 50 ); | 254 | resize( 234, 50 ); |
255 | setMaximumSize( QSize( 240, 50 ) ); | 255 | setMaximumSize( QSize( 240, 50 ) ); |
256 | setCaption( tr(name ) ); | 256 | setCaption( tr(name ) ); |
257 | 257 | ||
258 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); | 258 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); |
259 | LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) ); | 259 | LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) ); |
260 | LineEdit1->setFocus(); | 260 | LineEdit1->setFocus(); |
261 | LineEdit1->setFocus(); | 261 | LineEdit1->setFocus(); |
262 | connect(LineEdit1,SIGNAL(returnPressed()),this,SLOT(returned() )); | 262 | connect(LineEdit1,SIGNAL(returnPressed()),this,SLOT(returned() )); |
263 | } | 263 | } |
264 | 264 | ||
265 | InputDialog::~InputDialog() { | 265 | InputDialog::~InputDialog() { |
266 | inputText = LineEdit1->text(); | 266 | inputText = LineEdit1->text(); |
267 | } | 267 | } |
268 | 268 | ||