QTfrontend/ui/dialog/bandialog.cpp
changeset 8411 cb371dac50c0
parent 8177 1fc36c2168c4
child 8417 790492abc004
equal deleted inserted replaced
8410:48a7986e46f8 8411:cb371dac50c0
     4 #include <QLineEdit>
     4 #include <QLineEdit>
     5 #include <QLabel>
     5 #include <QLabel>
     6 #include <QPushButton>
     6 #include <QPushButton>
     7 #include <QHBoxLayout>
     7 #include <QHBoxLayout>
     8 #include <QMessageBox>
     8 #include <QMessageBox>
       
     9 #include "HWApplication.h"
     9 
    10 
    10 #include "bandialog.h"
    11 #include "bandialog.h"
    11 
    12 
    12 BanDialog::BanDialog(QWidget *parent) :
    13 BanDialog::BanDialog(QWidget *parent) :
    13     QDialog(parent)
    14     QDialog(parent)
    19     rbNick = new QRadioButton(this);
    20     rbNick = new QRadioButton(this);
    20     leId = new QLineEdit(this);
    21     leId = new QLineEdit(this);
    21     leReason = new QLineEdit(this);
    22     leReason = new QLineEdit(this);
    22     cbTime = new QComboBox(this);
    23     cbTime = new QComboBox(this);
    23 
    24 
    24     cbTime->addItem(tr("10 minutes"), 5 * 60);
    25     cbTime->addItem(HWApplication::tr("%1 minutes").arg("10"), 5 * 60);
    25     cbTime->addItem(tr("30 minutes"), 10 * 60);
    26     cbTime->addItem(HWApplication::tr("%1 minutes").arg("30"), 10 * 60);
    26     cbTime->addItem(tr("1 hour"), 60 * 60);
    27     cbTime->addItem(HWApplication::tr("%1 hour").arg("10"), 60 * 60);
    27     cbTime->addItem(tr("3 hours"), 3 * 60 * 60);
    28     cbTime->addItem(HWApplication::tr("%1 hours").arg("3"), 3 * 60 * 60);
    28     cbTime->addItem(tr("5 hours"), 5 * 60 * 60);
    29     cbTime->addItem(HWApplication::tr("%1 hours").arg("5"), 5 * 60 * 60);
    29     cbTime->addItem(tr("24 hours"), 24 * 60 * 60);
    30     cbTime->addItem(HWApplication::tr("%1 hours").arg("12"), 12 * 60 * 60);
    30     cbTime->addItem(tr("3 days"), 72 * 60 * 60);
    31     cbTime->addItem(HWApplication::tr("%1 day").arg("1"), 24 * 60 * 60);
    31     cbTime->addItem(tr("7 days"), 168 * 60 * 60);
    32     cbTime->addItem(HWApplication::tr("%1 days").arg("3"), 72 * 60 * 60);
    32     cbTime->addItem(tr("14 days"), 336 * 60 * 60);
    33     cbTime->addItem(HWApplication::tr("%1 days").arg("7"), 168 * 60 * 60);
       
    34     cbTime->addItem(HWApplication::tr("%1 days").arg("14"), 336 * 60 * 60);
    33     cbTime->addItem(tr("permanent"), 3650 * 24 * 60 * 60);
    35     cbTime->addItem(tr("permanent"), 3650 * 24 * 60 * 60);
    34     cbTime->setCurrentIndex(0);
    36     cbTime->setCurrentIndex(0);
    35 
    37 
    36     formLayout->addRow(tr("IP"), rbIP);
    38     formLayout->addRow(tr("IP"), rbIP);
    37     formLayout->addRow(tr("Nick"), rbNick);
    39     formLayout->addRow(tr("Nick"), rbNick);