A few new icons...
[kdeaccessibility.git] / kmouth / phraseedit.cpp
blob0f2e31981871b67f6255fd08ba31484b56dfba31
1 /***************************************************************************
2 phraseedit.cpp - description
3 -------------------
4 begin : Don Sep 26 2002
5 copyright : (C) 2002 by Gunnar Schmi Dt
6 email : kmouth@schmi-dt.de
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #include "phraseedit.h"
20 PhraseEdit::PhraseEdit(const QString &string, QWidget *parent)
21 : KLineEdit (string, parent) {
24 PhraseEdit::~PhraseEdit() {
27 void PhraseEdit::keyPressEvent (QKeyEvent *e) {
28 if ((e->state() & Qt::KeyButtonMask) == Qt::ControlButton) {
29 if (e->key() == Qt::Key_C) {
30 if (!this->hasSelectedText()) {
31 e->ignore();
32 return;
35 else if (e->key() == Qt::Key_Insert) {
36 if (!hasSelectedText()) {
37 e->ignore();
38 return;
41 else if (e->key() == Qt::Key_X) {
42 if (!hasSelectedText()) {
43 e->ignore();
44 return;
48 else if ((e->state() & Qt::KeyButtonMask) == Qt::ShiftButton) {
49 if (e->key() == Qt::Key_Delete) {
50 if (!hasSelectedText()) {
51 e->ignore();
52 return;
56 KLineEdit::keyPressEvent(e);