~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to languages/cpp/debugger/gdbtable.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
*   Copyright (C) 2003 by Alexander Dymo                                  *
 
3
*   cloudtemple@mksat.net                                                 *
 
4
*                                                                         *
 
5
*   This program is free software; you can redistribute it and/or modify  *
 
6
*   it under the terms of the GNU General Public License as published by  *
 
7
*   the Free Software Foundation; either version 2 of the License, or     *
 
8
*   (at your option) any later version.                                   *
 
9
***************************************************************************/
 
10
#include "gdbtable.h"
 
11
 
 
12
namespace GDBDebugger {
 
13
 
 
14
GDBTable::GDBTable(QWidget *parent, const char *name)
 
15
 : QTable(parent, name)
 
16
{
 
17
}
 
18
 
 
19
GDBTable::GDBTable(int nr, int nc, QWidget * parent, const char * name)
 
20
 : QTable(nr, nc, parent, name)
 
21
{
 
22
}
 
23
 
 
24
GDBTable::~GDBTable()
 
25
{
 
26
}
 
27
 
 
28
void GDBTable::keyPressEvent( QKeyEvent * e )
 
29
{
 
30
    emit keyPressed(e->key());
 
31
 
 
32
    if (e->key() == Key_Return)
 
33
        emit returnPressed();
 
34
    else if (e->key() == Key_F2)
 
35
        emit f2Pressed();
 
36
    else if ((e->text() == QString("a")) && (e->state() == AltButton))
 
37
    {
 
38
        emit insertPressed();
 
39
        return;
 
40
    }
 
41
    else if ((e->text() == QString("A")) && (e->state() == AltButton))
 
42
    {
 
43
        emit insertPressed();
 
44
        return;
 
45
    }
 
46
    else if (e->key() == Key_Delete)
 
47
        emit deletePressed();
 
48
 
 
49
    QTable::keyPressEvent(e);
 
50
}
 
51
 
 
52
}
 
53
 
 
54
#include "gdbtable.moc"
 
55