summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 0bd6a13..fbeaa74 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -4,24 +4,25 @@
#include <qlabel.h>
#include <qpopupmenu.h>
#include <qtoolbar.h>
#include "profileeditordialog.h"
#include "configdialog.h"
#include "default.h"
#include "metafactory.h"
#include "profile.h"
#include "profilemanager.h"
#include "mainwindow.h"
#include "tabwidget.h"
+#include "transferdialog.h"
MainWindow::MainWindow() {
m_factory = new MetaFactory();
Default def(m_factory);
m_sessions.setAutoDelete( TRUE );
m_curSession = 0;
m_manager = new ProfileManager( m_factory );
m_manager->load();
initUI();
populateProfiles();
}
@@ -54,24 +55,30 @@ void MainWindow::initUI() {
connect(m_connect, SIGNAL(activated() ),
this, SLOT(slotConnect() ) );
/*
* disconnect action
*/
m_disconnect = new QAction();
m_disconnect->setText( tr("Disconnect") );
m_disconnect->addTo( m_console );
connect(m_disconnect, SIGNAL(activated() ),
this, SLOT(slotDisconnect() ) );
+ m_transfer = new QAction();
+ m_transfer->setText( tr("Transfer file...") );
+ m_transfer->addTo( m_console );
+ connect(m_transfer, SIGNAL(activated() ),
+ this, SLOT(slotTransfer() ) );
+
/*
* terminate action
*/
m_terminate = new QAction();
m_terminate->setText( tr("Terminate") );
m_terminate->addTo( m_console );
connect(m_terminate, SIGNAL(activated() ),
this, SLOT(slotTerminate() ) );
a = new QAction();
a->setText( tr("Close Window") );
a->addTo( m_console );
@@ -205,13 +212,22 @@ void MainWindow::slotClose() {
* and then we will make a profile
*/
void MainWindow::slotProfile( int id) {
Profile prof = manager()->profile( m_sessionsPop->text( id) );
create( prof );
}
void MainWindow::create( const Profile& prof ) {
Session *ses = manager()->fromProfile( prof, tabWidget() );
m_sessions.append( ses );
tabWidget()->add( ses );
m_curSession = ses;
+
}
+
+void MainWindow::slotTransfer()
+{
+ TransferDialog dlg(this);
+ dlg.showMaximized();
+ dlg.exec();
+}
+