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) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp49
1 files changed, 48 insertions, 1 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
@@ -91,2 +91,12 @@ void MainWindow::initUI() {
+ 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();
+
/*
@@ -178,3 +188,3 @@ void MainWindow::initUI() {
* action that open/closes the keyboard
-
+
m_openButtons = new QAction ( tr( "Open Buttons..." ),
@@ -224,2 +234,16 @@ void MainWindow::initUI() {
*/
+ /* 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() ) );
@@ -541 +565,24 @@ 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();
+}