2 This file is part of Faster Application Manager.
4 Faster Application Manager is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 Faster Application Manager is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Faster Application Manager. If not, see <http://www.gnu.org/licenses/>.
17 (C) Heikki Holstila 2010
20 #include "blacklistselect.h"
21 #include "ui_blacklistselect.h"
24 BlacklistSelect::BlacklistSelect(Package* pkg, QWidget *parent) :
26 ui(new Ui::BlacklistSelect)
31 if( iPkg->blacklisted() == BlacklistNone ) {
32 ui->label->setText("This package has not been blacklisted");
33 ui->pushButton_Restore->setEnabled(false);
34 } else if( iPkg->blacklisted() == BlacklistThis ) {
35 ui->label->setText("This version of the package has been blacklisted");
36 ui->pushButton_This->setEnabled(false);
37 } else if( iPkg->blacklisted() == BlacklistAll ) {
38 ui->label->setText("All versions of this package have been blacklisted");
39 ui->pushButton_Forever->setEnabled(false);
42 if( iPkg->isInstalled() && !iPkg->isUpgradeable() )
43 ui->pushButton_This->setEnabled(false);
46 BlacklistSelect::~BlacklistSelect()
51 void BlacklistSelect::changeEvent(QEvent *e)
53 QDialog::changeEvent(e);
55 case QEvent::LanguageChange:
56 ui->retranslateUi(this);
63 void BlacklistSelect::on_pushButton_Forever_clicked()
65 iPkg->setBlacklisted( BlacklistAll );
69 void BlacklistSelect::on_pushButton_This_clicked()
71 iPkg->setBlacklisted( BlacklistThis );
75 void BlacklistSelect::on_pushButton_Restore_clicked()
77 iPkg->setBlacklisted( BlacklistNone );