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