author | zecke <zecke> | 2002-10-24 12:13:09 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-24 12:13:09 (UTC) |
commit | acf708cee945b8b843b0132672d79f5c4571c22b (patch) (side-by-side diff) | |
tree | 96b6bee6e6df3c6a252ff5680275f7080ad93729 /noncore/apps/opie-console/mainwindow.cpp | |
parent | 41c59e994e023f5c236502538f54d0f3fce8435a (diff) | |
download | opie-acf708cee945b8b843b0132672d79f5c4571c22b.zip opie-acf708cee945b8b843b0132672d79f5c4571c22b.tar.gz opie-acf708cee945b8b843b0132672d79f5c4571c22b.tar.bz2 |
Fixed warnings
Now we're down to two warning with number conversions
Enable Saving Sessions
Enable Copy and Paste
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index e2f4d12..02a3fa9 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -90,4 +90,14 @@ void MainWindow::initUI() { this, SLOT(slotNew() ) ); + m_console->insertSeparator(); + /* save icon is not available */ + a = new QAction(tr("Save Connection"), + Resource::loadPixmap("save"), QString::null, + 0, this, 0 ); + a->addTo( m_console ); + connect(a, SIGNAL(activated() ), + this, SLOT(slotSaveSession() ) ); + m_console->insertSeparator(); + /* * connect action @@ -223,4 +233,18 @@ void MainWindow::initUI() { this, SLOT( slotKeyReceived( ushort, ushort, bool, bool, bool) ) ); */ + /* now add the copy and paste actions */ + a = new QAction(tr("Copy"), + Resource::loadPixmap("copy"), QString::null, + 0, this, 0 ); + //a->addTo( m_icons ); + connect( a, SIGNAL(activated() ), + this, SLOT(slotCopy() ) ); + + a = new QAction(tr("Paste"), + Resource::loadPixmap("paste"), QString::null, + 0, this, 0 ); + a->addTo( m_icons ); + connect( a, SIGNAL(activated() ), + this, SLOT(slotPaste() ) ); @@ -540,2 +564,25 @@ void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) { } } +void MainWindow::slotCopy() { + if (!currentSession() ) return; + currentSession()->emulationHandler()->copy(); +} +void MainWindow::slotPaste() { + if (!currentSession() ) return; + currentSession()->emulationHandler()->paste(); +} + +/* + * Save the session + */ + +void MainWindow::slotSaveSession() { + if (!currentSession() ) { + QMessageBox::information(this, tr("Save Connection"), + tr("<qt>There is no Connection.</qt>"), 1 ); + return; + } + manager()->add( currentSession()->profile() ); + manager()->save(); + populateProfiles(); +} |