void TranslationDialog::fillLayoutByMap(QMap<QString,QString>* cMap, QString subName, QMap<QString,QString>* dMap) { QStringList currentIdList=dMap->keys(); for(int n=0;n<currentIdList.count();n++) { if(currentIdList.at(n).startsWith("LANGUAGE_"))continue; TranslationLine *newEdit=new TranslationLine; newEdit->setToolTip(subName+currentIdList.at(n)); newEdit->setDefaultText(dMap->value(currentIdList.at(n),"")); newEdit->setItemText(cMap->value(currentIdList.at(n),"")); connect(newEdit,SIGNAL(lineTextChanged()),this,SLOT(lineTextChanged())); lineEdits<<newEdit; } }
void TranslationLine::textChangedSlot() { fixSize(); if(isChanged())setStyleSheet("color: "+baseValues.appTheme.black.name()); else setStyleSheet("color: "+baseValues.appTheme.red.name()); emit lineTextChanged(); }
FileEdit::FileEdit(QWidget *parent) : QWidget(parent) { setLayout(new QHBoxLayout()); layout()->setMargin(0); lineEdit = new QLineEdit(); button = new QToolButton(); button->setIcon(ICONS.OPEN_FILE); layout()->addWidget(lineEdit); layout()->addWidget(button); connect(button, SIGNAL(clicked()), this, SLOT(browse())); connect(lineEdit, SIGNAL(textChanged(QString)), this, SLOT(lineTextChanged())); }