summaryrefslogtreecommitdiff
path: root/noncore
authorjosef <josef>2002-10-26 11:38:42 (UTC)
committer josef <josef>2002-10-26 11:38:42 (UTC)
commit2dc92ada34785bbfff8ca1202e4d53eb0606c362 (patch) (unidiff)
treec92a92b5cbb1d80962821212b9157260a9faa0f6 /noncore
parent65ada01d36dc25f053a09222e8abdb21f2fc3a2a (diff)
downloadopie-2dc92ada34785bbfff8ca1202e4d53eb0606c362.zip
opie-2dc92ada34785bbfff8ca1202e4d53eb0606c362.tar.gz
opie-2dc92ada34785bbfff8ca1202e4d53eb0606c362.tar.bz2
- nonmodal file transfer (doesn't work yet!)
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp24
-rw-r--r--noncore/apps/opie-console/session.cpp10
-rw-r--r--noncore/apps/opie-console/session.h5
-rw-r--r--noncore/apps/opie-console/transferdialog.cpp15
-rw-r--r--noncore/apps/opie-console/transferdialog.h2
5 files changed, 46 insertions, 10 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index c44b359..5f6dc12 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -536,2 +536,5 @@ void MainWindow::slotProfile( int id) {
536void MainWindow::create( const Profile& prof ) { 536void MainWindow::create( const Profile& prof ) {
537 if(m_curSession)
538 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
539
537 Session *ses = manager()->fromProfile( prof, tabWidget() ); 540 Session *ses = manager()->fromProfile( prof, tabWidget() );
@@ -580,6 +583,11 @@ void MainWindow::slotTransfer()
580 if ( currentSession() ) { 583 if ( currentSession() ) {
581 TransferDialog dlg(currentSession()->widgetStack(), this); 584 Session *mysession = currentSession();
582 dlg.showMaximized(); 585 TransferDialog dlg(mysession->widgetStack(), this);
586 mysession->setTransferDialog(&dlg);
587 dlg.show();
588 //dlg.showMaximized();
583 //currentSession()->widgetStack()->add(dlg); 589 //currentSession()->widgetStack()->add(dlg);
584 dlg.exec(); 590 //dlg.exec();
591 while(dlg.isRunning()) qApp->processEvents();
592 mysession->setTransferDialog(0l);
585 } 593 }
@@ -609,2 +617,8 @@ void MainWindow::slotSessionChanged( Session* ses ) {
609 qWarning("changed!"); 617 qWarning("changed!");
618
619 if(m_curSession)
620 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
621 if(ses)
622 if(ses->transferDialog()) ses->transferDialog()->show();
623
610 if ( ses ) { 624 if ( ses ) {
@@ -632,6 +646,2 @@ void MainWindow::slotSessionChanged( Session* ses ) {
632 646
633
634
635
636
637 QWidget *w = m_curSession->widget(); 647 QWidget *w = m_curSession->widget();
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp
index c166d95..4f52584 100644
--- a/noncore/apps/opie-console/session.cpp
+++ b/noncore/apps/opie-console/session.cpp
@@ -13,2 +13,3 @@ Session::Session() {
13 m_emu = 0l; 13 m_emu = 0l;
14 m_transfer = 0l;
14} 15}
@@ -106,2 +107,11 @@ void Session::setEmulationWidget( WidgetLayer* lay ) {
106*/ 107*/
108void Session::setTransferDialog(QWidget *d)
109{
110 m_transfer = d;
111}
112
113QWidget *Session::transferDialog()
114{
115 return m_transfer;
116}
107 117
diff --git a/noncore/apps/opie-console/session.h b/noncore/apps/opie-console/session.h
index f60a6c0..d69224a 100644
--- a/noncore/apps/opie-console/session.h
+++ b/noncore/apps/opie-console/session.h
@@ -66,2 +66,5 @@ public:
66 66
67 void setTransferDialog(QWidget *d);
68 QWidget *transferDialog();
69
67private: 70private:
@@ -73,3 +76,3 @@ private:
73 Profile m_prof; 76 Profile m_prof;
74 77 QWidget *m_transfer;
75}; 78};
diff --git a/noncore/apps/opie-console/transferdialog.cpp b/noncore/apps/opie-console/transferdialog.cpp
index 75c4c72..0af1911 100644
--- a/noncore/apps/opie-console/transferdialog.cpp
+++ b/noncore/apps/opie-console/transferdialog.cpp
@@ -20,3 +20,3 @@
20TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *) 20TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *)
21: QDialog(parent, 0l, true), m_win(mainwindow) 21: QDialog(parent, 0l, false), m_win(mainwindow)
22{ 22{
@@ -31,2 +31,3 @@ TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const ch
31 m_autocleanup = 0; 31 m_autocleanup = 0;
32 m_running = true;
32 33
@@ -169,3 +170,7 @@ void TransferDialog::slotCancel()
169 cleanup(); 170 cleanup();
170 if(m_autocleanup) close(); 171 if(m_autocleanup)
172 {
173 m_running = false;
174 close();
175 }
171 else 176 else
@@ -179,2 +184,3 @@ void TransferDialog::slotCancel()
179 { 184 {
185 m_running = false;
180 close(); 186 close();
@@ -266 +272,6 @@ void TransferDialog::slotMode(int id)
266 272
273bool TransferDialog::isRunning()
274{
275 return m_running;
276}
277
diff --git a/noncore/apps/opie-console/transferdialog.h b/noncore/apps/opie-console/transferdialog.h
index d87be6a..23691e0 100644
--- a/noncore/apps/opie-console/transferdialog.h
+++ b/noncore/apps/opie-console/transferdialog.h
@@ -20,2 +20,3 @@ class TransferDialog : public QDialog
20 ~TransferDialog(); 20 ~TransferDialog();
21 bool isRunning();
21 22
@@ -50,2 +51,3 @@ class TransferDialog : public QDialog
50 int m_autocleanup; 51 int m_autocleanup;
52 bool m_running;
51}; 53};