summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 3fe9040..0a475d8 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -7,13 +7,13 @@
7#include <qwhatsthis.h> 7#include <qwhatsthis.h>
8#include <qfileinfo.h> 8#include <qfileinfo.h>
9 9
10#include <qpe/filemanager.h> 10#include <qpe/filemanager.h>
11#include <qpe/qpeapplication.h> 11#include <qpe/qpeapplication.h>
12 12
13#include <opie/ofiledialog.h> 13#include <opie2/ofiledialog.h>
14 14
15#include "TEmulation.h" 15#include "TEmulation.h"
16#include "profileeditordialog.h" 16#include "profileeditordialog.h"
17#include "configdialog.h" 17#include "configdialog.h"
18#include "default.h" 18#include "default.h"
19#include "profilemanager.h" 19#include "profilemanager.h"
@@ -330,13 +330,13 @@ void MainWindow::slotRecordScript() {
330void MainWindow::slotSaveScript() { 330void MainWindow::slotSaveScript() {
331 if (currentSession() && currentSession()->emulationHandler()->isRecording()) { 331 if (currentSession() && currentSession()->emulationHandler()->isRecording()) {
332 QMap<QString, QStringList> map; 332 QMap<QString, QStringList> map;
333 QStringList text; 333 QStringList text;
334 text << "text/plain"; 334 text << "text/plain";
335 map.insert(tr("Script"), text ); 335 map.insert(tr("Script"), text );
336 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); 336 QString filename = Opie::OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map);
337 if (!filename.isEmpty()) { 337 if (!filename.isEmpty()) {
338 QFileInfo info(filename); 338 QFileInfo info(filename);
339 if (info.extension(FALSE) != "script") 339 if (info.extension(FALSE) != "script")
340 filename += ".script"; 340 filename += ".script";
341 DocLnk nf; 341 DocLnk nf;
342 nf.setType("text/plain"); 342 nf.setType("text/plain");
@@ -444,14 +444,14 @@ void MainWindow::slotConfigure() {
444void MainWindow::slotClose() { 444void MainWindow::slotClose() {
445 if (!currentSession() ) 445 if (!currentSession() )
446 return; 446 return;
447 447
448 Session* ses = currentSession(); 448 Session* ses = currentSession();
449 qWarning("removing! currentSession %s", currentSession()->name().latin1() ); 449 qWarning("removing! currentSession %s", currentSession()->name().latin1() );
450 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ 450 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */
451 m_curSession = NULL; 451 m_curSession = NULL;
452 tabWidget()->remove( /*currentSession()*/ses ); 452 tabWidget()->remove( /*currentSession()*/ses );
453 /*it's autodelete */ 453 /*it's autodelete */
454 m_sessions.remove( ses ); 454 m_sessions.remove( ses );
455 qWarning("after remove!!"); 455 qWarning("after remove!!");
456 456
457 if (!currentSession() ) { 457 if (!currentSession() ) {
@@ -480,25 +480,25 @@ void MainWindow::slotProfile( int id) {
480 create( prof ); 480 create( prof );
481} 481}
482 482
483 483
484 484
485void MainWindow::create( const Profile& prof ) { 485void MainWindow::create( const Profile& prof ) {
486 if(m_curSession) 486 if(m_curSession)
487 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); 487 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
488 488
489 Session *ses = manager()->fromProfile( prof, tabWidget() ); 489 Session *ses = manager()->fromProfile( prof, tabWidget() );
490 490
491 if((!ses) || (!ses->layer()) || (!ses->widgetStack())) 491 if((!ses) || (!ses->layer()) || (!ses->widgetStack()))
492 { 492 {
493 QMessageBox::warning(this, 493 QMessageBox::warning(this,
494 QObject::tr("Session failed"), 494 QObject::tr("Session failed"),
495 QObject::tr("<qt>Cannot open session: Not all components were found.</qt>")); 495 QObject::tr("<qt>Cannot open session: Not all components were found.</qt>"));
496 //if(ses) delete ses; 496 //if(ses) delete ses;
497 return; 497 return;
498 } 498 }
499 499
500 m_sessions.append( ses ); 500 m_sessions.append( ses );
501 tabWidget()->add( ses ); 501 tabWidget()->add( ses );
502 tabWidget()->repaint(); 502 tabWidget()->repaint();
503 m_curSession = ses; 503 m_curSession = ses;
504 504
@@ -533,22 +533,22 @@ void MainWindow::create( const Profile& prof ) {
533 m_kb->load(currentSession()->profile()); 533 m_kb->load(currentSession()->profile());
534} 534}
535 535
536void MainWindow::slotTransfer() 536void MainWindow::slotTransfer()
537{ 537{
538 if ( currentSession() ) { 538 if ( currentSession() ) {
539 Session *mysession = currentSession(); 539 Session *mysession = currentSession();
540 TransferDialog dlg(/*mysession->widgetStack()*/this, this); 540 TransferDialog dlg(/*mysession->widgetStack()*/this, this);
541 mysession->setTransferDialog(&dlg); 541 mysession->setTransferDialog(&dlg);
542 //dlg.reparent(mysession->widgetStack(), QPoint(0, 0)); 542 //dlg.reparent(mysession->widgetStack(), QPoint(0, 0));
543 //dlg.showMaximized(); 543 //dlg.showMaximized();
544 currentSession()->widgetStack()->addWidget(&dlg, -1); 544 currentSession()->widgetStack()->addWidget(&dlg, -1);
545 dlg.show(); 545 dlg.show();
546 //dlg.exec(); 546 //dlg.exec();
547 while(dlg.isRunning()) qApp->processEvents(); 547 while(dlg.isRunning()) qApp->processEvents();
548 mysession->setTransferDialog(0l); 548 mysession->setTransferDialog(0l);
549 } 549 }
550} 550}
551 551
552 552
553void MainWindow::slotOpenKeb(bool state) { 553void MainWindow::slotOpenKeb(bool state) {
554 554
@@ -569,16 +569,16 @@ void MainWindow::slotOpenButtons( bool state ) {
569 569
570 570
571 571
572void MainWindow::slotSessionChanged( Session* ses ) { 572void MainWindow::slotSessionChanged( Session* ses ) {
573 qWarning("changed!"); 573 qWarning("changed!");
574 574
575 if(m_curSession) 575 if(m_curSession)
576 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); 576 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
577 if(ses) 577 if(ses)
578 if(ses->transferDialog()) ses->transferDialog()->show(); 578 if(ses->transferDialog()) ses->transferDialog()->show();
579 579
580 if ( ses ) { 580 if ( ses ) {
581 m_curSession = ses; 581 m_curSession = ses;
582 qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); 582 qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) );
583 if ( m_curSession->layer()->isConnected() ) { 583 if ( m_curSession->layer()->isConnected() ) {
584 m_connect->setEnabled( false ); 584 m_connect->setEnabled( false );
@@ -618,21 +618,21 @@ void MainWindow::slotWrap()
618 if(m_curSession) 618 if(m_curSession)
619 { 619 {
620 EmulationHandler *e = m_curSession->emulationHandler(); 620 EmulationHandler *e = m_curSession->emulationHandler();
621 if(e) 621 if(e)
622 { 622 {
623 if(m_isWrapped) 623 if(m_isWrapped)
624 { 624 {
625 e->setWrap(80); 625 e->setWrap(80);
626 m_isWrapped = false; 626 m_isWrapped = false;
627 } 627 }
628 else 628 else
629 { 629 {
630 e->setWrap(0); 630 e->setWrap(0);
631 m_isWrapped = true; 631 m_isWrapped = true;
632 } 632 }
633 } 633 }
634 } 634 }
635} 635}
636 636
637void MainWindow::slotFullscreen() { 637void MainWindow::slotFullscreen() {
638 638
@@ -703,13 +703,13 @@ void MainWindow::slotSaveSession() {
703} 703}
704void MainWindow::slotSaveHistory() { 704void MainWindow::slotSaveHistory() {
705 QMap<QString, QStringList> map; 705 QMap<QString, QStringList> map;
706 QStringList text; 706 QStringList text;
707 text << "text/plain"; 707 text << "text/plain";
708 map.insert(tr("History"), text ); 708 map.insert(tr("History"), text );
709 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); 709 QString filename = Opie::OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map);
710 if (filename.isEmpty() ) return; 710 if (filename.isEmpty() ) return;
711 711
712 QFileInfo info(filename); 712 QFileInfo info(filename);
713 713
714 DocLnk nf; 714 DocLnk nf;
715 nf.setType("text/plain"); 715 nf.setType("text/plain");