tools/MissionsEditor/teamedit.cpp
author unc0rr
Fri, 30 Oct 2009 19:28:44 +0000
changeset 2594 0047e16dbacb
parent 2589 4329597c85c8
child 2596 41b46f83d088
permissions -rw-r--r--
Add loading team parameters
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2589
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
     1
#include "teamedit.h"
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
     2
#include "ui_teamedit.h"
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
     3
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
     4
TeamEdit::TeamEdit(QWidget *parent) :
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
     5
    QWidget(parent),
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
     6
    m_ui(new Ui::TeamEdit)
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
     7
{
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
     8
    m_ui->setupUi(this);
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
     9
}
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    10
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    11
TeamEdit::~TeamEdit()
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    12
{
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    13
    delete m_ui;
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    14
}
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    15
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    16
void TeamEdit::changeEvent(QEvent *e)
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    17
{
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    18
    QWidget::changeEvent(e);
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    19
    switch (e->type()) {
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    20
    case QEvent::LanguageChange:
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    21
        m_ui->retranslateUi(this);
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    22
        break;
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    23
    default:
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    24
        break;
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    25
    }
4329597c85c8 Further work on missions editor
unc0rr
parents:
diff changeset
    26
}
2594
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    27
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    28
void TeamEdit::addTeam(const QString & teamName, quint32 color)
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    29
{
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    30
    m_ui->leTeamName->setText(teamName);
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    31
}
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    32
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    33
void TeamEdit::setFort(const QString & name)
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    34
{
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    35
    m_ui->leFort->setText(name);
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    36
}
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    37
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    38
void TeamEdit::setGrave(const QString & name)
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    39
{
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    40
    m_ui->leGrave->setText(name);
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    41
}
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    42
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    43
void TeamEdit::setVoicepack(const QString & name)
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    44
{
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    45
    m_ui->leVoicepack->setText(name);
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    46
}
0047e16dbacb Add loading team parameters
unc0rr
parents: 2589
diff changeset
    47