mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
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:
@@ -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_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user