8 #include <qpushbutton.h>
10 kdeBC::kdeBC(string const & cancel, string const & close)
11 : ButtonControllerBase(cancel, close),
12 okay_(0), apply_(0), cancel_(0), undo_all_(0), read_only_()
19 if (bp().buttonStatus(ButtonPolicy::OKAY)) {
20 okay_->setEnabled(true);
22 okay_->setEnabled(false);
26 if (bp().buttonStatus(ButtonPolicy::APPLY)) {
27 apply_->setEnabled(true);
29 apply_->setEnabled(false);
33 if (bp().buttonStatus(ButtonPolicy::UNDO_ALL)) {
34 undo_all_->setEnabled(true);
36 undo_all_->setEnabled(false);
40 if (bp().buttonStatus(ButtonPolicy::CANCEL)) {
41 cancel_->setText(cancel_label.c_str());
43 cancel_->setText(close_label.c_str());
46 if (!read_only_.empty()) {
48 if (bp().isReadOnly()) enable = false;
50 for (std::list<QWidget *>::iterator iter = read_only_.begin();
51 iter != read_only_.end(); ++iter) {
52 (*iter)->setEnabled(enable);