Added setReadOnly() methods to the title block template editor classes.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1473 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-01-22 14:35:57 +00:00
parent 0e0e4dfc29
commit 21c8ffbd7b
10 changed files with 152 additions and 10 deletions

View File

@@ -50,6 +50,14 @@ QString TitleBlockTemplateLogoManager::currentLogo() const {
return(current_item -> text());
}
/**
@return Whether this logo manager should allow logo edition
(renaming, addition, deletion).
*/
bool TitleBlockTemplateLogoManager::isReadOnly() const {
return(read_only_);
}
/**
Emit the logosChanged() signal.
*/
@@ -329,3 +337,17 @@ void TitleBlockTemplateLogoManager::renameLogo() {
emitLogosChangedSignal();
}
}
/**
@param read_only Whether this logo manager should allow logo edition
(renaming, addition, deletion)
*/
void TitleBlockTemplateLogoManager::setReadOnly(bool read_only) {
if (read_only_ == read_only) return;
read_only_ = read_only;
add_button_ -> setEnabled(!read_only_);
delete_button_ -> setEnabled(!read_only_);
rename_button_ -> setEnabled(!read_only_);
logo_name_ -> setReadOnly(read_only_);
}