Ejemplo n.º 1
0
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;
	}
}
Ejemplo n.º 2
0
void TranslationLine::textChangedSlot()
{
	fixSize();
	if(isChanged())setStyleSheet("color: "+baseValues.appTheme.black.name());
	else setStyleSheet("color: "+baseValues.appTheme.red.name());
	emit lineTextChanged();
}
Ejemplo n.º 3
0
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()));
}