Title block templates now embed a free field for extra information.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1541 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-03-02 17:55:27 +00:00
parent fac0fea239
commit 6bdd166e57
6 changed files with 160 additions and 4 deletions

View File

@@ -777,3 +777,40 @@ void SplitCellsCommand::redo() {
if (view_) view_ -> updateLayout();
}
/**
Constructor
@param tbt Changed title block template
@param old_info Former information
@param new_info New information
@param parent Parent QUndoCommand
*/
ChangeTemplateInformationsCommand::ChangeTemplateInformationsCommand(TitleBlockTemplate *tbt, const QString &old_info, const QString &new_info, QUndoCommand *parent) :
QUndoCommand(QObject::tr("modification des informations compl\351mentaires", "undo caption"), parent),
tbtemplate_(tbt),
old_information_(old_info),
new_information_(new_info)
{
}
/**
Destructor
*/
ChangeTemplateInformationsCommand::~ChangeTemplateInformationsCommand() {
}
/**
Undo the information change
*/
void ChangeTemplateInformationsCommand::undo() {
if (!tbtemplate_) return;
tbtemplate_ -> setInformation(old_information_);
}
/**
Redo the information change
*/
void ChangeTemplateInformationsCommand::redo() {
tbtemplate_ -> setInformation(new_information_);
}