1 /***************************************************************************
2 phraseedit.cpp - description
4 begin : Don Sep 26 2002
5 copyright : (C) 2002 by Gunnar Schmi Dt
6 email : kmouth@schmi-dt.de
7 ***************************************************************************/
9 /***************************************************************************
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. *
16 ***************************************************************************/
18 #include "phraseedit.h"
22 PhraseEdit::PhraseEdit(const QString
&string
, QWidget
*parent
)
23 : KLineEdit (string
, parent
) {
26 PhraseEdit::~PhraseEdit() {
29 void PhraseEdit::keyPressEvent (QKeyEvent
*e
) {
30 if ((e
->state() & Qt::KeyboardModifierMask
) == Qt::ControlModifier
) {
31 if (e
->key() == Qt::Key_C
) {
32 if (!this->hasSelectedText()) {
37 else if (e
->key() == Qt::Key_Insert
) {
38 if (!hasSelectedText()) {
43 else if (e
->key() == Qt::Key_X
) {
44 if (!hasSelectedText()) {
50 else if ((e
->state() & Qt::KeyboardModifierMask
) == Qt::ShiftModifier
) {
51 if (e
->key() == Qt::Key_Delete
) {
52 if (!hasSelectedText()) {
58 KLineEdit::keyPressEvent(e
);