QTfrontend/ui/dialog/bandialog.cpp
changeset 10079 c88e38a0f478
parent 8417 790492abc004
child 11495 fb7817a5c2b1
equal deleted inserted replaced
10078:8572d1f8b2f0 10079:c88e38a0f478
    20     rbNick = new QRadioButton(this);
    20     rbNick = new QRadioButton(this);
    21     leId = new QLineEdit(this);
    21     leId = new QLineEdit(this);
    22     leReason = new QLineEdit(this);
    22     leReason = new QLineEdit(this);
    23     cbTime = new QComboBox(this);
    23     cbTime = new QComboBox(this);
    24 
    24 
    25     cbTime->addItem(HWApplication::tr("%1 minutes", 0, 10).arg("10"), 5 * 60);
    25     const int min = 60;
    26     cbTime->addItem(HWApplication::tr("%1 minutes", 0, 30).arg("30"), 10 * 60);
    26     const int hour = 60 * min;
    27     cbTime->addItem(HWApplication::tr("%1 hour", 0, 10).arg("10"), 60 * 60);
    27     const int day = 24 * hour;
    28     cbTime->addItem(HWApplication::tr("%1 hours", 0, 3).arg("3"), 3 * 60 * 60);
    28     cbTime->addItem(HWApplication::tr("%1 minutes", 0, 10).arg(10), 10 * min);
    29     cbTime->addItem(HWApplication::tr("%1 hours", 0, 5).arg("5"), 5 * 60 * 60);
    29     cbTime->addItem(HWApplication::tr("%1 minutes", 0, 30).arg(30), 30 * min);
    30     cbTime->addItem(HWApplication::tr("%1 hours", 0, 12).arg("12"), 12 * 60 * 60);
    30     cbTime->addItem(HWApplication::tr("%1 hour", 0, 1).arg(1), 1 * hour);
    31     cbTime->addItem(HWApplication::tr("%1 day", 0, 1).arg("1"), 24 * 60 * 60);
    31     cbTime->addItem(HWApplication::tr("%1 hours", 0, 3).arg(3), 3 * hour);
    32     cbTime->addItem(HWApplication::tr("%1 days", 0, 3).arg("3"), 72 * 60 * 60);
    32     cbTime->addItem(HWApplication::tr("%1 hours", 0, 5).arg(5), 5 * hour);
    33     cbTime->addItem(HWApplication::tr("%1 days", 0, 7).arg("7"), 168 * 60 * 60);
    33     cbTime->addItem(HWApplication::tr("%1 hours", 0, 12).arg(12), 12 * hour);
    34     cbTime->addItem(HWApplication::tr("%1 days", 0, 14).arg("14"), 336 * 60 * 60);
    34     cbTime->addItem(HWApplication::tr("%1 day", 0, 1).arg(1), 1 * day);
       
    35     cbTime->addItem(HWApplication::tr("%1 days", 0, 3).arg(3), 3 * day);
       
    36     cbTime->addItem(HWApplication::tr("%1 days", 0, 7).arg(7), 7 * day);
       
    37     cbTime->addItem(HWApplication::tr("%1 days", 0, 14).arg(14), 14 * day);
    35     cbTime->addItem(tr("permanent"), 3650 * 24 * 60 * 60);
    38     cbTime->addItem(tr("permanent"), 3650 * 24 * 60 * 60);
    36     cbTime->setCurrentIndex(0);
    39     cbTime->setCurrentIndex(0);
    37 
    40 
    38     formLayout->addRow(tr("IP"), rbIP);
    41     formLayout->addRow(tr("IP"), rbIP);
    39     formLayout->addRow(tr("Nick"), rbNick);
    42     formLayout->addRow(tr("Nick"), rbNick);