Implemented "Insert field" button.

This commit is contained in:
Jim Evins
2016-12-31 18:02:56 -05:00
parent aa11fcc4e6
commit d5508a2862
3 changed files with 30 additions and 24 deletions
+9 -1
View File
@@ -62,6 +62,7 @@ ObjectEditor::ObjectEditor( QWidget *parent )
textColorButton->init( "Default", QColor(0,0,0,255), QColor(0,0,0,255) );
shadowColorButton->init( "Default", QColor(0,0,0,255), QColor(0,0,0,255) );
textInsertFieldCombo->setName( "Insert Field" );
imageFieldCombo->setName( "Key" );
setEnabled( false );
@@ -420,6 +421,7 @@ void ObjectEditor::onMergeSourceChanged()
QStringList keys = mModel->merge()->keys();
lineColorButton->setKeys( keys );
fillColorButton->setKeys( keys );
textInsertFieldCombo->setKeys( keys );
imageFieldCombo->setKeys( keys );
shadowColorButton->setKeys( keys );
}
@@ -501,7 +503,7 @@ void ObjectEditor::onImageFileButtonClicked()
}
void ObjectEditor::onImageKeySelected(QString key )
void ObjectEditor::onImageKeySelected( QString key )
{
qDebug() << "Key = " << key;
}
@@ -601,6 +603,12 @@ void ObjectEditor::onTextControlsChanged()
}
void ObjectEditor::onTextInsertFieldKeySelected( QString key )
{
textEdit->insertPlainText( "${" + key + "}" );
}
void ObjectEditor::onShadowControlsChanged()
{
if ( !mBlocked )