From eae0ddd71371d2e56b39891d05ca3a385c33727b Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 07 Mar 2005 16:50:01 +0000 Subject: icons added --- (limited to 'pwmanager') diff --git a/pwmanager/pwmanager/listviewpwm.cpp b/pwmanager/pwmanager/listviewpwm.cpp index 8d46fff..0df9431 100644 --- a/pwmanager/pwmanager/listviewpwm.cpp +++ b/pwmanager/pwmanager/listviewpwm.cpp @@ -47,6 +47,14 @@ bool ListViewPwM::event(QEvent *e) emit toggleOverview(); return true; } + if ( ke->key() == Qt::Key_I || ke->key() == Qt::Key_N || ke->key() == Qt::Key_Insert) { + emit insertPW(); + return true; + } + if ( ke->key() == Qt::Key_Delete || ke->key() == Qt::Key_Backspace) { + emit deletePW(); + return true; + } } return KListView::event(e); diff --git a/pwmanager/pwmanager/listviewpwm.h b/pwmanager/pwmanager/listviewpwm.h index 840ee73..51008b8 100644 --- a/pwmanager/pwmanager/listviewpwm.h +++ b/pwmanager/pwmanager/listviewpwm.h @@ -34,6 +34,8 @@ public: signals: void layoutChanged(); void toggleOverview(); + void insertPW(); + void deletePW( ); protected: virtual bool event(QEvent *e); diff --git a/pwmanager/pwmanager/pwmview.cpp b/pwmanager/pwmanager/pwmview.cpp index 0092692..2533487 100644 --- a/pwmanager/pwmanager/pwmview.cpp +++ b/pwmanager/pwmanager/pwmview.cpp @@ -66,6 +66,8 @@ PwMView::PwMView(PwM *_mainClass, doc->setCurrentView(this); connect(doc, SIGNAL(dataChanged(PwMDoc *)), this, SLOT(updateView())); connect(this, SIGNAL(editPW()), mainClass, SLOT(editPwd_slot())); + connect(this, SIGNAL(insertPW()), mainClass, SLOT(addPwd_slot())); + connect(this, SIGNAL(deletePW()), mainClass, SLOT(deletePwd_slot())); } PwMView::~PwMView() diff --git a/pwmanager/pwmanager/pwmviewstyle.cpp b/pwmanager/pwmanager/pwmviewstyle.cpp index 5f25880..ee35472 100644 --- a/pwmanager/pwmanager/pwmviewstyle.cpp +++ b/pwmanager/pwmanager/pwmviewstyle.cpp @@ -103,6 +103,10 @@ void PwMViewStyle::initStyle(style_t style) this, SLOT(editPassWord(QListViewItem *))); connect(lv, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(editPassWord(QListViewItem *))); + connect(lv, SIGNAL(insertPW()), + this, SIGNAL( insertPW() )); + connect(lv, SIGNAL(deletePW()), + this, SIGNAL( deletePW() )); lv->addColumn(i18n("Description"), 180); lv->addColumn(i18n("Username"), 150); diff --git a/pwmanager/pwmanager/pwmviewstyle.h b/pwmanager/pwmanager/pwmviewstyle.h index 5656cbc..6c2d81c 100644 --- a/pwmanager/pwmanager/pwmviewstyle.h +++ b/pwmanager/pwmanager/pwmviewstyle.h @@ -108,6 +108,8 @@ private: PwMView *v; signals: void editPW(); + void insertPW(); + void deletePW(); }; #endif -- cgit v0.9.0.2