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

« back to all changes in this revision

Viewing changes to languages/ruby/debugger/rdbtable.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

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
 
*                                                                             *
6
 
*                          Adapted for ruby debugging                     *
7
 
*                          --------------------------                     *
8
 
*    begin                : Mon Nov 1 2004                                *
9
 
*    copyright            : (C) 2004 by Richard Dale                      *
10
 
*    email                : Richard_Dale@tipitina.demon.co.uk             *
11
 
*                                                                         *
12
 
*   This program is free software; you can redistribute it and/or modify  *
13
 
*   it under the terms of the GNU General Public License as published by  *
14
 
*   the Free Software Foundation; either version 2 of the License, or     *
15
 
*   (at your option) any later version.                                   *
16
 
***************************************************************************/
17
 
#include "rdbtable.h"
18
 
 
19
 
namespace RDBDebugger {
20
 
 
21
 
RDBTable::RDBTable(QWidget *parent, const char *name)
22
 
 : QTable(parent, name)
23
 
{
24
 
}
25
 
 
26
 
RDBTable::RDBTable(int nr, int nc, QWidget * parent, const char * name)
27
 
 : QTable(nr, nc, parent, name)
28
 
{
29
 
}
30
 
 
31
 
RDBTable::~RDBTable()
32
 
{
33
 
}
34
 
 
35
 
void RDBTable::keyPressEvent( QKeyEvent * e )
36
 
{
37
 
    emit keyPressed(e->key());
38
 
 
39
 
    if (e->key() == Key_Return)
40
 
        emit returnPressed();
41
 
    else if (e->key() == Key_F2)
42
 
        emit f2Pressed();
43
 
    else if ((e->text() == QString("a")) && (e->state() == AltButton))
44
 
    {
45
 
        emit insertPressed();
46
 
        return;
47
 
    }
48
 
    else if ((e->text() == QString("A")) && (e->state() == AltButton))
49
 
    {
50
 
        emit insertPressed();
51
 
        return;
52
 
    }
53
 
    else if (e->key() == Key_Delete)
54
 
        emit deletePressed();
55
 
 
56
 
    QTable::keyPressEvent(e);
57
 
}
58
 
 
59
 
}
60
 
 
61
 
#include "rdbtable.moc"
62