Subversion Repositories svn1

Rev

Rev 139 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 139 Rev 380
Line -... Line 1...
-
 
1
#include <QtCore/QVariant>
-
 
2
#include <QtGui/QAction>
-
 
3
#include <QtGui/QApplication>
-
 
4
#include <QtGui/QButtonGroup>
-
 
5
#include <QtGui/QDialog>
-
 
6
#include <QtGui/QHeaderView>
-
 
7
#include "qmteamdisplay.h"
1
#include "qmdialogteameditor.h"
8
#include "qmdialogteameditor.h"
2
#include "ui_qmdialogteameditor.h"
-
 
3
 
9
 
4
qmDialogTeamEditor::qmDialogTeamEditor(int team, QWidget *parent) :
10
qmDialogTeamEditor::qmDialogTeamEditor(int team, QWidget *parent) :
5
    QDialog(parent),
11
    QDialog(parent)
6
    ui(new Ui::qmDialogTeamEditor)
-
 
7
{
12
{
-
 
13
    setObjectName(QString::fromUtf8("qmDialogTeamEditor"));
8
    ui->setupUi( this);
14
    //resize(533, 507);
-
 
15
 
-
 
16
    widget = new qmTeamDisplay(this, team, TRUE);
-
 
17
    widget->setObjectName(QString::fromUtf8("qmDialogTeamEditorWidget"));
9
    ui->widget->populate(team);
18
    widget->setEnabled(true);
-
 
19
    widget->setGeometry(QRect(0, 0, 531, 511));
-
 
20
 
-
 
21
    connect(widget, SIGNAL(dialogDone(int)), this, SLOT(done(int)));
10
}
22
}
11
 
23
 
12
qmDialogTeamEditor::~qmDialogTeamEditor()
24
qmDialogTeamEditor::~qmDialogTeamEditor()
13
{
25
{
14
    delete ui;
26
    delete widget;
-
 
27
}
-
 
28
 
-
 
29
/*----------------------------------------------------------------------------
-
 
30
** FUNCTION           : keyPressEvent
-
 
31
**
-
 
32
** DESCRIPTION        : Interect keystrokes not processed by lower level
-
 
33
**                      widgets.
-
 
34
** 
-
 
35
**                      The intent is to 'swallow' return key strokes so that the
-
 
36
**                      dialog does not do either a 'save' or 'restore' pushbutton event
-
 
37
** 
-
 
38
**                      Want the user to explicity save the chnages
-
 
39
**
-
 
40
**
-
 
41
** INPUTS             : evt         - Key stroke events
-
 
42
**
-
 
43
** RETURNS            :
-
 
44
**
-
 
45
----------------------------------------------------------------------------*/
-
 
46
 
-
 
47
void qmDialogTeamEditor::keyPressEvent(QKeyEvent *evt)
-
 
48
{
-
 
49
    //qDebug("qmDialogTeamEditor::keyPressEvent");
-
 
50
    if(evt->key() == Qt::Key_Enter || evt->key() == Qt::Key_Return)
-
 
51
    {
-
 
52
        return;
-
 
53
    }
-
 
54
    QDialog::keyPressEvent(evt);
15
}
55
}