| 261 |
- |
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"
|
| 143 |
david |
8 |
#include "qmdialogteameditor.h"
|
|
|
9 |
|
|
|
10 |
qmDialogTeamEditor::qmDialogTeamEditor(int team, QWidget *parent) :
|
| 261 |
- |
11 |
QDialog(parent)
|
| 143 |
david |
12 |
{
|
| 261 |
- |
13 |
setObjectName(QString::fromUtf8("qmDialogTeamEditor"));
|
| 327 |
david |
14 |
//resize(533, 507);
|
| 261 |
- |
15 |
|
|
|
16 |
widget = new qmTeamDisplay(this, team, TRUE);
|
|
|
17 |
widget->setObjectName(QString::fromUtf8("qmDialogTeamEditorWidget"));
|
|
|
18 |
widget->setEnabled(true);
|
| 327 |
david |
19 |
widget->setGeometry(QRect(0, 0, 531, 511));
|
| 261 |
- |
20 |
|
|
|
21 |
connect(widget, SIGNAL(dialogDone(int)), this, SLOT(done(int)));
|
| 143 |
david |
22 |
}
|
|
|
23 |
|
|
|
24 |
qmDialogTeamEditor::~qmDialogTeamEditor()
|
|
|
25 |
{
|
| 261 |
- |
26 |
delete widget;
|
| 143 |
david |
27 |
}
|
| 305 |
david |
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
|
| 328 |
david |
36 |
** dialog does not do either a 'save' or 'restore' pushbutton event
|
| 305 |
david |
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);
|
|
|
55 |
}
|